DEV Community

CTFDojo
CTFDojo

Posted on Edited on Originally published at ctfdojo.com

picoCTF Trivial Flag Transfer Protocol Writeup: Export TFTP Files and Extract with steghide

In Wireshark, **File → Export Objects → TFTP* recovers instructions.txt, plan, program.deb and three BMP pictures. The two text files are ROT13: they say the data was hidden with the program, using "DUEDILIGENCE", in the photos. program.deb is steghide; steghide extract on picture3.bmp with that password writes flag.txt.*

  • Platform: picoGym (picoCTF 2021)
  • Category: Forensics
  • Difficulty: Beginner
  • Tools: WiresharkCyberChefsteghide

Challenge description

The name is a pun on TFTP, the Trivial File Transfer Protocol, which runs over UDP with no encryption — so everything transferred is in the capture.

Provided: tftp.pcapng

Step 1 — Export the transferred files

Open the capture in Wireshark and filter on tftp to see the read and write requests. Then let Wireshark reassemble every file:

File → Export Objects → TFTP → Save All
Enter fullscreen mode Exit fullscreen mode

You get six files: instructions.txt, plan, program.deb, picture1.bmp, picture2.bmp and picture3.bmp.

Step 2 — Decode the two notes

instructions.txt and plan are scrambled uppercase text with no spaces. Run them through ROT13 (CyberChef, or tr 'A-Za-z' 'N-ZA-Mn-za-m'):

  • instructions.txt says TFTP isn't encrypted, so the real data needs to be disguised, and to check back for the plan
  • plan says the program was used to hide it "with DUEDILIGENCE", and to check the photos

That's both the tool ("the program") and the password.

Step 3 — Identify the program

program.deb is a Debian package. Listing its contents (with dpkg -c program.deb, or any archive tool) shows it's steghide, a tool that hides data inside images and audio files with a passphrase. Install it from your distribution (sudo apt install steghide) rather than from the capture.

Step 4 — Extract the hidden data

Try each picture with the password from the plan. Only picture3.bmp contains data:

$ steghide extract -sf picture3.bmp -p DUEDILIGENCE
wrote extracted data to "flag.txt".
$ cat flag.txt
picoCTF{***}
Enter fullscreen mode Exit fullscreen mode

steghide info picture3.bmp shows whether a file holds embedded data before you extract. picture2.bmp is unusually large but is a decoy.

🚩 picoCTF{ flag intentionally hidden }

The flag is deliberately hidden — follow the method, you've earned it. 💪

Key takeaways

A forensics chain where each artifact tells you how to read the next one:

  • Wireshark's Export Objects rebuilds files sent over TFTP, HTTP, SMB and others
  • Uppercase text with no spaces and odd letter patterns is often ROT13
  • steghide hides data in BMP/JPEG/WAV files behind a passphrase; steghide info detects it

Originally published on CTFdojo — join the CTFdojo Discord to discuss writeups and get notified about new ones.

Top comments (0)