Bandit Level 25 → Level 26

ls
cat bandit26.sshkey

Copy it to our local machine, and try to authenticate using it:

vim id_rsa
cat id_rsa
chmod 600 id_rsa
ssh bandit26@bandit.labs.overthewire.org -p 2220 -i id_rsa

It is immediately closing.

Lets check what bandit26 is running:

cat /etc/passwd | grep ^bandit26

It is more command.

We can minimize our terminal until we get this more:

After that we will convert to visual mode by pressing the v letter:

We will set the shell to /bin/bash:

:set shell=/bin/bash

And the execute the shell:

:shell

And we will get the password from the /etc/bandit_pass/bandit26:

cat /etc/bandit_pass/bandit26

This is the password, but we do not need it actually.

Last updated