Bandit Level 10
Bandit Level 10 — extract readable text from a binary file with strings and filter it with grep.
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
Level Goal
The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters.
Commands you may need to solve this level
grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd
Study guide
Level map: logged in as bandit9, find the password for bandit10.
What this level teaches
Finding human-readable fragments inside data that is mostly binary.
Key ideas
stringsscans a file and prints runs of printable characters. It is a first-look tool for reverse engineers and malware analysts.- Binary vs text. Most of the file is non-printable bytes; the interesting part is a handful of text fragments.
- Combining tools.
stringsproduces many lines, andgrepnarrows them to those matching the clue (several=characters).
How to approach it
- Try
caton the file and note how unhelpful it is (useresetafterwards if your terminal is garbled). - Pipe
stringsintogrepusing the pattern described in the Level Goal.
Why it matters
strings is often the very first command run on an unknown executable. You will use it again in Leviathan and other binary games.