When Http Cookies Become A Covert Channel Packed Light
A malware script exfiltrated keystrokes by hiding each character in an HTTP cookie header, XOR-encrypted and Base64-encoded, sent to a command-and-control server. An attacker could recover the stolen message by extracting and decoding the cookie values from the network capture.
That’s usually where a real investigation starts: not with a flag, but with behavior that doesn’t match normal user activity.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the malware used a weak XOR cipher and Base64 encoding to hide data in a cookie header, assuming the traffic would look ordinary.
Impact
The attacker could steal keystrokes and exfiltrate them covertly, but the weak encryption means the data could be recovered by anyone who captured the traffic.
What the attacker needed
Network capture of the traffic; access to the malware script
How it was found
- Open the PCAP in Wireshark and use the Conversations view to spot repeated connections to the same external address.
- Filter for HTTP traffic on port 8080 to isolate the suspicious requests.
- Follow the HTTP stream of the request for /temp/updates.py to extract the Python script.
- Read the script to learn the XOR key and the encoding process (XOR then Base64).
- Export all HTTP requests as plain text to capture the cookie values.
- Write a decoder to extract, Base64-decode, XOR-decrypt, and reassemble the characters in frame order.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a network forensics challenge where a piece of malware stole keystrokes and hid each character inside a cookie sent to a server. A cookie is a small piece of data that websites store in your browser, but here it was abused to carry secret data. By capturing the network traffic and reversing the simple encryption, the hidden message could be read.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.