1337 Local CTF: MOL TAXI — Phishing PCAP → XOR Malware Layers
163 words
1 minute
1337 Local CTF: MOL TAXI — Phishing PCAP → XOR Malware Layers
MOL TAXI
Challenge Context
The challenge provided a phishing email and a small PCAP. The email claimed to be an urgent invoice and pointed the victim to an encrypted payload.
Attack Chain
phishing_email.eml -> invoice URL and decryption key -> PCAP HTTP response body -> XOR decrypt invoice.enc -> Python loader -> base64 + zlib payload -> embedded flag XORed with C2 configReconnaissance
The email revealed:
URL: http://malicious.local/invoice.enckey: Sup3rS3cr3tK3yThe PCAP contained one HTTP GET for /invoice.enc and a 485-byte binary response.
Exploitation
First layer: repeated-key XOR with the email key produced Python code:
import base64, zlibexec(zlib.decompress(base64.b64decode(b'eJxtUdtq...')))Instead of executing it, decode it safely. The decompressed malware contained:
enc_flag = [47, 87, 58, 39, 62, 58, 58, 46, 57, 0, 19, 44, 30, 37, 46, 51, 29, 93, 102, 112, 83, 50, 58, 56]key = "C2_SERVER_READY_x99"Flag recovery:
flag = ''.join(chr(enc_flag[i] ^ ord(key[i % len(key)])) for i in range(len(enc_flag)))print(flag)Flag
leet{hlkk_Ai_awled_3ami}Lesson Learned
Do not execute malware loaders just because they are Python. Decode each layer statically and treat C2 configuration as likely key material.
Cover: Wallhaven xe86w3.
Share Article
If this article helped you, please share it with others!
1337 Local CTF: MOL TAXI — Phishing PCAP → XOR Malware Layers
https://achux21.github.io/posts/1337-local-ctf-mol-taxi/ 1337 Local CTF: July pool 2024 — Dangling Git Commits
1337 Local CTF: new intra — IDOR → Staff Login → Admin Page
Related Posts Smart
1
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.
2
1337 Local CTF: The BOSS — .NET Dropper → AES Payload → Rolling XOR
CTF Reverse-engineering a .NET malware dropper, decrypting an embedded payload, and extracting a statically built flag.
3
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.
4
1337 Local CTF: baby overflow — Integer Overflow
CTF Using an 8-bit integer wraparound to satisfy a numeric check.
5
1337 Local CTF: July pool 2024 — Dangling Git Commits
CTF Recovering a split flag from unreachable Git objects inside a piscine project archive.
Random Posts Random