FE_APT_Trojan_PL_QUIETPULSE
Description
Detects samples mentioned in PulseSecure report
Query · yara
strings:
$s1 = /open[\x09\x20]{0,32}\(\*STDOUT[\x09\x20]{0,32},[\x09\x20]{0,32}[\x22\x27]>&CLIENT[\x22\x27]\)/
$s2 = /open[\x09\x20]{0,32}\(\*STDERR[\x09\x20]{0,32},[\x09\x20]{0,32}[\x22\x27]>&CLIENT[\x22\x27]\)/
$s3 = /socket[\x09\x20]{0,32}\(SERVER[\x09\x20]{0,32},[\x09\x20]{0,32}PF_UNIX[\x09\x20]{0,32},[\x09\x20]{0,32}SOCK_STREAM[\x09\x20]{0,32},[\x09\x20]{0,32}0[\x09\x20]{0,32}\)[\x09\x20]{0,32};\s{0,128}unlink/
$s4 = /bind[\x09\x20]{0,32}\([\x09\x20]{0,32}SERVER[\x09\x20]{0,32},[\x09\x20]{0,32}sockaddr_un\(/
$s5 = /listen[\x09\x20]{0,32}\([\x09\x20]{0,32}SERVER[\x09\x20]{0,32},[\x09\x20]{0,32}SOMAXCONN[\x09\x20]{0,32}\)[\x09\x20]{0,32};/
$s6 = /my[\x09\x20]{1,32}\$\w{1,64}[\x09\x20]{0,32}=[\x09\x20]{0,32}fork\([\x09\x20]{0,32}\)[\x09\x20]{0,32};\s{1,128}if[\x09\x20]{0,32}\([\x09\x20]{0,32}\$\w{1,64}[\x09\x20]{0,32}==[\x09\x20]{0,32}0[\x09\x20]{0,32}\)[\x09\x20]{0,32}\{\s{1,128}exec\(/
condition:
all of them
}
rule FE_APT_Trojan_PL_RADIALPULSE_1
{
meta:
author = "Mandiant"
date = "2021-04-16"
sha256 = "d72daafedf41d484f7f9816f7f076a9249a6808f1899649b7daa22c0447bb37b"
description = "Detects samples mentioned in PulseSecure report"
reference = "https://www.fireeye.com/blog/threat-research/2021/04/suspected-apt-actors-leverage-bypass-techniques-pulse-secure-zero-day.html"
id = "1fab6d2f-96e8-5def-a93e-2bddd04e7ec8"
strings:
$s1 = "->getRealmInfo()->{name}"
$s2 = /open\(\*fd,[\x09\x20]{0,32}[\x22\x27]>>/
$s3 = /syswrite\(\*fd,[\x09\x20]{0,32}[\x22\x27]realm=\$/
$s4 = /syswrite\(\*fd,[\x09\x20]{0,32}[\x22\x27]username=\$/
$s5 = /syswrite\(\*fd,[\x09\x20]{0,32}[\x22\x27]password=\$/
condition:
(@s1[1] < @s2[1]) and (@s2[1] < @s3[1]) and $s4 and $s5
}
rule FE_APT_Trojan_PL_RADIALPULSE_2
{
meta:
author = "Mandiant"
date = "2021-04-16"
hash = "4a2a7cbc1c8855199a27a7a7b51d0117"
description = "Detects samples mentioned in PulseSecure report"
reference = "https://www.fireeye.com/blog/threat-research/2021/04/suspected-apt-actors-leverage-bypass-techniques-pulse-secure-zero-day.html"
id = "dc941935-aec7-54b6-a278-f1453b9785df"
strings:
$s1 = "open(*fd,"
$s2 = "syswrite(*fd,"
$s3 = "close(*fd);"
$s4 = /open\(\*fd,[\x09\x20]{0,32}[\x22\x27]>>\/tmp\/[\w.]{1,128}[\x22\x27]\);[\x09\x20]{0,32}syswrite\(\*fd,[\x09\x20]{0,32}/
$s5 = /syswrite\(\*fd,[\x09\x20]{0,32}[\x22\x27][\w]{1,128}=\$\w{1,128} ?[\x22\x27],[\x09\x20]{0,32}5000\)/
condition:
all of them
}
rule FE_APT_Trojan_PL_RADIALPULSE_3
{
meta:
author = "Mandiant"
date = "2021-04-16"
hash = "4a2a7cbc1c8855199a27a7a7b51d0117"
description = "Detects samples mentioned in PulseSecure report"
reference = "https://www.fireeye.com/blog/threat-research/2021/04/suspected-apt-actors-leverage-bypass-techniques-pulse-secure-zero-day.html"
id = "8a597521-c873-5bcc-85e6-5a0a061fffb7"
strings:
$s1 = "open(*fd,"
$s2 = "syswrite(*fd,"
$s3 = "close(*fd);"
$s4 = /open\(\*fd,[\x09\x20]{0,32}[\x22\x27]>>\/tmp\/dsstartssh\.statementcounters[\x22\x27]\);[\x09\x20]{0,32}syswrite\(\*fd,[\x09\x20]{0,32}/
$s5 = /syswrite\(\*fd,[\x09\x20]{0,32}[\x22\x27][\w]{1,128}=\$username ?[\x22\x27],[\x09\x20]{0,32}\d{4}\)/
condition:
all of them
}
rule FE_APT_Backdoor_Linux32_SLOWPULSE_1
{
meta:
author = "Mandiant"
date = "2021-04-16"
sha256 = "cd09ec795a8f4b6ced003500a44d810f49943514e2f92c81ab96c33e1c0fbd68"
description = "Detects samples mentioned in PulseSecure report"
reference = "https://www.fireeye.com/blog/threat-research/2021/04/suspected-apt-actors-leverage-bypass-techniques-pulse-secure-zero-day.html"
id = "dd35257f-5b6f-55a6-a709-873ded1f4b72"
strings:
$sb1 = {FC b9 [4] e8 00 00 00 00 5? 8d b? [4] 8b}
$sb2 = {f3 a6 0f 85 [4] b8 03 00 00 00 5? 5? 5?}
$sb3 = {9c 60 e8 00 00 00 00 5? 8d [5] 85 ?? 0f 8?}
$sb4 = {89 13 8b 51 04 89 53 04 8b 51 08 89 53 08}
$sb5 = {8d [5] b9 [4] f3 a6 0f 8?}
condition:
((uint32(0) == 0x464c457f) and (uint8(4) == 1)) and all of them
}
/* TOO SLOW
rule FE_APT_Backdoor_Linux32_SLOWPULSE_2
{
meta:
author = "Strozfriedberg"
date = "2021-04-16"
sha256 = "cd09ec795a8f4b6ced003500a44d810f49943514e2f92c81ab96c33e1c0fbd68"
description = "Detects samples mentioned in PulseSecure report"
reference = "https://www.fireeye.com/blog/threat-research/2021/04/suspected-apt-actors-leverage-bypass-techniques-pulse-secure-zero-day.html"
strings:
$sig = /[\x20-\x7F]{16}([\x20-\x7F\x00]+)\x00.{1,32}\xE9.{3}\xFF\x00+[\x20-\x7F][\x20-\x7F\x00]{16}/
// TOI_MAGIC_STRING
$exc1 = /\xED\xC3\x02\xE9\x98\x56\xE5\x0C/
condition:
uint32(0) == 0x464C457F and (1 of ($sig*)) and (not (1 of ($exc*)))
}
*/
rule FE_APT_Webshell_PL_STEADYPULSE_1
{
meta:
author = "Mandiant"
date = "2021-04-16"
sha256 = "168976797d5af7071df257e91fcc31ce1d6e59c72ca9e2f50c8b5b3177ad83cc"
description = "Detects samples mentioned in PulseSecure report"
reference = "https://www.fireeye.com/blog/threat-research/2021/04/suspected-apt-actors-leverage-bypass-techniques-pulse-secure-zero-day.html"
id = "49457fbb-9288-565f-909d-e8228c21c1e4"
strings:
$s1 = "parse_parameters"
$s2 = "s/\\+/ /g"
$s3 = "s/%(..)/pack("
$s4 = "MIME::Base64::encode($"
$s5 = "$|=1;"
$s6 = "RC4("
$s7 = "$FORM{'cmd'}"
condition:
all of them