Documentation Index

← maldev README

The navigation spine for everything in docs/. Three ways in, depending on what you came for.

[!TIP] If you don't know where to start, pick a role first; the role page walks you through a curated reading order.

By role

RoleWhat you get
🟥 Operator (red team)Production chains, OPSEC, payload delivery, common scenarios
🔬 Researcher (R&D)Architecture, Caller pattern, paper references, Windows-version deltas
🟦 Detection engineer (blue team)Per-technique artifacts, telemetry, D3FEND counters, hunt examples

By technique area

Each area page lists every technique in the area with a one-liner; click through for the full template (Primer / How It Works / API / Examples / OPSEC / MITRE / Limitations / See also).

AreaPagesWhat's covered
c26reverse shell + reconnect, transport (TLS/JA3), Meterpreter staging, multicat, named pipe
cleanup7self-delete, secure wipe, timestomp, ADS, BSOD, service hide
collection5keylog, clipboard, screenshot, ADS, LSASS dump
credentials4LSASS dump, sekurlsa parser, SAM offline, Golden Ticket
crypto1payload encryption (AES-GCM, ChaCha20) and signature-breaking transforms (XTEA, S-Box, Matrix, ArithShift, XOR)
encode1Base64 (std + URL), UTF-16LE, ROT13, PowerShell -EncodedCommand
hash2cryptographic hashes (MD5/SHA-*), ROR13 API hashing, fuzzy hashes (ssdeep, TLSH)
evasion19AMSI/ETW patches, ntdll unhook, sleep mask, ACG, BlockDLLs, callstack spoof, kernel callback removal, anti-VM/sandbox/timing
injection12CreateThread, EarlyBird APC, ThreadHijack, SectionMap, KernelCallback, Phantom DLL, ThreadPool, NtQueueApcThreadEx, EtwpCreateEtwThread, …
pe7strip & sanitize, BOF loader, morph, PE-to-shellcode, certificate theft, masquerade
persistence6Run/RunOnce, startup folder LNK, scheduled task, service, account creation
runtime2BOF / COFF loader, in-process .NET CLR hosting
syscalls3direct & indirect syscalls, API hashing (ROR13, FNV1a, …), SSN resolvers (Hell's / Halo's / Tartarus / Hash Gate)
tokens3token theft, impersonation, privilege escalation

By MITRE ATT&CK ID

T-IDPackages
T1003.001credentials/lsassdump · credentials/sekurlsa
T1003.002credentials/samdump
T1014kernel/driver · kernel/driver/rtcore64
T1016recon/network · win/domain
T1021.002c2/transport/namedpipe
T1027crypto · encode · evasion/hook/shellcode · evasion/sleepmask · win/api
T1027.002pe · pe/morph · pe/parse · pe/strip
T1027.005pe/strip · process/tamper/herpaderping · process/tamper/hideprocess · recon/hwbp
T1027.007win/syscall
T1027.013crypto
T1036evasion/callstack · evasion/stealthopen
T1036.005pe · pe/masquerade · process · process/tamper/fakecmd
T1053.005persistence · persistence/scheduler
T1055c2/meterpreter · inject · process/tamper/herpaderping
T1055.001inject · pe · pe/srdi
T1055.003inject
T1055.004inject
T1055.012inject
T1055.013process · process/tamper/herpaderping
T1055.015inject
T1056.001collection · collection/keylog
T1057process · process/enum
T1059c2 · c2/meterpreter · c2/shell · runtime/bof · runtime/clr
T1059.001c2/shell
T1059.003c2/shell
T1059.004c2/shell
T1068credentials/lsassdump · kernel/driver · kernel/driver/rtcore64 · privesc/cve202430088
T1070cleanup · cleanup/memory
T1070.004cleanup · cleanup/selfdelete · cleanup/wipe
T1070.006cleanup · cleanup/timestomp
T1071c2 · c2/transport · evasion/hook/bridge
T1071.001c2 · c2/meterpreter · c2/transport/namedpipe · useragent
T1078win/privilege
T1082win/domain · win/version
T1083recon/drive · recon/folder
T1095c2 · c2/meterpreter · c2/transport
T1098persistence/account
T1106pe · pe/imports · win/api · win/ntapi · win/syscall
T1113collection · collection/screenshot
T1115collection · collection/clipboard
T1120recon/drive
T1134win/privilege · win/token
T1134.001privesc/cve202430088 · process/session · win/impersonate · win/token
T1134.002process · process/session · win/impersonate · win/token
T1134.004win/impersonate
T1134.005win/token
T1136.001persistence · persistence/account
T1204.002persistence · persistence/lnk
T1497evasion · recon/sandbox
T1497.001recon/antivm
T1497.003recon/timing
T1529cleanup · cleanup/bsod
T1543.003cleanup · cleanup/service · kernel/driver · kernel/driver/rtcore64 · persistence · persistence/service
T1547.001persistence · persistence/registry · persistence/startup
T1547.009persistence · persistence/lnk · persistence/startup
T1548.002privesc/uac · recon/dllhijack · win/privilege
T1550.002credentials/sekurlsa
T1553.002pe · pe/cert
T1558.001credentials/goldenticket
T1558.003credentials/sekurlsa
T1562.001evasion · evasion/acg · evasion/amsi · evasion/blockdlls · evasion/cet · evasion/etw · evasion/kcallback · evasion/preset · evasion/unhook
T1562.002process · process/tamper/phant0m
T1564cleanup/service · process/tamper/fakecmd
T1564.001process · process/tamper/hideprocess
T1564.004cleanup · cleanup/ads
T1571c2 · c2/multicat
T1573c2 · c2/transport
T1573.001c2/cert
T1573.002c2 · c2/cert · c2/transport
T1574.001pe/dllproxy · recon/dllhijack
T1574.002pe/dllproxy
T1574.012evasion · evasion/hook · evasion/hook/bridge · evasion/hook/shellcode
T1620pe/srdi · runtime/bof · runtime/clr
T1622evasion · recon/antidebug · recon/hwbp

By package

Grouped by area, expandable. Click any package name to jump to its pkg.go.dev godoc; expand an area to scan every package's detection level and one-line summary in one place.

Each area is collapsed by default — click to expand. Detection level is the canonical 5-level scale (very-quietvery-noisy); umbrella / variable packages show as .

Layer 0 — pure-Go primitives (`crypto`, `encode`, `hash`, `random`, `useragent`) — 5 packages
PackageDetectionSummary
cryptovery-quietprovides cryptographic primitives for payload encryption / decryption and lightweight obfuscation
encodevery-quietprovides encoding / decoding utilities for payload transformation: Base64 (standard + URL-safe), UTF-16LE (Windows API strings), ROT13, and PowerShell -EncodedCommand format
hashvery-quietprovides cryptographic and fuzzy hash primitives for integrity verification, API hashing, and similarity detection
randomvery-quietprovides cryptographically secure random generation helpers backed by crypto/rand (OS entropy)
useragentvery-quietprovides a curated database of real-world browser User-Agent strings for HTTP traffic blending
Windows primitives — `win/*` — 10 packages
PackageDetectionSummary
winis the parent umbrella for Windows-only primitives
win/apivery-quietis the single source of truth for Windows DLL handles, procedure references, and structures shared across maldev
win/comholds Windows COM helpers shared across maldev
win/domainvery-quietqueries Windows domain-membership state — whether the host is workgroup-only, joined to an Active Directory domain, or in an unknown state
win/impersonatemoderateruns callbacks under an alternate Windows security context — by credential, by stolen token, or by piggy- backing on a target PID
win/ntapiquietexposes a small set of typed Go wrappers over ntdll!Nt* functions that maldev components use frequently — memory allocation, write/protect, thread creation, and system information query
win/privilegemoderateanswers two operational questions: am I admin right now, and how do I run something else as a different principal? It wraps IsAdmin / IsAdminGroupMember for privilege detection and three execution primitives — ExecAs, CreateProcessWithLogon, ShellExecuteRunAs — for spawning processes under alternate credentials
win/syscallquietprovides five strategies for invoking Windows NT syscalls — from a hookable kernel32 call to fully indirect SSN dispatch through an in-ntdll syscall;ret gadget (heap stub or Go-assembly stub) — under one uniform [Caller] interface
win/tokenmoderatewraps Windows access-token operations: open/duplicate process and thread tokens, steal a token from another PID, enable or remove individual privileges, query integrity level, and retrieve the active interactive session's primary token
win/versionvery-quietreports the running Windows OS version, build, and patch level — bypassing the manifest-compatibility shim that masks GetVersionEx results to the manifest-declared compatibility target
Kernel BYOVD — `kernel/driver/*` — 2 packages
PackageDetectionSummary
kernel/driververy-noisydefines the kernel-memory primitive interfaces consumed by EDR-bypass packages that need arbitrary kernel reads or writes (kcallback, lsassdump PPL-bypass, callback-array tampering, …)
kernel/driver/rtcore64very-noisywraps the MSI Afterburner RTCore64.sys signed driver (CVE-2019-16098) as a [kernel/driver.ReadWriter] primitive
Evasion — `evasion/*` — 15 packages
PackageDetectionSummary
evasionis the umbrella for active EDR / AV evasion
evasion/acgquietenables Arbitrary Code Guard for the current process so the kernel refuses any further VirtualAlloc(PAGE_EXECUTE) / VirtualProtect(PAGE_EXECUTE) requests
evasion/amsinoisydisables the Antimalware Scan Interface in the current process via runtime memory patches on amsi.dll
evasion/blockdllsquietapplies the PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES mitigation so the loader refuses any DLL that isn't Microsoft-signed
evasion/callstackquietsynthesises a return-address chain so a stack walker at a protected-API call site sees frames that originate from a benign thread-init sequence rather than from the attacker module
evasion/cetnoisyinspects and relaxes Intel CET (Control-flow Enforcement Technology) shadow-stack enforcement for the current process, and exposes the ENDBR64 marker required by CET-gated indirect call sites
evasion/etwmoderateblinds Event Tracing for Windows in the current process by patching the ETW write helpers in ntdll.dll with xor rax,rax; ret
evasion/hooknoisyinstalls x64 inline hooks on exported Windows functions: patch the prologue with a JMP to a Go callback, automatically generate a trampoline for calling the original, and fix up RIP-relative instructions in the stolen prologue
evasion/hook/bridgemoderateis the bidirectional control channel between a hook handler installed inside a target process and the implant that placed it
evasion/hook/shellcodenoisyships pre-fabricated x64 position-independent shellcode blobs used as handler bodies for [github.com/oioio-space/maldev/evasion/hook].RemoteInstall
evasion/kcallbackvery-noisyenumerates and removes kernel-mode callback registrations that EDR products use to observe process/thread/image- load events from the kernel side
evasion/presetbundles evasion.Technique primitives into three validated risk levels for one-shot deployment
evasion/sleepmaskquietencrypts the implant's payload memory while it sleeps so concurrent memory scanners cannot recover the original shellcode bytes or PE headers
evasion/stealthopenquietreads files via NTFS Object ID (the 128-bit GUID stored in the MFT) instead of by path, bypassing path-based EDR hooks on NtCreateFile / CreateFileW
evasion/unhooknoisyrestores the original prologue bytes of ntdll.dll functions, removing inline hooks installed by EDR/AV products
Injection — `inject` — 1 package
PackageDetectionSummary
injectnoisyprovides unified shellcode injection across Windows and Linux with a fluent builder, decorator middleware, and automatic fallback between methods
PE manipulation — `pe/*` — 9 packages
PackageDetectionSummary
peis the umbrella for Portable Executable analysis, manipulation, and conversion utilities
pe/certquietmanipulates the PE Authenticode security directory — read, copy, strip, and write WIN_CERTIFICATE blobs without any Windows crypto API
pe/dllproxyvery-quietemits a valid Windows DLL — as raw bytes, no external toolchain — that forwards every named export back to a legitimate target DLL
pe/importsvery-quietenumerates a PE's import directory — every DLL dependency and every imported function name — without invoking any Windows API
pe/masqueradequietclones a Windows PE's identity — manifest, icons, VERSIONINFO, optional Authenticode certificate — into a linkable .syso COFF object so a Go binary picks them up at compile time
pe/morphmoderatemutates UPX-packed PE headers so automatic unpackers fail to recognise the input
pe/parsevery-quietprovides PE file parsing and modification utilities
pe/srdimoderateconverts PE / .NET / script payloads into position-independent shellcode via the Donut framework (github.com/Binject/go-donut)
pe/stripquietsanitises Go-built PE binaries by removing toolchain artefacts that fingerprint the producer
Runtime loaders — `runtime/*` — 2 packages
PackageDetectionSummary
runtime/bofmoderateloads and executes Beacon Object Files (BOFs) — compiled COFF object files (.o) — entirely in process memory
runtime/clrmoderatehosts the .NET Common Language Runtime in process via the ICLRMetaHost / ICorRuntimeHost COM interfaces and executes managed assemblies from memory without writing them to disk
Recon — `recon/*` — 9 packages
PackageDetectionSummary
recon/antidebugquietdetects whether a debugger is currently attached to the implant — Windows via IsDebuggerPresent (PEB BeingDebugged), Linux via /proc/self/status TracerPid
recon/antivmquietdetects virtual machines and hypervisors via configurable check dimensions: registry keys, files, MAC prefixes, processes, CPUID/BIOS, and DMI info
recon/dllhijackmoderatediscovers DLL-search-order hijack opportunities on Windows — places where an application loads a DLL from a user-writable directory BEFORE reaching the legitimate copy (typically in System32)
recon/drivequietenumerates Windows logical drives and watches for newly connected removable / network volumes
recon/foldervery-quietresolves Windows special folder paths via two Shell32 entry points: [Get] (legacy SHGetSpecialFolderPathW, CSIDL-keyed) and [GetKnown] (modern SHGetKnownFolderPath, KNOWNFOLDERID-keyed)
recon/hwbpmoderatedetects and clears hardware breakpoints set by EDR products on NT function prologues — surviving the classic ntdll-on-disk-unhook pass
recon/networkvery-quietprovides cross-platform IP address retrieval and local-address detection
recon/sandboxquietis the multi-factor sandbox / VM / analysis-environment detector — a configurable orchestrator that aggregates checks across recon/antidebug, recon/antivm, and its own primitives into a single "is this a sandbox?" assessment
recon/timingquietprovides time-based evasion that defeats sandboxes which fast-forward Sleep() calls — sandboxes commonly hook Sleep / WaitForSingleObject to skip the delay and analyse what the implant does next
Process — `process/*` + `process/tamper/*` — 7 packages
PackageDetectionSummary
processis the umbrella for cross-platform process enumeration / management, plus the Windows-specific process-tamper sub-tree
process/enumquietprovides cross-platform process enumeration — list every running process or find one by name / predicate
process/sessionmoderateenumerates Windows sessions and creates processes / impersonates threads inside other users' sessions
process/tamper/fakecmdquietoverwrites the current process's PEB CommandLine UNICODE_STRING so process-listing tools (Process Explorer, wmic, Get-Process, Task Manager) display a fake command-line instead of the real one
process/tamper/herpaderpingmoderateimplements Process Herpaderping and the related Process Ghosting variant — kernel image-section cache exploitation that lets the running process execute one PE while the file on disk reads as another (or doesn't exist)
process/tamper/hideprocessmoderatepatches NtQuerySystemInformation in a target process so it returns STATUS_NOT_IMPLEMENTED, blinding that process's ability to enumerate running processes
process/tamper/phant0mnoisysuppresses Windows Event Log recording by terminating the EventLog service threads inside the hosting svchost.exe — the service stays "Running" in the SCM listing but no new entries are written
Credentials — `credentials/*` — 4 packages
PackageDetectionSummary
credentials/goldenticketnoisyforges Kerberos Golden Tickets — long-lived TGTs minted with a stolen krbtgt account hash
credentials/lsassdumpnoisyproduces a MiniDump blob of lsass.exe's memory so downstream tooling (credentials/sekurlsa, mimikatz, pypykatz) can extract Windows credentials
credentials/samdumpquietperforms offline NT-hash extraction from a SAM hive (with the SYSTEM hive supplying the boot key)
credentials/sekurlsaquietextracts credential material from a Windows LSASS minidump — the consumer counterpart to credentials/lsassdump
Collection — `collection/*` — 4 packages
PackageDetectionSummary
collectiongroups local data-acquisition primitives for post-exploitation: keystrokes, clipboard contents, screen captures
collection/clipboardquietreads and watches the Windows clipboard text
collection/keylognoisycaptures keystrokes via a low-level keyboard hook (SetWindowsHookEx(WH_KEYBOARD_LL))
collection/screenshotquietcaptures the screen via GDI BitBlt and returns PNG bytes
Cleanup — `cleanup/*` — 8 packages
PackageDetectionSummary
cleanupquietis the umbrella for on-host artefact removal / anti-forensics primitives that run after an operation completes
cleanup/adsquietprovides CRUD operations for NTFS Alternate Data Streams
cleanup/bsodvery-noisytriggers a Blue Screen of Death via NtRaiseHardError as a last-resort cleanup primitive
cleanup/memoryvery-quietprovides secure memory cleanup primitives for wiping sensitive data (shellcode, keys, credentials) from process memory
cleanup/selfdeletemoderatedeletes the running executable from disk while the process continues to execute from its mapped image
cleanup/servicenoisyhides Windows services from listing utilities by applying a restrictive DACL on the service object
cleanup/timestompquietresets a file's NTFS $STANDARD_INFORMATION timestamps so a dropped artifact blends with surrounding files
cleanup/wipequietoverwrites file contents with cryptographically random data before deletion to defeat trivial forensic recovery
Persistence — `persistence/*` — 7 packages
PackageDetectionSummary
persistenceis the umbrella for system persistence techniques — mechanisms that re-launch an implant across reboots and user logons
persistence/accountnoisyprovides Windows local user account management via NetAPI32 — create, delete, set password, manage group membership, enumerate
persistence/lnkquietcreates Windows shortcut (.lnk) files via COM/OLE automation — fluent builder API, fully Windows-only
persistence/registrymoderateimplements Windows registry Run / RunOnce key persistence — the canonical "auto-launch on logon" hook
persistence/schedulermoderatecreates, deletes, lists, and runs Windows scheduled tasks via the COM ITaskService API — no schtasks.exe child process
persistence/servicenoisyimplements Windows service persistence via the Service Control Manager — the highest-trust persistence mechanism available, running as SYSTEM at boot
persistence/startupmoderateimplements StartUp-folder persistence via LNK shortcut files — Windows Shell launches every shortcut in the folder at user logon
Privilege escalation — `privesc/*` — 2 packages
PackageDetectionSummary
privesc/cve202430088noisyimplements CVE-2024-30088 — a Windows kernel TOCTOU race in AuthzBasepCopyoutInternalSecurityAttributes that yields local privilege escalation to NT AUTHORITY\SYSTEM by overwriting the calling thread's primary token with lsass.exe's SYSTEM token
privesc/uacnoisyimplements four classic UAC-bypass primitives that hijack auto-elevating Windows binaries to spawn an elevated process without a consent prompt
C2 — `c2/*` — 7 packages
PackageDetectionSummary
c2provides command and control building blocks: reverse shells, Meterpreter staging, pluggable transports (TCP / TLS / uTLS / named pipe), mTLS certificate helpers, and session multiplexing
c2/certquietprovides self-signed X.509 certificate generation and fingerprint computation for C2 TLS infrastructure
c2/meterpreternoisyimplements Metasploit Framework staging — pulls a second-stage Meterpreter payload from a multi/handler and executes it in the current process or a target picked via the optional Config.Injector
c2/multicatquietprovides a multi-session reverse-shell listener for operator use
c2/shellnoisyprovides a reverse shell with automatic reconnection, PTY support, and optional Windows evasion integration
c2/transportmoderateprovides pluggable network transport implementations for C2 communication: plain TCP, TLS with optional certificate pinning, and uTLS for JA3/JA4 fingerprint randomisation
c2/transport/namedpipequietprovides a Windows named-pipe transport implementing the [github.com/oioio-space/maldev/c2/transport] Transport and Listener interfaces
UI utilities — 1 package
PackageDetectionSummary
uivery-quietexposes minimal Windows UI primitives — MessageBoxW via Show and the system alert sound via Beep

Cross-cutting guides

GuideWhat it explains
getting-started.mdConcepts, terminology, your first implant
architecture.mdLayered design, dependency flow, Mermaid diagrams
opsec-build.mdBuild pipeline: garble, pe/strip, masquerade
mitre.mdFull MITRE ATT&CK + D3FEND mapping
testing.mdPer-test-type details: injection matrix, Meterpreter sessions, BSOD
vm-test-setup.mdBootstrap a fresh host (VMs, SSH keys, INIT snapshot)
coverage-workflow.mdReproducible cross-platform coverage collection

Conventions

DocAudience
conventions/documentation.mdAnyone editing docs (this is the source of truth for templates, GFM features, voice, migration order)
refactor-2026-doc/audit-2026-04-27.mdSnapshot of pre-refactor state — how we got here