Skip to content
SecArsenal
Educational and ethical use only. Only test systems you own or are explicitly authorized to test. Full disclaimer.

donut-shellcode

Generates position-independent shellcode from memory and runs them

resource-developmentdefense-evasionRed Team

Matches ATT&CK tactic: Resource Development ↗ · Matches ATT&CK tactic: Stealth ↗

Official docs ↗Download ↗Source repo ↗

Platforms: Linux · Last verified September 6, 2026

Donut is a position-independent code that enables in-memory execution of VBScript, JScript, EXE, DLL files and dotNET assemblies. A module created by Donut can either be staged from a HTTP server or embedded directly in the loader itself. The module is optionally encrypted using the Chaskey block cipher and a 128-bit randomly generated key. After the file is loaded and executed in memory, the original reference is erased to deter memory scanners. The generator and loader support the following features: - Compression of input files with aPLib and LZNT1, Xpress, Xpress Huffman via RtlCompressBuffer. - Using entropy for API hashes and generation of strings. - 128-bit symmetric encryption of files. - Patching Antimalware Scan Interface (AMSI) and Windows Lockdown Policy (WLDP). - Patching command line for EXE files. - Patching exit-related API to avoid termination of host process. - Multiple output formats: C, Ruby, Python, PowerShell, Base64, C#, Hexadecimal.

Only use this tool against systems you own or are explicitly authorized to test — see the disclaimer.

Getting started

Install on Kali Linux with `sudo apt install donut`. See the official Kali tool page and upstream homepage linked above for full usage and configuration details.

Commonly preinstalled on

Kali Linux

Debian-based distribution built for penetration testing and security auditing