Hardening is the work of shrinking what an attacker can reach. This set covers the listeners on your device, reading a permission string, and confirming that your shell is not running as root.
Each one is marked as you go, and the explanation arrives straight after, which is
the part worth reading.
4 questions, marked as you go.
Tasks
These need your own device. Run the command in Termux, then paste what it printed.
The marking looks at what the output means, so spacing, version numbers and
ordering do not matter. If you have not installed anything yet, the
lesson covers the setup.
Lock a directory and a file down
This makes a private directory, puts a file inside it, and then tightens both. Read the two octal modes printed at the end, and the permission string above them.
Run this in Termux
On your own device. Nothing on this page executes it. The command runs in
your terminal, and this box only reads what you paste back.
700 and 600 differ in one digit, and that digit is the difference between a directory you can walk into and one you cannot.
the file is readable and writable by the owner only
the directory is 700, so only you can enter it
the file is 600
the commands actually ran
What a good answer looks like
Three lines. The first is a long listing of the file and should read -rw-------, which is read and write for you and nothing at all for anyone else. Then stat prints the same two permissions in octal, which is the shorter notation the lesson uses: 700 for the directory, so only you can enter it, and 600 for the file. If the file showed 644, the group and everyone else could read your secret.
Marking your own work
Both halves of this are checked in your browser, with no server involved, so nothing
stops you from pasting output you did not run. The tasks are written so that the
easiest way to pass one is to actually do it and read the result, which is the whole
intention.