Bandit5 - bandit6

From JaxHax
Jump to navigation Jump to search

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

This is kind of a file maze but we know its size and permissions. Let's recursively scan the directories.

bandit5@melinda:~$ ls
inhere

bandit5@melinda:~$ cd inhere/

bandit5@melinda:~/inhere$ ls -la
total 88
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 .
drwxr-xr-x  3 root root    4096 Nov 14 10:32 ..
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere00
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere01
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere02
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere03
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere04
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere05
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere06
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere07
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere08
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere09
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere10
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere11
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere12
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere13
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere14
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere15
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere16
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere17
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere18
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere19
bandit5@melinda:~/inhere$ ls -lRa
.:
total 88
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 .
drwxr-xr-x  3 root root    4096 Nov 14 10:32 ..
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere00
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere01
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere02
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere03
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere04
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere05
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere06
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere07
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere08
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere09
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere10
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere11
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere12
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere13
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere14
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere15
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere16
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere17
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere18
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 maybehere19

./maybehere00:
total 72
-rwxr-x---  1 root bandit5 1039 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 9388 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 7378 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5  551 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 7836 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 4802 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 6118 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 6850 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 1915 Nov 14 10:32 spaces file3

./maybehere01:
total 80
-rwxr-x---  1 root bandit5 6028 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5  288 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 9641 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 8944 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 3070 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 3792 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 4139 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 4543 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 8834 Nov 14 10:32 spaces file3

./maybehere02:
total 68
-rwxr-x---  1 root bandit5 3801 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 3511 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 4932 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 6351 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 2577 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 7953 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 6746 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 8488 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 2275 Nov 14 10:32 spaces file3

./maybehere03:
total 80
-rwxr-x---  1 root bandit5  315 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 6595 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 8275 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 9769 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 8880 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 2282 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 2190 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 3385 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 9234 Nov 14 10:32 spaces file3

./maybehere04:
total 60
-rwxr-x---  1 root bandit5 4410 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 2619 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 2117 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 2440 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 6144 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5  142 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 5532 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 2491 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 6002 Nov 14 10:32 spaces file3

./maybehere05:
total 64
-rwxr-x---  1 root bandit5 2346 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 5959 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 2572 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 3201 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 5917 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 4585 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5  880 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 2420 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 8585 Nov 14 10:32 spaces file3

./maybehere06:
total 64
-rwxr-x---  1 root bandit5 5731 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 1076 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 3443 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 1271 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 8976 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 2418 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 4073 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 4251 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 8065 Nov 14 10:32 spaces file3

./maybehere07:
total 56
-rwxr-x---  1 root bandit5 3663 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 2488 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 3362 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 3065 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 1033 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 1997 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 4130 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 9064 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 1022 Nov 14 10:32 spaces file3

./maybehere08:
total 56
-rwxr-x---  1 root bandit5 1077 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 3825 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 2650 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 8169 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5  747 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 2217 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5  215 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 3693 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 9138 Nov 14 10:32 spaces file3

./maybehere09:
total 76
-rwxr-x---  1 root bandit5 3628 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5  774 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 7961 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 6763 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 8517 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 3798 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 5301 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 8716 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 7569 Nov 14 10:32 spaces file3

./maybehere10:
total 56
-rwxr-x---  1 root bandit5 1052 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 1991 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 1237 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 7092 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5   99 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 2961 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 8269 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 3570 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 2155 Nov 14 10:32 spaces file3

./maybehere11:
total 72
-rwxr-x---  1 root bandit5 1211 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 4559 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 8854 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5  452 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 2501 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 8261 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 3147 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5  503 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 8845 Nov 14 10:32 spaces file3

./maybehere12:
total 72
-rwxr-x---  1 root bandit5 9678 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5  251 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 9076 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 5815 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 8244 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 1022 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 2157 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 2460 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 1639 Nov 14 10:32 spaces file3

./maybehere13:
total 64
-rwxr-x---  1 root bandit5 1359 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 1423 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 3014 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 5258 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 8952 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 6965 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 3952 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5  952 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 4389 Nov 14 10:32 spaces file3

./maybehere14:
total 60
-rwxr-x---  1 root bandit5 4282 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 8351 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 3756 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 3427 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 1503 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 4821 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 1382 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5  871 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5  376 Nov 14 10:32 spaces file3

./maybehere15:
total 64
-rwxr-x---  1 root bandit5 8794 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 9499 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 6299 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 2159 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5  279 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5  742 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 1623 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5   51 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 1637 Nov 14 10:32 spaces file3

./maybehere16:
total 80
-rwxr-x---  1 root bandit5 4277 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 5301 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 8085 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 5426 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 8472 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 1148 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 9773 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 3146 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 7509 Nov 14 10:32 spaces file3

./maybehere17:
total 72
-rwxr-x---  1 root bandit5 1133 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 1791 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 4422 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5  895 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 8341 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 5094 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 8361 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 3387 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 6381 Nov 14 10:32 spaces file3

./maybehere18:
total 68
-rwxr-x---  1 root bandit5 9697 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5   77 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 2306 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 5702 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 2084 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5  154 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 7334 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 6348 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 7040 Nov 14 10:32 spaces file3

./maybehere19:
total 76
-rwxr-x---  1 root bandit5 6302 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 5594 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 7965 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 7209 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 4740 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5  494 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 7186 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 8785 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 2307 Nov 14 10:32 spaces file3


Only one file in that list is 1033 bytes and non-executable...

bandit5@melinda:~/inhere$ cd maybehere07

bandit5@melinda:~/inhere/maybehere07$ ls -la
total 56
-rwxr-x---  1 root bandit5 3663 Nov 14 10:32 -file1
-rw-r-----  1 root bandit5 2488 Nov 14 10:32 -file2
-rwxr-x---  1 root bandit5 3362 Nov 14 10:32 -file3
drwxr-x---  2 root bandit5 4096 Nov 14 10:32 .
drwxr-x--- 22 root bandit5 4096 Nov 14 10:32 ..
-rwxr-x---  1 root bandit5 3065 Nov 14 10:32 .file1
-rw-r-----  1 root bandit5 1033 Nov 14 10:32 .file2
-rwxr-x---  1 root bandit5 1997 Nov 14 10:32 .file3
-rwxr-x---  1 root bandit5 4130 Nov 14 10:32 spaces file1
-rw-r-----  1 root bandit5 9064 Nov 14 10:32 spaces file2
-rwxr-x---  1 root bandit5 1022 Nov 14 10:32 spaces file3

bandit5@melinda:~/inhere/maybehere07$ cat .file2
DXjZPULLxYr17uwoI01bNLQbtFemEgo7