PE Packer/Crypter Source
Versionv2.0
Updated2026-10-19
CategoryMalware Development

PE Packer/Crypter Source

$149.99

PE Packer/Crypter — AES-128-CTR with NASM Stub

Python 3 packer that encrypts .text/.data with AES-128-CTR and appends a self-decrypting NASM stub as a new .zion section. The stub expands the key, decrypts in memory and jumps to the original entry point.

  • Encryption: AES-128-CTR, no padding, SizeOfRawData untouched, continuous keystream across sections.
  • Stubs (x86 + x64): runtime key expansion, T-table AES core, getpc-based relocation, per-section table appended after the stub.
  • PE surgery: file-alignment-aware header/section layout insertion — no pefile re-serialization corruption.
  • Anti-debug in stub: PEB BeingDebugged + NtGlobalFlag checks; disabled with --no-antidebug (byte-patch verified).
  • TLS callbacks: if callbacks live in an encrypted section, the TLS directory is neutralized and the stub re-runs the callbacks exactly once after decryption (verified end-to-end on x86 and x64).
  • Key info: writes <output>.keyinfo with key, nonce and section map.
  • Verification: 17/17 emulation tests; 5 packed binaries execute correctly under wine (x86/x64, pure asm and full CRT).

Key Features

  • AES-128-CTR section encryption (no padding, SizeOfRawData untouched, continuous keystream)
  • REAL NASM decryption stubs for x86 and x64: runtime key expansion, T-table AES core, getpc base relocation
  • File-alignment-aware section insertion (no header corruption — fixed from v1.1)
  • In-stub anti-debug: PEB BeingDebugged + NtGlobalFlag, patched off with --no-antidebug
  • TLS callback support: neutralizes the TLS directory and re-runs callbacks after decryption (verified end-to-end)
  • Key info file with key, nonce and encrypted sections
  • 17/17 emulation tests + native execution matrix (x86/x64, asm and CRT binaries)

Requirements

  • Python 3.8+
  • NASM to rebuild stubs (prebuilt stubs included)
  • Target: Windows PE (EXE/DLL), x86 or x64

Changelog

  • 2.0 (2026-10-19): complete rewrite — real AES stubs, correct PE handling, TLS re-run, --no-antidebug; verified natively under wine and by emulation
  • 1.1 (2025-02-10): previous store release (fake stub, corrupted PE output)

Package Contents

Exact contents of the download archive (17 files):

packer.py 20,768 B
tests/ 0 B
tests/test_packer.py 7,254 B
README.md 2,318 B
stubs/ 0 B
stubs/te0.inc 3,168 B
stubs/te2.inc 3,168 B
stubs/te1.inc 3,168 B
stubs/packer32.bin 5,888 B
stubs/stub_info.json 529 B
stubs/packer32.asm 13,002 B
stubs/te3.inc 3,168 B
stubs/packer64.bin 5,760 B
stubs/sbox.inc 1,632 B
stubs/packer64.asm 13,095 B
packer32.asm 12,703 B
build_stub.py 4,304 B