LemonDuck
- Type
- Cryptominer
- Capabilities
- Credential theftExfiltrationPersistenceInitial accessPrivilege escalationLateral movementPost exploitationDefense evasionReconnaissanceScanningBrute forceProcess injection
- Delivery
- PhishingMalspamLureUSB
- Platforms
- LinuxWindows
LemonDuck is an actively maintained cross-platform malware family and botnet best known for cryptocurrency mining, particularly Monero mining via XMRig, but it has evolved well beyond a simple coinminer. Since first being observed in 2019, it has developed into a multifunctional intrusion platform that combines automated propagation with post-compromise tradecraft, including credential theft, lateral movement, security-tool removal, persistence, and delivery of secondary payloads. It has been associated with both broad spray-and-pray activity and more selective hands-on-keyboard follow-on operations.
LemonDuck targets Windows and Linux systems and has been observed abusing a wide range of exposed or weakly protected services, including SMB, RDP, SSH, Microsoft Exchange, MSSQL, Redis, and Hadoop YARN. It spreads through phishing email campaigns, exploitation of known vulnerabilities, brute-force attacks, USB and attached-drive propagation, and lateral movement inside compromised environments. Campaigns have included exploitation of Microsoft Exchange ProxyLogon vulnerabilities as well as older flaws such as EternalBlue and other widely abused remote-access vulnerabilities.
On Windows, LemonDuck commonly relies on PowerShell-heavy, multi-stage infection chains and fileless or semi-fileless persistence through scheduled tasks, WMI event consumers, registry-based mechanisms, and startup persistence. It has been observed using WMI and PowerShell to modify Exchange Offline Address Book settings and deploy web-shell functionality for remote command execution. It also uses process injection and in-memory execution to complicate remediation. The malware attempts to disable or weaken Microsoft Defender, add broad exclusions, uninstall security products, and remove competing malware or miners from infected hosts. In some intrusions, operators have patched the same vulnerabilities they exploited in order to retain exclusive access and reduce interference from rival actors.
LemonDuck includes credential-access and post-exploitation functionality, including use of bundled Mimikatz components to steal credentials for reuse and lateral movement. It performs reconnaissance and scanning, attempts logons against adjacent systems, abuses SMB for propagation and covert file transfer, and can self-spread through Outlook by harvesting contacts and sending malicious attachments from compromised mailboxes. It also propagates through removable and network-connected drives by planting hidden malicious files.
Operationally, LemonDuck has been described as having at least two related infrastructures, sometimes referred to as Duck and Cat. The Cat-associated activity has been linked to more dangerous post-compromise outcomes, including backdoor installation, credential theft, data theft, and delivery of additional malware such as Ramnit. This evolution has made LemonDuck notable not only as a cryptomining threat but also as a loader and foothold that can enable broader enterprise compromise.
LemonDuck has had global reach, with significant activity observed across North America, Europe, and Asia. It should be treated as more than commodity mining malware because its combination of worm-like spread, defense evasion, credential theft, persistence, and follow-on payload delivery makes it a serious intrusion threat in enterprise environments.
Associated vulnerabilities
8 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Techniques & procedures
47 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
Initially, the botnet was a small-time operation that relied on classic email spam to distribute malicious files that would infect users with its malware.
Initial Access
6 techniques
Initial Access
Today, the botnet can infect both Windows and Linux systems and comes equipped with a trove of features that allow it to... collect credentials from local systems to ensure future and more persistent access.
In the initial access phase, the attacker... successfully logged in as a local user named Administrator.
Other common methods of infection include movement within the compromised environment, as well as through USB and connected drives.
In 2021, it exploited newly patched Exchange Server vulnerabilities to gain access to outdated systems... vulnerabilities like CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065 (ProxyLogon).
It uses a wide range of spreading mechanisms—phishing emails, exploits, USB devices, brute force, among others... For example, in 2020, it was observed using COVID-19-themed lures in email attacks.
The attachment used for these lures is one of three types: .doc, .js, or a .zip containing a .js file. Whatever the type, the file is named “readme”.
Execution
8 techniques
Execution
LemonDuck... capitalizes on the ProxyLogon bug to target systems, but its infection utilizes Windows Management Instrumentation (WMI) to modify the OAB.
These campaigns included PowerShell scripts that employed additional scripts kicked off by a scheduled task.
One of these actions is to establish fileless persistence by creating scheduled tasks that re-run the initial PowerShell download script.
their multi-stage PowerShell scripts were more complex and obfuscated than others', and they already made extensive use of open-source tools for code execution and infection
These campaigns included PowerShell scripts... The JavaScript has replaced the scheduled task that LemonDuck previously used to kickstart the PowerShell script.
This JavaScript launches a CMD process that subsequently launches Notepad as well as the PowerShell script contained within the JavaScript.
The attachment used for these lures is one of three types: .doc, .js, or a .zip containing a .js file... Since LemonDuck began operating, the .zip to .js file execution method is the most common.
...vulnerabilities like CVE-2017-8464 (LNK RCE)...
Persistence
7 techniques
Persistence
These campaigns included PowerShell scripts that employed additional scripts kicked off by a scheduled task.
One of these actions is to establish fileless persistence by creating scheduled tasks that re-run the initial PowerShell download script.
Today, the botnet can infect both Windows and Linux systems and comes equipped with a trove of features that allow it to... collect credentials from local systems to ensure future and more persistent access.
In the initial access phase, the attacker... successfully logged in as a local user named Administrator.
Leveraging the ProxyLogon vulnerability allowed the threat actors behind BlackKingdom, Prometei, and LemonDuck to execute Chopper web shells... The China Chopper web shell... continues to be widely used by threat actors in their campaigns to gain remote access to a targeted system.
LemonDuck also maintains a backup persistence mechanism through WMI Event Consumers to perform the same actions.
Fileless techniques, which include persistence via registry, scheduled tasks, WMI, and startup folder
Privilege Escalation
8 techniques
Privilege Escalation
These campaigns included PowerShell scripts that employed additional scripts kicked off by a scheduled task.
One of these actions is to establish fileless persistence by creating scheduled tasks that re-run the initial PowerShell download script.
These techniques also include utilizing process injection and in-memory execution, which can make removal non-trivial.
IF.Bin drops additional .BIN files to attempt common service exploits like CVE-2017-8464 ... to increase privilege.
Today, the botnet can infect both Windows and Linux systems and comes equipped with a trove of features that allow it to... collect credentials from local systems to ensure future and more persistent access.
In the initial access phase, the attacker... successfully logged in as a local user named Administrator.
LemonDuck also maintains a backup persistence mechanism through WMI Event Consumers to perform the same actions.
Fileless techniques, which include persistence via registry, scheduled tasks, WMI, and startup folder
Stealth
9 techniques
Stealth
we have observed a PowerShell process that executes a Base64-encoded command
Additionally, the attacker also create another malicious executable that disguised a legitimate system service named svchost.exe.
These techniques also include utilizing process injection and in-memory execution, which can make removal non-trivial.
After the emails are sent, the inbox is cleaned to remove traces of these mails.
Today, the botnet can infect both Windows and Linux systems and comes equipped with a trove of features that allow it to... collect credentials from local systems to ensure future and more persistent access.
In the initial access phase, the attacker... successfully logged in as a local user named Administrator.
LemonDuck then attempts to automatically remove a series of other security products through CMD.exe, leveraging WMIC.exe.
These scripts attempt to create a set of hidden files in the home directory, including a copy of readme.js.
These techniques also include utilizing process injection and in-memory execution, which can make removal non-trivial.
Defense Impairment
2 techniques
Defense Impairment
Today, beyond using resources for its traditional bot and mining activities, LemonDuck steals credentials, removes security controls... Notably, LemonDuck removes other attackers from a compromised device by getting rid of competing malware and preventing any new infections by patching the same vulnerabilities it used to gain access.
It first creates and copies malicious file msInstall.exe... opens specific firewall ports and sets up port forwarding to redirect traffic to a remote address (1.1.1.1) on port 53.
Credential Access
4 techniques
Credential Access
Today, the botnet can infect both Windows and Linux systems and comes equipped with a trove of features that allow it to... collect credentials from local systems to ensure future and more persistent access.
It uses a wide range of spreading mechanisms—phishing emails, exploits, USB devices, brute force, among others... scans against both Windows and Linux devices for open or weakly authenticated SMB, Exchange, SQL, Hadoop, REDIS, RDP, or other edge devices that might be vulnerable to password spray
...other edge devices that might be vulnerable to password spray or application vulnerabilities...
Today, beyond using resources for its traditional bot and mining activities, LemonDuck steals credentials... Once inside a system with an Outlook mailbox... utilizes the credentials present on the device.
Discovery
2 techniques
Discovery
the mail metadata count of contacts is also sent to the attacker, likely to evaluate its effectiveness
LemonDuck uses this script at installation and then repeatedly thereafter to attempt to scan for ports and perform network reconnaissance.
Lateral Movement
7 techniques
Lateral Movement
If all of those fail, LemonDuck also uses its access methods such as RDP, Exchange web shells, Screen Connect, and RATs to maintain persistent access.
If all of those fail, LemonDuck also uses its access methods such as RDP, Exchange web shells, Screen Connect, and RATs to maintain persistent access.
Upon login into the account, the attacker creates a hidden administrative share for the C: drive on the local machine.
Other common methods of infection include movement within the compromised environment, as well as through USB and connected drives.
The task was used to bring in the PCASTLE tool to achieve a couple of goals: abuse the EternalBlue SMB exploit...
The task was used to bring in the PCASTLE tool to achieve a couple of goals: abuse the EternalBlue SMB exploit, as well as use brute force or pass-the-hash to move laterally and begin the operation again.
It then attempts to log onto adjacent devices to push the initial LemonDuck execution scripts.
Collection
1 technique
Collection
The script instructs the mailbox to send copies of a phishing message with preset messages and attachments to all contacts.
Command and Control
4 techniques
Command and Control
T1071.002 File Transfer Protocols is a sub-technique of Application Layer Protocols (T1071) in the MITRE ATT&CK framework under the Command and Control tactic. It involves the use of File Transfer Protocols such as SMB, FTP, and TFTP to facilitate file sharing across networks.
The script starts by installing IPv6 and then configures the firewall to open TCP ports 65532, 65531, and 65529... Each port is set up with a proxy that directs traffic from the local workstation to IP address 1.1.1.1 on port 53.
Today, beyond using resources for its traditional bot and mining activities... ultimately drops more tools for human-operated activity... Today, the Cat infrastructure is used in attacks that typically result in backdoor installation... and malware delivery. It is often seen delivering the malware Ramnit.
LemonDuck also uses its access methods such as RDP, Exchange web shells, Screen Connect, and RATs to maintain persistent access.
Impact
2 techniques
Impact
A miner implant is downloaded as part of the monetization mechanism of LemonDuck. The implant used is usually XMRig
This information is then added into the Windows Hosts file to avoid detection by static signatures.
Observables
36 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
7 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.