secubox-openwrt/package/secubox/secubox-app-mitmproxy/files/etc/init.d/mitmproxy
CyberMind-FR e58f479cd4 feat(waf): Update WAF scenarios with 2024-2025 CVEs and OWASP threats
Add detection patterns for latest actively exploited vulnerabilities:
- CVE-2025-55182 (React2Shell, CVSS 10.0)
- CVE-2025-8110 (Gogs RCE), CVE-2025-53770 (SharePoint)
- CVE-2025-52691 (SmarterMail), CVE-2025-40551 (SolarWinds)
- CVE-2024-47575 (FortiManager), CVE-2024-21887 (Ivanti)
- CVE-2024-3400, CVE-2024-0012, CVE-2024-9474 (PAN-OS)

New attack categories based on OWASP Top 10 2025:
- HTTP Request Smuggling (TE.CL/CL.TE conflicts)
- AI/LLM Prompt Injection (ChatML, instruction markers)
- WAF Bypass techniques (Unicode normalization, double encoding)
- Supply Chain attacks (CI/CD poisoning, dependency confusion)
- Extended SSTI (Jinja2, Freemarker, Velocity, Thymeleaf)
- API Abuse (BOLA/IDOR, mass assignment)

CrowdSec scenarios split into 11 separate files for reliability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 05:02:57 +01:00

68 lines
1.2 KiB
Bash
Executable File

#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
PROG=/usr/sbin/mitmproxyctl
NAME=mitmproxy
CONFIG=mitmproxy
start_instance() {
local instance="$1"
local enabled container_name
config_get enabled "$instance" enabled '0'
config_get container_name "$instance" container_name "mitmproxy-$instance"
[ "$enabled" = "1" ] || return 0
echo "Starting mitmproxy instance: $instance ($container_name)"
procd_open_instance "$instance"
procd_set_param command "$PROG" service-run "$instance"
procd_set_param respawn 3600 5 5
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
start_service() {
local main_enabled
config_load "$CONFIG"
config_get main_enabled main enabled '0'
[ "$main_enabled" = "1" ] || {
echo "mitmproxy is disabled. Enable with: uci set mitmproxy.main.enabled=1"
return 0
}
# Start all enabled instances
config_foreach start_instance instance
}
stop_instance() {
local instance="$1"
"$PROG" service-stop "$instance" 2>/dev/null
}
stop_service() {
config_load "$CONFIG"
config_foreach stop_instance instance
# Also stop legacy single instance
"$PROG" service-stop 2>/dev/null
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "$CONFIG"
}
status() {
"$PROG" status
}