Level Goal
There are 2 files in the homedirectory: passwords.old and passwords.new. The password for the next level is in passwords.new and is the only line that has been changed between passwords.old and passwords.new
NOTE: if you have solved this level and see ‘Byebye!’ when trying to log into bandit18, this is related to the next level, bandit19
Solution
Password: use sshkey.private from the previous level.
1 |
$ ssh [email protected] -p 2220 -i sshkey.private |
If you’re prompted for yes/no, type yes and press enter.
So let’s see what we’ve got.
1 2 3 4 |
[email protected]:~$ ls -l total 8 -rw-r----- 1 bandit18 bandit17 3300 Dec 28 14:34 passwords.new -rw-r----- 1 bandit18 bandit17 3300 Dec 28 14:34 passwords.old |
Two 3300 character files. Rather than compare them line by line, let’s get diff to do that for us.
1 2 3 4 5 |
[email protected]:~$ diff passwords.old passwords.new 42c42 < 6vcSC74ROI95NqkKaeEC2ABVMDX9TyUr --- > kfBf3eYk5BPBRzwjqutbbfE887SVc5Yd |
The < points to the line in the first file (passwords.old), with > being the second file (passwords.new). We want the new password.
Bonza.