Termux CTF
6 challenges you play in your own terminal, against files that are really on your phone. Real permissions, real tools, no simulator. Every flag is generated on your device, so a walkthrough you find online contains someone else's answer.
Install it
Termux from F-Droid, then four commands. The installer checks for Termux, prints exactly what it is going to write, and waits for you to say yes. Nothing is written before that, and nothing needs root.
pkg install git git clone https://github.com/apsideslabs/learmux-ctf cd learmux-ctf ./install.sh
Then run ctf list. Run ctf on its own for a menu, which is
easier than typing on a phone.
What makes it different
The files are real
A challenge writes real files into your home directory with real permissions.
You find them with ls, grep, tar and
base64, the same tools you would use anywhere.
Your flags are yours
Every flag comes from a random value created on your device at install time, and so does every file name. Two people playing the same challenge get different answers.
It works offline
No account, no server, no network traffic. Once it is installed, the whole thing runs on the phone in your pocket.
The loop
Every challenge follows the same four steps.
- Look at what is on offer
ctf listshows each challenge, its difficulty, and whether you have captured it. - Read the briefing and set it up
ctf start 01teaches the concept, then writes the files into your home directory. - Find the flag This part is up to you. The briefing points at the tool, the hints narrow the search.
- Hand it in
ctf check 01 LEARMUX{...}decides. Right or wrong, you know straight away.
The 6 challenges
120 points between them.
| # | Challenge | Topic | Difficulty | Points |
|---|---|---|---|---|
| 01 | Hidden in plain sight | Filesystem | Easy | 10 |
| 02 | Owner only | Permissions | Easy | 15 |
| 03 | Two halves | Filesystem | Medium | 20 |
| 04 | Read the log | Text | Medium | 20 |
| 05 | Twice over | Encoding | Hard | 30 |
| 06 | Inside the archive | Archives | Medium | 25 |
Keeping score
The tool decides whether a flag is right, because it is the only thing that has
your seed. When you want to see the whole picture here, run
ctf export and paste the result into the
progress page.
Before you start
Play only on your own device. Everything the tool touches is under your home
directory, plus one command in $PREFIX/bin. There is no network
activity anywhere in it, and nothing needs root.
You can read the challenge source, because it is on your machine and nothing can stop you. The worked solutions are the one thing held back: they live in the repository for the test suite, and the installer deliberately does not copy them. The score only means something if you earned it.
Tool version 0.2.0.