No description
- Python 100%
| .gitignore | ||
| .python-version | ||
| decode.py | ||
| lunachocken_lying_flag.png | ||
| main.py | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Packet Chaos
Scenario Desc
Find order in chaos, and you will find your way
Challenge Explanation
- A Picture with flag is decoded (or any file really) and split into 70 width chunks per packet.
- Noise is inserted via 5 packets per valid packet with the same packet length but random ascii text instead, you can not differentiate between noise and signal
- The noisy packets have their checksum invalidated which is the way of realising how to figure out what to discard
- The packets are completely out of order and shuffled, use the payload data: Index:Data where index is the order of the packet
- Combine the packet data once sorted into a base64 string and decode it, save as binary to a file to get the picture
Characteristics
- Difficulty: Medium?
- Category: Network Forensics
Solution
- Take the ctf.pcap into wireshark, filter for "ip.checksum.status == 1", exported specified packets with valid checksums
- Use decode.py on the file
- Voila
Generation
- Inputs are variables at the top of the file
RANDOM_PACKETS = 5 # Random packets to add per file. e.g. 1:5 signal to noise ratio BODY_SIZE = 70 # Generated Body size for the packet payload OUTPUT_FOLDER = "pcap" PCAP_FILE = "ctf.pcap" IMAGE_FILE = "lunachocken_lying_flag.png" # My silly horsey but with the flag