Skip to content

Bandit

0

sudo apt install sshpass
vim bndt.sh
sshpass -p `cat $1` ssh $1@bandit.labs.overthewire.org -p 2220
chmod +x bndt.sh
./bndt.sh bandit1
sshpass -p bandit0 ssh bandit0@bandit.labs.overthewire.org -p 2220
bandit0@bandit:~$ cat readme

1

./bndt.sh bandit1
bandit1@bandit:~$ cat < -

2

bandit2@bandit:~$ cat spaces\ in\ this\ filename

3

bandit3@bandit:~$ ls -Ra
.:
.  ..  .bash_logout  .bashrc  inhere  .profile

./inhere:
.  ..  .hidden

4

bandit4@bandit:~$ file inhere/*
inhere/-file00: data
inhere/-file01: data
inhere/-file02: data
inhere/-file03: data
inhere/-file04: data
inhere/-file05: data
inhere/-file06: data
inhere/-file07: ASCII text
inhere/-file08: data
inhere/-file09: data
bandit4@bandit:~$ cat inhere/-file07

5

human-readable 1033 bytes in size not executable

bandit5@bandit:~$ ls -Ra
.:
.  ..  .bash_logout  .bashrc  inhere  .profile

./inhere:
.            maybehere03  maybehere08  maybehere13  maybehere18
..           maybehere04  maybehere09  maybehere14  maybehere19
maybehere00  maybehere05  maybehere10  maybehere15
maybehere01  maybehere06  maybehere11  maybehere16
maybehere02  maybehere07  maybehere12  maybehere17

./inhere/maybehere00:
.   -file1  -file2  -file3  spaces file1  spaces file3
..  .file1  .file2  .file3  spaces file2

./inhere/maybehere01:
.   -file1  -file2  -file3  spaces file1  spaces file3
..  .file1  .file2  .file3  spaces file2

./inhere/maybehere02:
...
...
...
find -type f -size 1033c ! -executable
ls -laR | grep rw-r | grep 1033