flaghunter
Point it at a CTF crypto challenge or a packet capture and it runs a full attack battery for you, then writes up what it found.
Built on cryptsmith, which does all the crypto and pcap heavy lifting. flaghunter is the analyst on top.
Install
pip install flaghunter
Use
# throw a crypto challenge file at it
flaghunter solve challenge.txt
# hunt a pcap for enrollment keys, flags, and obfuscated blobs
flaghunter pcap capture.pcap
# custom token pattern, json output
flaghunter pcap capture.pcap --pattern "FLAG\{[^}]+\}" --format json
What the pcap hunter does
- Reassembles TCP streams from the capture
- Carves printable strings out of every stream
- Hunts tokens matching your pattern (default: 12 char alpha strings, like enrollment keys)
- Scores every stream for entropy, then runs single byte xor, repeating key xor, caesar, and layered base64/hex decoding on anything suspicious
- Writes a markdown report with stream labels, findings, and decoded candidates
What the solver does
Reads a challenge file and runs the battery: encoding layers, xor attacks, classical ciphers, hash identification. Ranks everything by english score so the real answer floats to the top.
Example
Say a capture has a server checking a 12 character alpha enrollment key, and the key is xor obfuscated in the traffic. flaghunter finds the stream, breaks the xor, and hands you the key.
License
MIT
Metadata
Release files for flaghunter 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flaghunter-0.1.0.tar.gz | 9.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flaghunter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.4 kB
Release files / flaghunter-0.1.0.tar.gz
| Download URL | flaghunter-0.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ca0aaeb5464704a1c24d7d28e72fcdfe44114343bb8ef21346848d91121f081
|
|
BLAKE2b-256 checksum How to use checksums |
d5095008ce978480c22502347405347098030e35629f9f479006a47db173672e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / flaghunter-0.1.0-py3-none-any.whl
| Download URL | flaghunter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a691a613d2fc3fee4ad21a21d473fec1012e730f167a208767062bf5428732a
|
|
BLAKE2b-256 checksum How to use checksums |
94282acdaa9d59683fce5211c48766605459e605c8f465666ad4a81291ad19da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|