OverTheWire Bandit Levels 31-34
Level 31
There is a git repository at ssh://bandit31-git@localhost/home/bandit31-git/repo. The password for the user bandit31-git is the same as for the user bandit31.
Clone the repository and find the password for the next level.
bandit31@bandit:~$ cd /tmp/scottctaylor12
bandit31@bandit:/tmp/scottctaylor12$ git clone ssh://bandit31-git@localhost/home/bandit31-git/repo
bandit31-git@localhost's password:
bandit31@bandit:/tmp/scottctaylor12$ cd repo/
bandit31@bandit:/tmp/scottctaylor12/repo$ ls
README.md
bandit31@bandit:/tmp/scottctaylor12/repo$ cat README.md
This time your task is to push a file to the remote repository.
Details:
File name: key.txt
Content: 'May I come in?'
Branch: master
bandit31@bandit:/tmp/scottctaylor12/repo$ echo "May I come in?" > key.txt
bandit31@bandit:/tmp/scottctaylor12/repo$ ls
key.txt README.md
bandit31@bandit:/tmp/scottctaylor12/repo$ git add key.txt
bandit31@bandit:/tmp/scottctaylor12/repo$ git commit -m "bandit31 task"
bandit31@bandit:/tmp/scottctaylor12/repo$ git push
bandit31-git@localhost's password:
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 320 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 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: <PASSWORD>
remote:
remote: .oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.oOo.
remote:
To ssh://localhost/home/bandit31-git/repo
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'ssh://bandit31-git@localhost/home/bandit31-git/repo'
bandit31@bandit:/tmp/scottctaylor12/repo$ ssh bandit32@localhost
bandit32@localhost's password:
Level 32
After all this git stuff its time for another esape. Good luck!
WELCOME TO THE UPPERCASE SHELL
>> $0
ls
uppershell
bash -i
bandit33@bandit:~$ whoami
whoami
bandit33
bandit33@bandit:~$ cat /etc/bandit_pass/bandit33
cat /etc/bandit_pass/bandit33
<PASSWORD>
bandit33@bandit:~$
Level 33
At this moment, level 34 does not exist yet.