The ultimate goal in CTF challenges is finding the flag - a specially formatted string that proves you solved the challenge. Understanding flag formats helps you recognize when you've found something important!
Always check the CTF rules page for the exact flag format. Some CTFs use multiple formats or have special requirements like case sensitivity.
Common Flag Formats
Case Sensitivity
Flag submissions are usually case-sensitive! Copy the flag exactly as found, including uppercase/lowercase letters and special characters.
Encoded Flags
Flags are often encoded or encrypted. Here's how to recognize common encodings:
When you find suspicious-looking text, throw it into CyberChef and try the "Magic" operation. It automatically detects and decodes common encodings!
Finding Flags
Systematic Flag Hunting
1
Check the ObviousSource code comments, page title, visible text
2
Check Hidden AreasCookies, headers, hidden form fields
3
Check FilesRun strings, binwalk, exiftool on any files
4
Decode Suspicious StringsUse CyberChef's Magic operation
5
Search Recursivelygrep -r "flag" . (including variations)
Common Hiding Places
Don't overthink it! Challenge creators want flags to be findable. If you've been stuck for hours, step back and try the simplest approach again.
Validating Your Flag
Copy Carefully
When copying flags from terminals, be careful of line breaks and invisible characters. If submission fails, try typing the flag manually.
Quick Reference Regex
Knowledge Check
Key Takeaways
- Always check the CTF rules for the exact flag format
- Flags are often encoded - know Base64, Hex, and ROT13
- CyberChef's Magic operation is your best friend for decoding
- grep with regex helps find flags in files
- Verify format and remove whitespace before submitting
- Common hiding places: comments, headers, metadata, encoded strings