bandit12@bandit:/tmp/tmp.KykZXHYnaH$ bzip2 -d a #bzip2: Can't guess original name for a -- using a.out
bandit12@bandit:/tmp/tmp.KykZXHYnaH$ file a.out a.out: gzip compressed data, was "data4.bin", last modified: Thu Apr 10 14:22:57 2025, max compression, from Unix, original size modulo 2^32 20480
bandit12@bandit:/tmp/tmp.KykZXHYnaH$ file a a: POSIX tar archive (GNU)
bandit12@bandit:/tmp/tmp.KykZXHYnaH$ file data7.bin #data7.bin: cannot open `data7.bin' (No such file or directory)
bandit12@bandit:/tmp/tmp.KykZXHYnaH$ file data8.bin data8.bin: gzip compressed data, was "data9.bin", last modified: Thu Apr 10 14:22:57 2025, max compression, from Unix, original size modulo 2^32 49
bandit15@bandit:~$ openssl s_client localhost:30001 # some info ... or use -quiet to suppress the output # openssl s_client -connect localhost:30001 -quiet 8xCjnmgoKbGLhHFAZlGE5Tmu4M2tKJQo Correct! #password to next level
kSkvUpMQ7lBYyCM4GBPvCvT1BfWRy0Dx
another way to get the password is to use the command below
1 2 3
ncat --ssl localhost 30001 socat - OPENSSL:localhost:30001,verify=0 # use verify=0 to disable certificate verification
bandit level 16
Show all TCP sockets listening on the local 8080 port:
cd /var/spool/$myname/foo echo"Executing and deleting all scripts in /var/spool/$myname/foo:" for i in * .*; do if [ "$i" != "." -a "$i" != ".." ]; then echo"Handling $i" owner="$(stat --format "%U" ./$i)" if [ "${owner}" = "bandit23" ]; then timeout -s 9 60 ./$i fi rm -f ./$i fi done
bandit23@bandit:~$ vim /var/spool/bandit24/foo/tmp.sh #!/bin/bash
bandit24@bandit:/tmp/tmp.YfKCvV5CzF$ vim tmp.sh #!/bin/bash password="gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8"
for i in {1000..9999}; do echo"$password$i" done | nc localhost 30002
bandit24@bandit:/tmp/tmp.YfKCvV5CzF$ ./tmp.sh ... Wrong! Please enter the correct current password and pincode. Try again. Wrong! Please enter the correct current password and pincode. Try again. Wrong! Please enter the correct current password and pincode. Try again. Correct! The password of user bandit25 is
Dont forget to mktemp a directory to clone the git repository into,
otherwise you will get fatal: could not create work tree dir 'repo':
Permission denied
1 2 3 4 5 6 7 8 9 10 11 12 13
bandit27@bandit:~$ mktemp -d /tmp/tmp.W54bwIQdTm
bandit27@bandit:~$ cd /tmp/tmp.W54bwIQdTm
bandit27@bandit:/tmp/tmp.W54bwIQdTm$ git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo ... bandit27-git@localhost's password: ... bandit27@bandit:/tmp/tmp.W54bwIQdTm/repo$ cat README The password to the next level is:
bandit28@bandit:~$ mktemp -d /tmp/tmp.Dnue3slg2g bandit28@bandit:~$ cd /tmp/tmp.Dnue3slg2g bandit28@bandit:/tmp/tmp.Dnue3slg2g$ git clone ssh://bandit28-git@localhost:2220/home/bandit28-git/repo Cloning into 'repo'... The authenticity of host '[localhost]:2220 ([127.0.0.1]:2220)' can't be established. ED25519 key fingerprint is SHA256:C2ihUBV7ihnV1wUXRb4RrEcLfXC5CXlhmAAM/urerLY. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Could not create directory '/home/bandit28/.ssh' (Permission denied). Failed to add the host to the list of known hosts (/home/bandit28/.ssh/known_hosts). _ _ _ _ | |__ __ _ _ __ __| (_) |_ | '_ \ / _` | '_ \ / _` | | __| | |_) | (_| | | | | (_| | | |_ |_.__/ \__,_|_| |_|\__,_|_|\__| This is an OverTheWire game server. More information on http://www.overthewire.org/wargames bandit28-git@localhost's password: remote: Enumerating objects: 9, done. remote: Counting objects: 100% (9/9), done. remote: Compressing objects: 100% (6/6), done. remote: Total 9 (delta 2), reused 0 (delta 0), pack-reused 0 Receiving objects: 100% (9/9), done. Resolving deltas: 100% (2/2), done.
bandit29@bandit:/tmp/tmp.uymj8B2LpI$ git clone ssh://bandit29-git@localhost:2220/home/bandit29-git/repo Cloning into 'repo'... The authenticity of host '[localhost]:2220 ([127.0.0.1]:2220)' can't be established. ED25519 key fingerprint is SHA256:C2ihUBV7ihnV1wUXRb4RrEcLfXC5CXlhmAAM/urerLY. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Could not create directory '/home/bandit29/.ssh' (Permission denied). Failed to add the host to the list of known hosts (/home/bandit29/.ssh/known_hosts). _ _ _ _ | |__ __ _ _ __ __| (_) |_ | '_ \ / _` | '_ \ / _` | | __| | |_) | (_| | | | | (_| | | |_ |_.__/ \__,_|_| |_|\__,_|_|\__| This is an OverTheWire game server. More information on http://www.overthewire.org/wargames bandit29-git@localhost's password: remote: Enumerating objects: 16, done. remote: Counting objects: 100% (16/16), done. remote: Compressing objects: 100% (11/11), done. remote: Total 16 (delta 2), reused 0 (delta 0), pack-reused 0 Receiving objects: 100% (16/16), done. Resolving deltas: 100% (2/2), done.
# same as above, but with bandit30-git bandit30@bandit:/tmp/tmp.G0HYcVr8Od/repo$ git tag secret bandit30@bandit:/tmp/tmp.G0HYcVr8Od/repo$ git show secret
bandit31@bandit:/tmp/tmp.blHsxtiTrN/repo$ git push ... Writing objects: 100% (4/4), 326 bytes | 326.00 KiB/s, done. Total 4 (delta 0), reused 0 (delta 0), pack-reused 0 remote: ### Attempting to validate files... #### remote: remote: .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo. remote: remote: Well done! Here is the password for the next level: remote: 3O9RfhqyAlVBEZpVb6LYStshZoqoSx5K remote: remote: .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo. remote: To ssh://localhost:2220/home/bandit31-git/repo ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'ssh://localhost:2220/home/bandit31-git/repo'
3O9RfhqyAlVBEZpVb6LYStshZoqoSx5K
bandit level 32
taken from https://mayadevbe.me/posts/overthewire/bandit/level33/
1 2 3 4
>> $0 $ /bin/bash
bandit33@bandit:~$ cat /etc/bandit_pass/bandit33
tQdtbs5D5i2vJwkO8mEyYEyTL8izoeJ0
bandit level 33
1 2 3 4 5 6 7 8 9
bandit33@bandit:~$ cat README.txt Congratulations on solving the last level of this game!
At this moment, there are no more levels to play in this game. However, we are constantly working on new levels and will most likely expand this game with more levels soon. Keep an eye out for an announcement on our usual communication channels! In the meantime, you could play some of our other wargames.
If you have an idea for an awesome new level, please let us know!