Part 5 ended with an unanswered question. Someone used Mozi’s own signing keys to change software on routers all over the world, and nobody has said who did it or on what authority.
This part looks at two operations that answered the same question in public, with court orders and press releases. In January 2021 police in eight countries took over Emotet, then one of the most widespread malware delivery services in the world, and scheduled it to delete itself on 25 April. In August 2023 the FBI took over Qakbot and sent an uninstaller to the infected computers that called home, out of more than 700,000 it had identified.
The first part of this series showed where this started. In 2011 the FBI sent Coreflood a stop command, and removed it only from 19,000 machines whose owners had signed a consent form. Ten years later, removal without consent had become a standard part of a takedown. This is Part 6 of A Short History of Botnets: how that happened, what the uninstallers actually did, and what they did not do.
A note on the exhibits. As before, the exhibits are reconstructions or illustrations built from published analyses, mainly the US Justice Department’s announcements, Germany’s Federal Criminal Police Office (BKA) and the reverse engineering of the uninstallers by Malwarebytes and SecureWorks. Each says which kind it is.
Two loaders: the front door of the ransomware economy
Emotet and Qakbot started the same way as the botnets in Part 1 and Part 3: as banking trojans that stole credentials. Both ended up as something more valuable to the criminal economy. They became loaders: malware whose main job was to get into a network, stay there, and sell or hand that access to someone else.
| Emotet | Qakbot | |
|---|---|---|
| First seen | 2014 | 2008 (per the 2025 indictment) |
| Main entry route | Malicious email attachments, sent by the botnet itself | Malicious email |
| What it delivered | TrickBot, and through it Ryuk ransomware, among others | Payloads for Conti, ProLock, Egregor, REvil, MegaCortex and Black Basta |
| Scale | About 1.6 million computers infected between April 2020 and January 2021, over 45,000 in the US | More than 700,000 computers identified in 2023, over 200,000 in the US |
| Money | $10.5 million moved through one cryptocurrency platform in two years, per Ukrainian authorities | Fees tied to about $58 million in ransoms between October 2021 and April 2023 |
The Emotet figures are from the US Justice Department and, for the money, from Ukrainian police as reported by The Hacker News. The Qakbot figures are from the Justice Department’s 2023 announcement.
Europol described Emotet as “a primary door opener for computer systems on a global scale”. That is the role both botnets played. In Part 3, GameOver Zeus delivered CryptoLocker itself. By 2020 the work had been divided: loader botnets got in, and separate ransomware groups paid for the access. Taking down a loader therefore did not just stop one malware family. It cut the supply line of several ransomware groups at once.
It also changed what was at stake in the takedown. Every machine still infected with a loader was a door that someone could reopen. Stopping the botnet’s command channel was not enough; the doors themselves had to be closed.
Emotet, January to April 2021: a takedown with a timer
Operation LadyBird took nearly two years of preparation and involved police from eight countries: the Netherlands, Germany, the United States, the United Kingdom, France, Lithuania, Canada and Ukraine. On 26 and 27 January 2021 they took down at least 700 Emotet servers. In Kharkiv, Ukrainian police raided properties and arrested two people accused of maintaining the infrastructure.
The technical move was the one this series has been tracing since Coreflood: use the botnet’s own update channel. Dutch police seized two central servers and placed a new file on them. According to the Justice Department, foreign partners replaced the malware on servers in their jurisdictions with a law-enforcement file, which infected computers downloaded during a scheduled Emotet update. The new version cut the operators off and redirected the bots to police-controlled servers. It did not remove anything else Emotet had already installed.
Then came the part that made Emotet different. The law-enforcement version carried a timer. On 25 April 2021 it would remove itself. TechTarget’s report and Malwarebytes’ analysis describe the removal as “very simple”:
- delete the Windows service associated with Emotet;
- delete its autorun registry key;
- try to move the Emotet file to the temporary folder (the analysis found this step failed);
- exit.
The three-month delay appears to have been deliberate. During that window, every infected machine checked in with police servers, which identified it and gave administrators time to investigate before the evidence on their own systems disappeared. Germany’s Federal Criminal Police Office (BKA), which carried out the April removal, said more than 50,000 systems had been redirected to its infrastructure, and that identifying them was “necessary in order to seize evidence”.
Exhibit 1 (illustrative). What the scheduled removal changed on an infected Windows machine, following the steps Malwarebytes described. Service, value and file names are placeholders; Emotet used varying names.
# Until 25 April 2021: law-enforcement version of Emotet, checking in with police servers
Autorun (Run) key: <random value> -> <path to Emotet DLL>
Windows service: <random name> -> <path to Emotet DLL>
# 25 April 2021: removal triggers on the local clock
- service <random name> deleted
- Run value <random value> deleted
- move <Emotet DLL> -> %TEMP% attempted, failed
- process exits
# After: no autostart, no running Emotet; the DLL file itself may remain on disk
The operation was not uncontroversial. Malwarebytes noted that “pushing code via a botnet, even with good intentions, has always been a thorny topic”. An FBI affidavit was careful to state that “foreign law enforcement agents, not FBI agents, replaced the Emotet malware” on US victims’ computers. The phrasing shows how sensitive the question still was in 2021, even for an operation most of the security community welcomed.
Qakbot, August 2023: the uninstaller as an order
Two and a half years later, the FBI went a step further. Operation Duck Hunt, led by the FBI’s Los Angeles office with partners in France, Germany, the Netherlands, the United Kingdom, Romania and Latvia, did not wait months and did not need a timer. It told Qakbot to shut itself down as soon as each bot checked in.
Qakbot was organised in three tiers, as BleepingComputer’s reconstruction of the operation describes:
- Tier 1: infected machines running a “supernode” module, which relayed traffic for other bots. Every infected computer checked in with a built-in list of these every one to four minutes.
- Tier 2: command servers rented by the operators, mostly outside the United States.
- Tier 3: central servers that issued commands and delivered modules and ransomware payloads.
Exhibit 2. Qakbot’s three tiers, and the point where the FBI took over.

The FBI never had to reach the operators’ central servers. Controlling the relay layer was enough to cut the operators off and to speak to every bot that checked in.
The operation unfolded in three steps:
- Keys. The FBI got into the operators’ own administration computers and obtained the encryption keys used to talk to the supernodes.
- Supernodes. Using a computer it controlled, the FBI contacted each Tier 1 supernode and replaced its relay module with a law-enforcement version. The new module used keys the operators did not have, which locked them out of their own network.
- Uninstaller. From the hijacked supernodes, the FBI sent each bot that checked in a small piece of shellcode. It unpacked a custom DLL that sent the running Qakbot the command
QPCMD_BOT_SHUTDOWN: Qakbot’s own instruction to stop. Because Qakbot ran injected into the memory of another process, stopping it needed no file to be written to or deleted from disk.
SecureWorks first saw the uninstaller being pushed on the evening of 25 August 2023, US Eastern time. The FBI announced the operation on 29 August, together with the seizure of $8.6 million in cryptocurrency.
The Justice Department was precise about the limits. The uninstaller disconnected the computer from the botnet and prevented Qakbot from installing more malware. It “did not involve access to or modification of the information of the owners and users”, and it did not remove other malware already on the machines. SecureWorks added a technical caveat: the tool made no attempt to delete Qakbot’s files or its persistence entries from disk. In SecureWorks’ tests the infection did not come back after a reboot, but the leftovers remained.
The FBI also did not know how many machines it had cleaned. Each infected computer would receive the uninstaller only when it next connected. Notification was left to partners: CISA, the Shadowserver Foundation, Microsoft’s Digital Crimes Unit, the National Cyber Forensics and Training Alliance and Have I Been Pwned.
Four operations side by side
Put next to each other, the operations in this series trace how far the idea of acting on victims’ machines has moved in twelve years.
| Coreflood (2011) | Emotet (2021) | Qakbot (2023) | Mozi (2023) | |
|---|---|---|---|---|
| Who acted | FBI, under a US court order | Police in eight countries | FBI and six partner countries | Unknown |
| Owners’ consent | Required for removal; given by 24 victims | Not asked | Not asked | Not asked |
| What was sent | A stop command; uninstall only to consenting victims | A law-enforcement version with a removal date | Shellcode and a DLL that issued Qakbot’s own shutdown command | A signed configuration and a replacement binary |
| What changed on the machine | Malware paused until reboot; about 19,000 machines cleaned | Emotet service and autorun key deleted on 25 April | Running process stopped; nothing written to or deleted from disk | Mozi process killed, SSH services stopped, device settings and firewall rules changed |
| Left behind | Malware on unconsented machines | The Emotet file, and anything Emotet had installed | Qakbot files, persistence entries and any other malware | A neutered binary with persistence |
| Made public | Court filings and press releases | Press releases and court filings | Press releases | Only through ESET’s research |
Three trends stand out. Consent dropped away: in 2011 it was the condition for removal, by 2021 nobody asked. Authority moved to courts: in the United States, an amendment to Rule 41 of the Federal Rules of Criminal Procedure that took effect on 1 December 2016 let a single judge authorise a remote search warrant when a crime involved hacked computers in five or more judicial districts, which describes almost every botnet (Justice Department). And the operations kept their footprint small. Both Emotet’s and Qakbot’s uninstallers removed only what they had to, and Qakbot’s touched nothing on disk at all.
The objections have not gone away. When the Rule 41 change took effect, the Electronic Frontier Foundation warned that it allowed the government to access the computers of people who were themselves victims, and that the rule “contains no privacy protections” for them. It also pointed to the risk of collateral damage: code pushed into a large and varied population of machines can malfunction in ways nobody tested. The Emotet and Qakbot operations were careful precisely because those risks are real.
Mozi sits outside every row of this pattern. It is the only one in which nobody knows who acted, and the only one that changed the configuration of the devices it touched. The contrast is the best argument for doing this kind of operation in the open: when it is done under a court order and announced, someone is answerable for what it changed.
The comebacks
Neither operation ended its gang. Both ended a botnet.
Emotet came back in under seven months. Around 13 and 14 November 2021, researchers saw TrickBot, a botnet that Emotet itself had once distributed, start installing Emotet on machines it had already infected. The research group Cryptolaemus, which had tracked Emotet for years, told The Record: “This is something they have done before and we knew it could be a way to come back.” The servers and the bots had been taken away; the people, their code and their partners had not.
Qakbot’s leader changed methods. In May 2025 the US Justice Department unsealed an indictment against Rustam Gallyamov, a 48-year-old Moscow resident, alleging that he had developed and controlled Qakbot since 2008. According to the indictment, after the 2023 takedown his group switched to “spam bomb” attacks, flooding employees’ inboxes and then persuading them to grant system access, and used them against US victims as recently as January 2025. Prosecutors also filed to forfeit more than $24 million in cryptocurrency seized from him. He is presumed innocent unless proven guilty.
The response grew too. The Gallyamov charges were part of Operation Endgame, which Europol launched in May 2024 and called the “largest ever operation against botnets”. Its first phase went after six loaders at once, IcedID, SystemBC, Pikabot, SmokeLoader, Bumblebee and TrickBot, which Europol linked to at least 15 ransomware groups. More than 100 servers were taken down or disrupted, more than 2,000 domains seized, and four people arrested, according to The Record. Europol’s message was that “Operation Endgame does not end today”.
The pattern is consistent across this series. Taking over a botnet’s infrastructure and cleaning its bots buys time and costs the operators money. It does not stop people who live beyond the reach of an arrest warrant. Endgame’s shift from single botnets to the whole ecosystem of loaders is the attempt to make that time count.
Hunting the pattern today
Loaders change names, servers and payloads constantly, but their first minutes on a machine look much the same. A user opens something that arrived by email; an Office application, a script host or a shortcut starts a built-in Windows tool such as rundll32.exe or regsvr32.exe; that tool loads a DLL from a user-writable folder; and an autostart entry appears so the DLL comes back after a reboot. Emotet’s uninstaller removed exactly those autostart entries, which tells you where to look.
The takedowns also leave a second hunting task. Neither uninstaller deleted the malware’s files, and neither touched what the loaders had already delivered. A machine that was once part of Emotet or Qakbot should be checked for leftovers and for whatever came after.
Exhibit 3a: Sigma, Office or script host starting a DLL loader. Process creation where an email-borne parent starts rundll32 or regsvr32. Tune against your own legitimate add-ins and macros.
title: Office or Script Host Spawns DLL Loader
id: 8b3d1f62-4c7e-4a19-b2d5-7e0c9a6f1d38
status: experimental
description: Office application, script host or mail client starting rundll32 or regsvr32, a common first step of loader malware such as Emotet and Qakbot
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith:
- '\winword.exe'
- '\excel.exe'
- '\outlook.exe'
- '\wscript.exe'
- '\cscript.exe'
- '\mshta.exe'
selection_child:
Image|endswith:
- '\rundll32.exe'
- '\regsvr32.exe'
condition: selection_parent and selection_child
falsepositives:
- Legitimate add-ins that register DLLs
level: high
Exhibit 3b: Splunk, autostart pointing to a DLL in a user folder. Sysmon registry events (event 13) that set a Run key to rundll32 or regsvr32 with a path under the user profile or a temporary folder. This also finds leftovers of the kind the takedowns did not remove.
index=sysmon EventCode=13
TargetObject="*\\CurrentVersion\\Run\\*"
(Details="*rundll32*" OR Details="*regsvr32*")
(Details="*\\AppData\\*" OR Details="*\\Temp\\*" OR Details="*\\ProgramData\\*")
| stats earliest(_time) AS first_seen latest(_time) AS last_seen
values(Details) AS command values(Image) AS writer
BY host, TargetObject
| convert ctime(first_seen) ctime(last_seen)
Exhibit 3c: KQL (Microsoft Defender for Endpoint). Joins the two signals: a DLL loader started by an Office or script process, followed within ten minutes on the same device by a Run-key entry that points to a user-writable folder.
let window = 10m;
let Loads = DeviceProcessEvents
| where Timestamp > ago(7d)
| where InitiatingProcessFileName in~ ("winword.exe", "excel.exe", "outlook.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| where FileName in~ ("rundll32.exe", "regsvr32.exe")
| project LoadTime = Timestamp, DeviceId, DeviceName, Parent = InitiatingProcessFileName, LoaderCmd = ProcessCommandLine;
let Autostarts = DeviceRegistryEvents
| where Timestamp > ago(7d)
| where RegistryKey has @"\CurrentVersion\Run"
| where RegistryValueData has_any ("rundll32", "regsvr32")
| where RegistryValueData has_any (@"\AppData\", @"\Temp\", @"\ProgramData\")
| project RegTime = Timestamp, DeviceId, RegistryKey, RegistryValueName, RegistryValueData;
Loads
| join kind=inner Autostarts on DeviceId
| where RegTime between (LoadTime .. LoadTime + window)
| project LoadTime, DeviceName, Parent, LoaderCmd, RegistryValueName, RegistryValueData
The preventive controls are the ones that took email-borne loaders off the front page: block macros in files from the Internet, which Microsoft made the default for Office in 2022; filter or block risky attachment types at the mail gateway; and treat any machine that ever hosted a loader as compromised beyond the loader itself. If a takedown notification names one of your systems, assume the access was sold before the botnet fell.
What I take away
Removal without consent is now normal, and that is a reason for more care, not less. In 2011 the FBI removed Coreflood only where owners signed a form. By 2023 an uninstaller reached every Qakbot bot that called home. I think that change is justified for loaders that sell access to ransomware groups. But the safeguards that made Emotet and Qakbot acceptable, court authority, public announcement, minimal changes and clear limits, are what separate them from Mozi’s anonymous kill switch. They should be treated as requirements, not courtesies.
Do the least that works. The best-designed action in this series is also the smallest. Qakbot’s uninstaller used the malware’s own shutdown command and wrote nothing to disk. The same principle applies to any change we push to a fleet we do not fully control: the narrower the change, the fewer the ways it can break someone’s system.
A takedown is not an incident response. Neither uninstaller deleted the malware’s files, and neither touched what the loaders had already delivered. For the owner of an infected machine, a takedown is a notification, not a fix.
Infrastructure falls; people and partnerships return. Emotet returned through TrickBot within seven months. Qakbot’s alleged leader switched to new methods. Lasting damage to a criminal ecosystem needs operations like Endgame that hit several of its parts at once, and arrests where they are possible.
Every operation in this part relied on taking over a botnet that already existed. The next part goes back to where the peer-to-peer design that made such takeovers so hard began: Storm Worm in 2007, and its successor Waledac, the botnet against which Microsoft first used the courts to take a botnet down.
Sources
- US Department of Justice: Emotet botnet disrupted in international cyber operation (January 2021)
- The Hacker News: European authorities disrupt Emotet (January 2021)
- TechTarget: Remaining Emotet infections uninstalled by German police (April 2021)
- The Record: Emotet botnet returns after law enforcement mass-uninstall operation (November 2021)
- US Department of Justice: Qakbot malware disrupted in international cyber takedown (August 2023)
- BleepingComputer: How the FBI nuked Qakbot malware from infected Windows PCs (August 2023), including SecureWorks’ analysis
- US Department of Justice: Leader of Qakbot malware conspiracy indicted (May 2025)
- The Record: Operation Endgame dropper malware takedown (May 2024)
- US Department of Justice: Rule 41 changes ensure a judge may consider warrants for certain remote searches (2016)
- Electronic Frontier Foundation: Expanded government hacking powers need accompanying safeguards (December 2016)
- Earlier parts of this series: Coreflood, Conficker, GameOver Zeus, Mirai and Mozi
Pingback: Mozi: The Botnet That Signed Its Own Death Warrant - Taner Güngör