WHAT IS THIS →
A pack of standalone single-file Python triage tools (github.com/DidierStevens/DidierStevensSuite),
the de-facto standard for pulling payloads out of documents, archives and malware. Preinstalled on
REMnux / SIFT. They all share one usage model — learn it once (§01), apply everywhere.
01Install & the Shared Usage Model
Get it & run it
git clone https://github.com/DidierStevens/DidierStevensSuite
python3 oledump.py -h# every tool self-documents
python3 oledump.py -m# -m/--man = full embedded manual
pip install olefile # only hard dep (oledump); rest are dep-free# On REMnux/SIFT they're on PATH already: oledump.py file.doc
List → select → render
# Shared by oledump / zipdump / base64dump / pdf-parser / emldump
TOOL.py file # bare run = NUMBERED listing of items
TOOL.py -s 3 -d file # -s selects item 3, -d = raw dump (pipe/redirect)
TOOL.py -s 3 -x file # -x hexdump -a asciidump -S strings# base64dump extras: -s a = all items, -s L = largest
The cut mini-language (-c)
# Carve a byte range from the selected item: [from]:[to]-c 0x10:0x110 # hex or decimal positions-c 0:0x100l # 'l' on 2nd term = LENGTH → first 256 bytes-c :-0x100 # negative = from EOF (all but last 256)-c"['MZ']:0x100l"# ['ascii'] / [hex] = search anchor-c"['ABC']2:"# trailing N = Nth occurrence
Pipe stages together
# -d to stdout, '-' reads stdin → chain a whole unpack in one line
oledump.py -s 3 -v doc.doc | base64dump.py -n 40
base64dump.py -s L -d f | xorsearch -i - This
pdf-parser.py -o 8 -f-d - f.pdf | file-magic.py -
rtfdump.py sample.rtf # tree of items; high hex ratio = embedded object
rtfdump.py -O sample.rtf # -O overview of just the OLE objects
rtfdump.py -O -s 1 -H -d sample.rtf > obj1.bin
# -s select, -H hex-decode the RTF stream, -d dump → feed oledump
rtfdump.py -F O sample.rtf # -F find OLE heuristically (obfuscated objdata)
emldump.py — MIME email (.eml)
emldump.py sample.eml # list MIME parts (index, type, size)
emldump.py -s 4 -d sample.eml > attach.bin
# -s by index OR by mime-type; -d auto-decodes b64/quoted-printable
emldump.py -I sample.eml # -I show headers (routing/sender)
emldump.py -y rules.yar sample.eml # -y YARA-scan the parts
base64dump.py file.txt # list candidate streams (default -e b64)
base64dump.py -e all -u file.txt # -e all encodings (hex,b32,b85,url…); -u unique
base64dump.py -n 20 file.txt # -n = min decoded length (kill noise)
base64dump.py -s L -d file.txt > out.bin # -s L = largest, -d dump
XORSearch — brute XOR/ROL/ROT/ADD
xorsearch -i file.bin http # brute all keys for a string; -i case-insensitive
xorsearch -h file.bin 4D5A # -h = search for a HEX string (MZ)
xorsearch -p file.bin # -p = search for embedded PE across all keys
xorsearch -s file.bin flag # -s = SAVE decoded file for the matching key
xorsearch -w file.bin 'http?://*'# -w wildcards (? one, * any)
xor-kpa.py — known-plaintext key recovery
xor-kpa.py plaintext.txt cipher.bin # recover repeating XOR key from a crib
xor-kpa.py -n dos malware.vir # -n dos = 'This program cannot be run in DOS mode'
xor-kpa.py -d plaintext.txt cipher.bin # -d = also decode with recovered key
# Decrypt beacon checkin metadata with the team-server RSA key
cs-decrypt-metadata.py -f privkey.txt -V metadata.bin
# -V shows recovered raw/AES/HMAC keys# Then decrypt captured traffic (tool is cs-parse-TRAFFIC.py)
cs-parse-traffic.py -k <hmac>:<aes> capture.pcap
cs-parse-traffic.py -f dns -k H:A capture.pcap # -f http|dns; -e extract
pecheck.py — PE triage
pecheck.py sample.exe # headers, sections+entropy, overlay, PEiD
pecheck.py -l P dump.bin # -l P = locate/carve MZ-PE headers in memory
pecheck.py -s -e 7.2 /samples # -s scan folder, -e min entropy → flag packed
pecheck.py -g 0x1234,0x100 -x sample.exe # -g offset,len then -x dump (overlay)
disitool.py — Authenticode
disitool.py extract signed.exe sig.der # pull the signature blob
disitool.py delete signed.exe unsigned.exe # strip signature
disitool.py inject --paddata src.exe data.bin out.exe
# hide data in the signature block (overlay stego)
06Flag Gotchas & Workflow
Same letter, different meaning
Flag
In this tool
vs. in that tool
-d
pdfid: DISARM (neuter copy)
pdf-parser / oledump / *dump: DUMP bytes
-f
pdfid: FORCE parse
pdf-parser: apply FILTER (decompress)
-v
oledump: --vbadecompress (macro)
NOT -d — that gives raw compressed bytes
-h
xorsearch: search a HEX string
(elsewhere -h is usually help)
-p
xorsearch: find embedded PE
zipdump: single password
TRIAGE CHECKLIST →
① file + byte-stats.py — what am I holding, is it packed?
② PDF → pdfid.py -n then pdf-parser.py
③ Office/OLE → oledump.py (+ -v macros); RTF → rtfdump.py -O
④ Archive/eml → zipdump.py / emldump.py
⑤ Encoded blob → base64dump.py → xorsearch/xor-kpa → translate.py
⑥ PE/beacon → pecheck.py, 1768.py
⑦ When unsure of a flag: -h or -m, don't guess.