ssh bandit4@bandit.labs.overthewire.org -p 2220
bandit password: 2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe
Task
The password for the next level is stored in the only human-readable file in the inhere directory.
Solution
Look ten file
1
2
3
4
5
6
7
8
9
10
11
12
13
14
bandit4@bandit:~$ ls -lah inhere/
total 48K
drwxr-xr-x 2 root root 4.0K Apr 23 18:04 .
drwxr-xr-x 3 root root 4.0K Apr 23 18:04 ..
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file00
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file01
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file02
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file03
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file04
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file05
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file06
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file07
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file08
-rw-r----- 1 bandit5 bandit4 33 Apr 23 18:04 -file09
Use different methods to find the human-readable file and therefore, the password.
We could just print the contents of every file (cat). This is, however, not very efficient when we deal with more files. Instead, we could use the method I mentioned in the theory part. The command structure is file
1
2
3
4
5
6
7
8
9
10
11
bandit4@bandit:~/inhere$ file ./*
./-file00: data
./-file01: data
./-file02: data
./-file03: data
./-file04: data
./-file05: data
./-file06: data
./-file07: ASCII text
./-file08: data
./-file09: Non-ISO extended-ASCII text, with no line terminators
Yeh, Look -file07 is of type ASCII text,
1
2
bandit4@bandit:~/inhere$ cat ./-file07
lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR
==> CTF: { lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR }

Comments powered by Disqus.