Level Goal
The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:
- human-readable
- 1033 bytes in size
- not executable
Solution
Password: koReBOKuIDDepwhWk7jZC0RTdopnAYKh
1 |
$ ssh [email protected] -p 2220 |
Let’s take a look inside inhere.
1 2 3 4 5 |
[email protected]:~$ ls inhere maybehere00 maybehere04 maybehere08 maybehere12 maybehere16 maybehere01 maybehere05 maybehere09 maybehere13 maybehere17 maybehere02 maybehere06 maybehere10 maybehere14 maybehere18 maybehere03 maybehere07 maybehere11 maybehere15 maybehere19 |
Urgh. find please.
1 2 |
[email protected]:~$ find inhere ! -executable -size 1033c -exec file {} \; inhere/maybehere07/.file2: ASCII text, with very long lines |
What I’m doing is checking that the file isn’t executable with ! -executable (! meaning not), checking that the size is 1033 bytes with -size 1033c (for whatever reason, b is 512-byte blocks and c is bytes), and then passing whatever results we get to file with -exec file {} \;.
Let’s look inside.
1 2 3 |
It’s padded with 1000 spaces (1033 – 32 [password] – 1 [newline]), just for funsies.
Yahoo.