A step-by-step walkthrough of OverTheWire Bandit beginner levels 21 to 25. Learn Linux basics, file manipulation, permissions, and commands through hands-on CTF challenges — perfect for cybersecurity beginners.
This walkthrough covers OverTheWire Bandit beginner levels 21–25. It provides both hints and answers for each stage, helping new cybersecurity learners and CTF players progress when they’re stuck. A great resource for building Linux command-line skills while practicing ethical hacking basics.
Bandit Level 21 → Level 22
(Updated: 4 August 2025)
Credentials
- Username:
bandit21 - Password:
EeoULMCra2q0dSkYj561DX7s1CpBuOBt
Connection
ssh bandit21@bandit.labs.overthewire.org -p 2220
Hints & Commands Learned
- cd
- cat
- cronjob
Steps to Solve
- Step 1 – Use
sshto get access to OverTheWire labs. - Step 2 - Use
cd /etc/cron.dto go to cronjobs directory. - Step 3 - Use
cat cronjob_bandit22(* * * * * means it is running). - Step 4 - Use
cat /usr/bin/cronjob_bandit22.shto see what it’s running. - Step 5 - Use
cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgvto get the password for the next level. - Step 6 - Take the password to the next level.
Next Level Password
tRae0UfB9v0UzbCdn9cY0gQnds9GF58Q
Bandit Level 22 → Level 23
(Updated: 4 August 2025)
Credentials
- Username:
bandit22 - Password:
tRae0UfB9v0UzbCdn9cY0gQnds9GF58Q
Connection
ssh bandit22@bandit.labs.overthewire.org -p 2220
Hints & Commands Learned
- cd
- cat
- cronjob
Steps to Solve
- Step 1 – Use
sshto get access to OverTheWire labs. - Step 2 - Use
cd /etc/cron.dto go to cronjobs directory. - Step 3 - Use
cat /etc/cron.d/cronjob_bandit23(* * * * * means it is running). - Step 4 - Use
cat /usr/bin/cronjob_bandit23.shto see what it’s running. - Step 5 - Use
cat/tmp/$(echo I am user bandit23 | md5sum | cut -d ' ' -f 1)to get the password for the next level. - Step 6 - Take the password to the next level.
Next Level Password
0Zf11ioIjMVN551jX3CmStKLYqjk54Ga
Bandit Level 23 → Level 24
(Updated: 4 August 2025)
Credentials
- Username:
bandit23 - Password:
0Zf11ioIjMVN551jX3CmStKLYqjk54Ga
Connection
ssh bandit23@bandit.labs.overthewire.org -p 2220
Hints & Commands Learned
- cd
- cat
- vim
- cronjob
Steps to Solve
- Step 1 – Use
sshto get access to OverTheWire labs. - Step 2 - Use
cd /etc/cron.dto go to cronjobs directory. - Step 3 - Use
cat /usr/bin/cronjob_bandit23.shto see what it’s running. - Step 4 - Use
vim /var/spool/bandit24/foo/foo.txtto create a file that runs asbandit24user. - Step 5 - Add content for
foo.txt:
#!/bin/bash
cat /etc/bandit_pass/bandit24 > /tmp/bandit24pass
- Step 6 - Use
cat bandit24passto get the password.
Next Level Password
gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8
Bandit Level 24 → Level 25
(Updated: 4 August 2025)
Credentials
- Username:
bandit24 - Password:
gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8
Connection
ssh bandit24@bandit.labs.overthewire.org -p 2220
Hints & Commands Learned
- cat
- vim
- mktemp
Steps to Solve
- Step 1 – Use
sshto get access to OverTheWire labs. - Step 2 - Use
mktemp -dto create temp directory to work with. - Step 3 - Move to that temp directory.
- Step 4 - Use
vim create_possibilitiesto create a file containing possibilities to get the password. - Step 5 - Add content for
create_possibilities:
#!/bin/bash
for i in {0000.9999}
do
echo gb8KRRCsshuZXI0tUuR6ypOFjiZbf3G8 $i >> possibilities.txt
done
- Step 6 - Change permission for
create_possibilitiesand run it.
chmod +x create_possibilities
./create_possibilities
- Step 7 - Use
cat possibilities.txt | nc localhost 30002 > result.txtto get the password in fileresult.txt.
Next Level Password
iCi86ttT4KSNe1armKiwbQNmB3YJP3q4
Bandit Level 25 → Level 26
(Updated: 4 August 2025)
Credentials
- Username:
bandit25 - Password:
iCi86ttT4KSNe1armKiwbQNmB3YJP3q4
Connection
ssh bandit25@bandit.labs.overthewire.org -p 2220
Hints & Commands Learned
- ssh
Steps to Solve
- Step 1 – Use
sshto get access to OverTheWire labs. - Step 2 - Try to login to
bandit26->ssh -i bandit26.sshkey bandit26@localhost -p 2220. - Step 3 - Make the terminal to the smallest.
- Step 4 - Try connecting to
bandit26again. PressV->:set shell=/bin/bash->:shell. - Step 5 - Move to level 26.
Next Level Password
NOT FOUND!
