alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"ET MALWARE Chafer Win32/TREKX Uploading to CnC";
flow:established,to_server;
http.method;
content:"POST";
http.uri;
content:".aspx"; endswith;
http.request_body;
content:"Content-Disposition|3a 20|form-data|3b|";
content:"TREK"; distance:0; fast_pattern;
pcre:"/^[\x20-\x7e\r\n]{0,13}[^\x20-\x7e\r\n]/Rs";
http.content_type;
content:"multipart|2f|form-data|3b|";
http.content_len;
byte_test:0,<=,255,0,string,dec;
http.header_names;
content:!"Referer";
reference:url,securityintelligence.com/posts/observations-of-itg07-cyber-operations/;
classtype:command-and-control;
sid:2027479; rev:3;
metadata:affected_product Windows_XP_Vista_7_8_10_Server_32_64_Bit, created_at 2019_06_17, deployment Perimeter, malware_family TREKX, performance_impact Low, confidence High, signature_severity Major, tag Chafer, tag APT39, updated_at 2020_09_17;
)