Donut Injector is an open-source payload injection framework that threat actors have weaponized to deliver malware directly into computer memory, bypassing many traditional antivirus defenses. Originally developed as a legitimate penetration testing tool, this injector has been observed in real-world attacks against U.S. organizations and defense contractors. Unlike standalone malware, Donut acts as a delivery mechanism that loads other malicious payloads — scripts, executables, or .NET assemblies — without writing them to disk, making detection significantly more difficult.
Think you're infected right now? Disconnect from the internet immediately (unplug Ethernet or disable Wi-Fi). Do not attempt online banking or enter passwords until the machine is cleaned. Donut-delivered payloads often include credential stealers or remote access tools. Call us at (770) 679-6092 for same-day diagnostic service.

Threat Profile

Threat NameDonut Injector
TypeIn-memory payload loader / shellcode generator
PlatformWindows (all versions)
File TypeWindows PE executable (typically injected shellcode)
First Documented2019 (public release on GitHub)
Distribution MethodPhishing attachments, exploit kits, malicious macros, supply chain compromise
Primary RiskDelivers secondary payloads (ransomware, spyware, RATs) without disk writes
Known TargetsU.S. organizations, defense contractors, enterprise networks
Detection DifficultyHigh — operates entirely in memory, minimal forensic footprint
Engine AliasesDonut, donut_injector, Trojan.Inject.Donut (varies by vendor)
Data Last UpdatedAugust 2026 (Malpedia)
Public Repositorygithub.com/TheWover/donut (tool misused by attackers)

How It Spreads

Donut Injector itself doesn't spread autonomously like a worm. Instead, attackers use it as a stealthy delivery vehicle for other malware. The tool converts executable payloads into position-independent shellcode, which can then be injected into legitimate Windows processes. This technique, called process hollowing or reflective loading, allows malicious code to run under the guise of trusted applications like explorer.exe or svchost.exe. The injector typically reaches your machine through initial compromise vectors controlled by the attacker. Once the first-stage malware (a dropper or macro-enabled document) executes, it downloads or decrypts the Donut-generated shellcode and injects it directly into memory. Because the final payload never touches the hard drive as a conventional file, signature-based antivirus often misses it entirely. Symantec's Threat Hunter Team documented this technique in attacks where Donut was used to load Cobalt Strike beacons and other post-exploitation frameworks. Common distribution methods include: - **Phishing emails** with malicious Office documents containing VBA macros that invoke Donut-generated shellcode - **Exploit kits** targeting browser or software vulnerabilities to inject payloads silently - **Software supply chain attacks** where legitimate installers are trojanized with Donut loaders - **Compromised websites** serving drive-by download scripts that execute Donut shellcode - **Lateral movement tools** used by attackers already inside a network to deploy payloads to additional machines - **Malicious PowerShell scripts** downloaded from attacker-controlled servers that decode and execute Donut payloads

What It Does On Your Machine

Donut Injector's sole purpose is execution — it exists to run other programs in a way that evades detection. When the injector runs, it allocates executable memory space within a running process, copies the shellcode payload into that space, and transfers execution control to it. The host process continues to appear legitimate in Task Manager and to security software, while the malicious code operates hidden within its memory space. The actual damage depends entirely on what payload Donut delivers. In documented attacks against U.S. defense contractors, threat actors used Donut to load remote access trojans (RATs) that exfiltrated sensitive engineering documents and credentials. Other campaigns have deployed ransomware, credential dumpers like Mimikatz, or network reconnaissance tools. The common thread is stealth: because the payload never appears as a file on disk, traditional forensic analysis often finds no evidence of infection even after data theft or system compromise.
// Example process injection (observed in sandbox environments) Injected Process: C:\Windows\System32\RuntimeBroker.exe Memory Region: 0x7FF6A2E10000 (RWX permissions — executable shellcode) Network Activity: Outbound HTTPS to attacker C2 Payload Behavior: Credential harvesting, keylogging, screen capture // Typical fileless indicators (no standalone .exe dropped) Registry Keys Modified: HKCU\Software\Microsoft\Windows\CurrentVersion\Run Persistence via scheduled task or WMI event subscription // PowerShell execution logs (if logging enabled) EventID 4104: Script block logging shows Base64-encoded Donut loader
The injector leaves minimal artifacts. You won't find a file named "donut.exe" sitting in your Downloads folder. Instead, forensic traces appear in Windows Event Logs (if PowerShell script block logging is enabled), memory dumps, and network traffic showing unexpected connections from legitimate processes. Behavioral detection systems may flag unusual memory allocation patterns or process hollowing techniques, but many endpoint security products still struggle with fileless threats. Because Donut is open-source and well-documented, sophisticated attackers customize it extensively. They may encrypt the shellcode, obfuscate the injection routine, or chain multiple stages to further complicate analysis. Some variants persist across reboots by modifying registry keys or creating scheduled tasks that reinject the payload when the system restarts.

Manual Removal — Step by Step

01

Disconnect from the network immediately

Unplug your Ethernet cable or turn off Wi-Fi. Donut-delivered payloads often communicate with command-and-control servers, and severing the connection prevents further data exfiltration or additional payload downloads.

Donut Injector — cybersecurity illustration
Photo by Tima Miroshnichenko on Pexels
02

Boot into Safe Mode with Networking

Restart your computer and press F8 (or Shift+F8 on newer systems) during boot. Select "Safe Mode with Networking" from the Advanced Boot Options menu. This loads only essential drivers and services, often preventing injected payloads from executing.

03

Run Windows Defender Offline Scan

Open Windows Security, navigate to Virus & Threat Protection, and select "Scan options." Choose "Microsoft Defender Offline Scan" and click "Scan now." This pre-boot environment can detect rootkits and memory-resident threats that hide from standard scans.

04

Use specialized anti-malware tools

Download Malwarebytes (from another clean computer if necessary) and run a full Threat Scan. Also run HitmanPro or Emsisoft Emergency Kit — these tools use behavioral detection rather than signatures, improving chances of catching fileless payloads.

05

Check for persistence mechanisms

Open Task Scheduler (taskschd.msc) and review all scheduled tasks, especially those in the Microsoft\Windows folders. Delete any unfamiliar tasks. Also check Startup items using MSConfig (System Configuration) and remove suspicious entries.

06

Examine running processes in Process Explorer

Download Microsoft's Process Explorer (Sysinternals suite) and run it. Look for processes with unusual parent-child relationships or legitimate processes (like RuntimeBroker.exe or svchost.exe) making network connections to unfamiliar IPs. Right-click suspicious processes and select "Kill Process Tree."

07

Clear temporary files and caches

Run Disk Cleanup (cleanmgr.exe) and select all options including "Temporary files" and "Downloaded Program Files." Also manually delete contents of %TEMP%, %LOCALAPPDATA%\Temp, and C:\Windows\Temp directories.

08

Review PowerShell execution logs

Open Event Viewer and navigate to Applications and Services Logs > Microsoft > Windows > PowerShell > Operational. Look for EventID 4104 entries containing Base64-encoded scripts or references to "Invoke-Expression" or "DownloadString." These indicate PowerShell-based injection attempts.

09

Reset browser settings and credentials

Assume all passwords stored in browsers are compromised. Reset each browser to default settings, then change passwords for banking, email, and other critical accounts from a known-clean device. Enable two-factor authentication wherever possible.

10

Perform a clean Windows reinstall if uncertainty remains

If scans detect nothing but suspicious behavior persists, or if the infection was discovered on a business machine handling sensitive data, the safest option is a complete Windows reinstall. Back up personal files (scan them on another machine first), then perform a clean install from Microsoft's Media Creation Tool.

Prevention

Preventing Donut Injector infections requires defense-in-depth, since the tool itself is stealthy and the real threat comes from what it delivers:
  1. Enable PowerShell script block logging — Open Group Policy Editor (gpedit.msc), navigate to Computer Configuration > Administrative Templates > Windows Components > Windows PowerShell, and enable "Turn on PowerShell Script Block Logging." This creates forensic records of PowerShell-based injection attempts.
  2. Disable macros in Office documents — Configure Office applications to disable macros from internet sources. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings and select "Disable all macros except digitally signed macros."
  3. Deploy application whitelisting — Use Windows Defender Application Control (WDAC) or AppLocker to restrict which executables, scripts, and DLLs can run. This prevents unauthorized code execution even if an attacker gains initial access.
  4. Keep software fully patched — Enable automatic updates for Windows, browsers, Java, Adobe products, and all other software. Exploit kits frequently deliver Donut payloads through unpatched vulnerabilities.
  5. Use endpoint detection and response (EDR) tools — Consumer antivirus often misses fileless threats. Small businesses should consider enterprise-grade EDR solutions like Microsoft Defender for Endpoint, CrowdStrike, or SentinelOne that monitor process behavior and memory allocations.
  6. Implement email filtering and sandboxing — Configure email gateways to quarantine attachments with macros, scripts, or executables. Consider sandbox-based analysis for suspicious emails before they reach user inboxes.
  7. Restrict administrative privileges — Run user accounts with standard privileges, not admin rights. Many injection techniques require elevated permissions to succeed. Use separate admin accounts only for system maintenance tasks.
  8. Train users to recognize phishing — Since most Donut infections begin with social engineering, regular security awareness training reduces the likelihood users will open malicious attachments or click dangerous links.
Our 90-Day Warranty — When Computer Repair Roswell removes malware from your system, we guarantee it stays gone. If the same infection returns within 90 days, we'll fix it again at no charge. We also provide a written report of what was found and removed, plus personalized prevention recommendations for your specific situation.

Bring It In

Fileless threats like Donut Injector represent a significant challenge for do-it-yourself removal. Even after following every manual step, you can't easily verify whether injected payloads left behind additional backdoors, credential theft occurred, or network configurations were altered. Our diagnostic process includes memory forensics, network traffic analysis, and filesystem integrity checks that go far beyond what consumer antivirus provides. We're located in Roswell, Georgia, and we handle these infections daily. Bring your machine to our shop at your convenience — no appointment necessary during business hours — or call us at **(770) 679-6092** to discuss your symptoms. Most malware removals are completed same-day, and we'll explain exactly what we found and what it means for your personal or business data security. Don't gamble with partial removal when complete peace of mind is one visit away.