Files
tobias f3ccc09c3d Add FOR610 tool/workflow knowledge base and data pipeline
Build comprehensive malware analysis knowledge base from 3 sources:
- SANS FOR610 course: 120 tools, 47 labs, 15 workflows, 27 recipes
- REMnux salt-states: 340 packages parsed from GitHub
- REMnux docs: 280+ tools scraped from docs.remnux.org

Master inventory merges all sources into 447 tools with help tiers
(rich/standard/basic). Pipeline generates: tools.db (397 entries),
397 cheatsheets with multi-tool recipes, 15 workflow guides, 224
TLDR pages, and coverage reports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 17:38:15 +01:00

54 lines
1.8 KiB
Plaintext

# base64dump.py
# Extract and decode Base64-encoded strings from files
# FOR610 Labs: 3.4, 4.5 | Sections: 3, 4 | Author: Didier Stevens
# Docs: https://docs.remnux.org/discover-the-tools/examine+static+properties/deobfuscation
% base64, decoding, didier-stevens
# Basic usage
base64dump.py file.txt
# Suppress default output
base64dump.py file.ps1 -n 10
# Select specific item
base64dump.py file.ps1 -s 2 -d
# --- Recipes (multi-tool chains) ---
# >> Extract Base64 PowerShell from Office Macro
# List streams — find macro (M) and data streams
oledump.py <document>
# Extract VBA source to understand what the macro does
oledump.py <document> -s <macro_stream> -v
# Scan data stream for Base64 strings
oledump.py <document> -s <data_stream> -d | base64dump.py -n 10
# Decode the longest Base64 hit to file
oledump.py <document> -s <data_stream> -d | base64dump.py -s 1 -d > payload.ps1
# >> Decode Base64 + Gzip Payload
# Find Base64 strings in the script
base64dump.py <script.ps1> -n 10
# Decode Base64 and decompress gzip in one chain
base64dump.py <script.ps1> -s <selection> -d | gunzip > decoded.ps1
# >> Decode Base64 + XOR Shellcode
# Find Base64 strings
base64dump.py <script.ps1> -n 10
# Decode Base64, then XOR with key
base64dump.py <script.ps1> -s <selection> -d | translate.py 'byte ^ <key>' > shellcode.bin
# >> Full Office Macro Decode Chain
# Step 1: List streams and extract VBA
oledump.py <document>
oledump.py <document> -s <macro_stream> -v
# Step 2: Extract Base64 from data stream
oledump.py <document> -s <data_stream> -d | base64dump.py -s 1 -d > stage1.ps1
# Step 3: Decode second Base64 layer + decompress
base64dump.py stage1.ps1 -s 3 -d | gunzip > stage2.ps1
# Step 4: XOR decode the shellcode
base64dump.py stage2.ps1 -s 2 -d | translate.py 'byte ^ 35' > shellcode.bin
# Step 5: Emulate the shellcode
scdbgc /f shellcode.bin /s -1