CSCTF 2026 · OSINT · 139 pts
Onion Deanon 2: Read the Favicon.
Shodan fingerprints favicons by hashing their Base64 with line breaks. The exact encoding is the challenge.
| Event | CSCTF 2026, Operation Dawn (online jeopardy) |
|---|---|
| Category | OSINT |
| Points | 139 |
| Status | Solved during the event |
| Target | DarkPigeon negotiation portal (simulated) |
TL;DR. Fetch /favicon.ico from the DarkPigeon onion over Tor, Base64-encode it with newlines every 76 characters, and run MurmurHash3 (x86, 32-bit) over the encoded string. Shodan reports the signed integer, so the answer is -209798607.
Challenge
A forum post advertises the DarkPigeon victim portal as a Tor-only service:
http://schpqwdfzcmdcbim7w24jj5ph5h6fqvcbj5zhkhof3z3v75ydljkzsad.onion
The task is to obtain the favicon and "hash it the way Shodan does", submitting the hash as a signed integer.
First look
Shodan's favicon hash is not a hash of the raw image. The crawler Base64-encodes the icon and hashes the resulting text with MurmurHash3. The Base64 is produced with line breaks, so the newline bytes are part of the hashed string.
Two details cause almost every wrong answer:
- Hashing the raw
.icobytes instead of the Base64 text. - Using a Base64 encoder without line wrapping, or wrapping at 64 instead of 76 characters.
Dead ends
- Hashing the raw favicon produced a plausible-looking 32-bit number that was not accepted.
- Standard
base64.b64encodeemits one long line. Shodan's value usesbase64.encodebytes, which inserts a newline every 76 characters and a trailing newline. - Reporting the unsigned value of the same hash also fails. The expected answer is signed.
Solution
1. Fetch the favicon
curl --socks5-hostname 127.0.0.1:9050 -s http://schpqwdfzcmdcbim7w24jj5ph5h6fqvcbj5zhkhof3z3v75ydljkzsad.onion/favicon.ico -o dp-favicon.ico
file dp-favicon.ico
2. Hash it the Shodan way
python3 - <<'PY'
import base64, mmh3
raw = open("dp-favicon.ico", "rb").read()
b64 = base64.encodebytes(raw) # newline every 76 chars
print(mmh3.hash(b64)) # signed 32-bit by default
PY
Output:
-209798607
mmh3.hash returns a signed 32-bit integer, which is exactly what Shodan displays. If you use a library that returns an unsigned value, convert it with v - 2**32 if v >= 2**31 else v.
Flag
CSCTF{-209798607}What I took from it
- Fingerprints are only useful if the recipe is exact. The same favicon has several different hashes depending on encoding and signedness.
- Favicons are a strong pivot. Shodan indexes them independently of the domain, so a reused icon links a hidden service to a clearnet host.
- Reading the tool's documentation is part of the OSINT work. "Hash it like Shodan" is a specification, not a hint.