1337 Local CTF: The BOSS — .NET Dropper → AES Payload → Rolling XOR
169 words
1 minute
1337 Local CTF: The BOSS — .NET Dropper → AES Payload → Rolling XOR
The BOSS
Challenge Context
The challenge provided invoice.exe, a suspicious .NET attachment. Dynamic analysis was misleading because of anti-debug and anti-sandbox checks.
Reconnaissance
Static analysis showed:
anti-debug: Debugger.IsAttachedanti-sandbox: Thread.Sleep timing checkembedded resource: enc_payload.bincrypto: AES-256-CBC, PaddingMode.NoneThe key was built by string concatenation:
"Sphynx" + "MalwareKey" + "1234567890123456"= SphynxMalwareKey1234567890123456The IV was:
InitialVector123Attack Chain
invoice.exe -> recover AES key/IV from IL -> decrypt enc_payload.bin -> Payload.dll -> inspect Execute() -> rolling XOR decode static byte arrayExploitation
The decrypted DLL built the flag but never printed it. Execute() initialized a 38-byte static array, then decoded it with a rolling XOR key:
key starts at 90 (0x5a)for each byte: char = encoded[i] ^ key key = (key + 7) mod 256Encoded bytes:
36040d1b0d13b7ffcdeb93c1c286dfb7fbe1b6808bd9988c367b23486c165a00483279213120Python extraction:
data = bytes.fromhex("36040d1b0d13b7ffcdeb93c1c286dfb7fbe1b6808bd9988c367b23486c165a00483279213120")key = 90out = []for b in data: out.append(b ^ key) key = (key + 7) % 256print(bytes(out).decode())Flag
leet{n3t_r3fl3ct10n_m4lw4r3_r3v3rs1ng}Lesson Learned
The payload’s runtime output was decoy text. In malware-style CTFs, the flag often exists only as a constructed string in memory; static IL analysis can be cleaner than executing the sample.
Cover: Wallhaven 7j38je.
Share Article
If this article helped you, please share it with others!
1337 Local CTF: The BOSS — .NET Dropper → AES Payload → Rolling XOR
https://achux21.github.io/posts/1337-local-ctf-the-boss/ 1337 Local CTF: tbarkallah 3lek awldi katchfi lghalil — Rev First Blood
PearlCTF 2025 — Tic-Tac-Toe: SSRF to Docker Socket → Container Escape
Related Posts Smart
1
1337 Local CTF: MOL TAXI — Phishing PCAP → XOR Malware Layers
CTF Extracting an encrypted invoice from HTTP traffic and peeling XOR, Base64, zlib, and malware config layers.
2
1337 Local CTF: Encrypted Callback — TLS 1.3 Decryption → PowerShell Malware
CTF Decrypting TLS 1.3 traffic with sslkeylog.log, unpacking PowerShell stages, and reversing exfiltrated telemetry.
3
1337 Local CTF: Baby-AES — Known Plaintext → Tiny Keyspace
CTF Recovering a 9-byte AES key by using the known flag format and a known plaintext/ciphertext pair.
4
1337 Local CTF: BASIT — Apache Traversal → Encrypted ZIP → Nested Stego
CTF Following a PCAP attack chain from Apache CVE-2021-41773 to an encrypted archive and hidden image payload.
5
1337 Local CTF: baby overflow — Integer Overflow
CTF Using an 8-bit integer wraparound to satisfy a numeric check.
Random Posts Random