M_Hunting_Webshell_LIGHTWIRE_2
Description
Detects LIGHTWIRE based on the RC4 decoding and execution 1-liner.
Query · yara
strings:
// rewritten as strings - because a regex is unnecessary
// $re1 = /eval\{my.{1,20}Crypt::RC4->new\(\".{1,50}->RC4\(decode_base64\(CGI::param\(\'.{1,30};eval\s\$.{1,30}\"Compatibility\scheck:\s\$@\";\}/
$s1 = "eval{my"
$s2 = "Crypt::RC4->new(\""
$s3 = "->RC4(decode_base64(CGI::param('"
$s4 = ";eval $"
$s5 = "\"Compatibility check: $@\";}"
condition:
filesize < 10KB
and all of them