DirtyMoe’s worming module autonomously spreads by exploiting several known vulnerabilities and by generating target IPs based on geolocation, enabling mass-scale infection and lateral movement. This Avast Threat Lab analysis details the worm’s kill chain, the exploits used (EternalBlue, ThinkPHP, Oracle WebLogic), the modular C2-controlled design, and the IP-generation techniques that drive widespread propagation. #DirtyMoe #EternalBlue #ThinkPHP #OracleWeblogic #WizardOpium #SCMR #WMI #MSQL #PowerShell #mshta #PurpleFox #TelegramInstaller
Keypoints
- DirtyMoe uses worming modules to spread without user interaction, alongside common delivery methods like PurpleFox EK and injected Telegram Installers.
- The worm targets several major vulnerabilities (e.g., EternalBlue/MS17-010, ThinkPHP CVE-2019-9082, Oracle WebLogic CVE-2019-2725, WizardOpium CVE-2019-1458, and deserialization flaws) and employs dictionary attacks against SCMR, WMI, and MS SQL.
- IP address generation is geolocation-aware and can target hundreds of thousands of addresses per day, including local network addresses for lateral movement.
- The DirtyMoe architecture is modular; C2 servers select which worming module to deploy based on the infected host’s context and other data.
- The worming kill chain comprises Reconnaissance, Weaponization, Delivery, and Exploitation/Installation, followed by running the DirtyMoe payload on compromised hosts.
- RCE commands are delivered via placeholders in the payload (e.g., @WEB@, @FIN@) and executed through msiexec in silent mode, with MSI names derived from hashed values.
- IOCs include multiple SHA-256 hashes for SMB/MS SQL worming modules and several CVEs associated with ThinkPHP, EternalBlue, WizardOpium, and Oracle WebLogic Server.
MITRE Techniques
- [T1210] Exploitation of Remote Services – EternalBlue SMB Remote Code Execution used to compromise Windows machines. ‘EternalBlue SMB Remote Code Execution (MS17-010)’
- [T1543.003] Create/Modify System Process: Windows Service – The worming module creates and starts a new Windows service remotely via RPC over SMB. ‘a new Windows service is created and started remotely via RPC over the SMB service’
- [T1047] Windows Management Instrumentation – Dictionary attacks against WMI to enable remote command execution. ‘dictionary attack to Windows Management Instrumentation (WMI)’
- [T1218.005] Signed Binary Proxy Execution: Mshta – mshta.exe used as a LOLbin to execute and launch the RCE payload. ‘The Microsoft HTML Application Host (mshta.exe) is used as a LOLbin to execute and create ShellWindows and run @RCE@.’
- [T1021.002] SMB/Windows Admin Shares – Delivery of the payload over SMB/MS SQL protocols. ‘The payload delivery is typically performed using protocols of targeted services, e.g., SMB or MS SQL protocols.’
- [T1059.001] PowerShell – Use of PowerShell to fetch and execute payloads (MsiMake) and run the RCE chain. ‘powershell -nop -exec bypass -c “IEX $decoded; MsiMake @SQLEXEC@;”‘
- [T1046] Network Service Scanning – The worming module tests target IPs by probing ports to verify live, potentially vulnerable hosts. ‘the worming module connects to the specific port where attackers expect vulnerable services and verifies whether the victim’s machine is live’
- [T1110] Brute Force / Credential Access – Dictionary attacks to guess admin passwords for SCMR, WMI, and SQL services. ‘dictionary attack targets two administrator user names, namely administrator for SMB services and sa for MS SQL servers’
Indicators of Compromise
- [IP] Base/local attack generation – 98.126.89.1 (used as base if IP not available), and example attack IPs from payloads such as 45.32.127.170, 92.118.151.102, 207.246.118.120
- [Hash] WizardOpium-related – fef7b5df28973ecf8e8ceffa8777498a36f3a7ca1b4720b23d0df18c53628c40
- [Hash] SMB worming modules – f78b7b0faf819328f72a7181ed8cc52890fedcd9bf612700d7b398f1b9d77ab6, dc1dd648287bb526f11ebacf31edd06089f50c551f7724b98183b10ab339fe2b
- [Hash] SQL worming modules – df8f37cb2f20ebd8f22e866ee0e25be7d3731e4d2af210f127018e2267c73065, b3e8497a4cf00489632e54e2512c05d9c80288c2164019d53615dd53c0977fa7
- [Hash] Worming modules in development – 36e0e1e4746d0db1f52aff101a103ecfb0414c8c04844521867ef83466c75340
- [CVE] CVE-2019-9082 – ThinkPHP – Multiple PHP Injection RCEs
- [CVE] CVE-2019-2725 – Oracle Weblogic Server – AsyncResponseService Deserialization RCE
- [CVE] CVE-2019-1458 – WizardOpium Local Privilege Escalation
- [CVE] CVE-2017-0144 – EternalBlue SMB Remote Code Execution (MS17-010)
Read more: https://decoded.avast.io/martinchlumecky/dirtymoe-5/