alert http any any -> $HOME_NET any (
msg:"ET WEB_SPECIFIC_APPS Draytek mainfunction.cgi trustcaupload Command Injection Attempt (CVE-2023-1162)";
flow:established,to_server;
http.method;
content:"POST";
http.uri; bsize:39;
content:"/cgi-bin/mainfunction.cgi/trustcaupload"; fast_pattern;
http.request_body;
content:"Content-Disposition|3a 20|form-data|3b 20|name|3d 22|password|22|";
pcre:"/^.+(?:(?:\x3b|%3[Bb])|(?:\x0a|%0[Aa])|(?:\x60|%60)|(?:\x7c|%7[Cc])|(?:\x24|%24)|(?:\x26{2}|%26%26))+/R";
reference:cve,2023-1162;
reference:url,github.com/xxy1126/Vuln/blob/main/Draytek/2.md;
classtype:attempted-admin;
sid:2058380; rev:1;
metadata:affected_product DrayTek, attack_target Networking_Equipment, tls_state plaintext, created_at 2024_12_17, cve CVE_2023_1162, deployment Perimeter, deployment Internal, performance_impact Low, confidence High, signature_severity Major, tag Exploit, updated_at 2024_12_17, mitre_tactic_id TA0001, mitre_tactic_name Initial_Access, mitre_technique_id T1190, mitre_technique_name Exploit_Public_Facing_Application;
target:dest_ip;
)