MAL_Xbash_SH_Sep18
Description
Detects Xbash malware
Query · yara
strings:
$s1 = "echo \"*/5 * * * * curl -fsSL" fullword ascii
$s2 = ".sh|sh\" > /var/spool/cron/root" ascii
$s3 = "#chmod +x /tmp/hawk" fullword ascii
$s4 = "if [ ! -f \"/tmp/root.sh\" ]" fullword ascii
$s5 = ".sh > /tmp/lower.sh" ascii
$s6 = "chmod 777 /tmp/root.sh" fullword ascii
$s7 = "-P /tmp && chmod +x /tmp/pools.txt" fullword ascii
$s8 = "-C /tmp/pools.txt>/dev/null 2>&1" ascii
condition:
uint16(0) == 0x2123 and filesize < 3KB and 1 of them