Skip to content

Commit

Permalink
feat: finished bandit
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredgamulo committed Jun 17, 2023
1 parent 25679d8 commit e9bc4f7
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OverTheWire/Bandit/29.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ tQKvmcwNYcFS6vmPHIUSI3ShmsrQZK8S
```

```
bandit28@bandit:~$ git clone ssh://bandit29-git@localhost:2220/home/bandit29-git/repo /tmp/derp
bandit28@bandit:/tmp/derp$ cat README.md
bandit29@bandit:~$ git clone ssh://bandit29-git@localhost:2220/home/bandit29-git/repo /tmp/derp
bandit29@bandit:/tmp/derp$ cat README.md
# Bandit Notes
Some notes for bandit30 of bandit.
Expand Down
8 changes: 6 additions & 2 deletions OverTheWire/Bandit/30.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ xbhV3HpNGlTIdnjUrdAlPzc2L6y9EOnS
```

```
bandit28@bandit:~$ git clone ssh://bandit30-git@localhost:2220/home/bandit30-git/repo /tmp/derp
bandit28@bandit:/tmp/derp$ cat README.md
bandit30@bandit:~$ git clone ssh://bandit30-git@localhost:2220/home/bandit30-git/repo /tmp/derp
bandit30@bandit:/tmp/derp$ cat README.md
just an epmty file... muahaha
bandit30@bandit:/tmp/derp$ git tag
secret
bandit30@bandit:/tmp/derp$ git show secret
OoffzGDlzhAlerFJ2cAiz1D41JW1Mhmt
```
39 changes: 39 additions & 0 deletions OverTheWire/Bandit/31.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Bandit Level 31

```
ssh [email protected] -p 2220
OoffzGDlzhAlerFJ2cAiz1D41JW1Mhmt
```

```
bandit31@bandit:~$ git clone ssh://bandit31-git@localhost:2220/home/bandit31-git/repo /tmp/derp
$ 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
...
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 2 threads
Compressing objects: 100% (2/2), done.
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: rmCBvG56y58BXzv98yZGdO7ATVL5dW8y
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'
```
32 changes: 32 additions & 0 deletions OverTheWire/Bandit/32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Bandit Level 32

```
ssh [email protected] -p 2220
rmCBvG56y58BXzv98yZGdO7ATVL5dW8y
```

```
❯ ssh [email protected] -p 2220 -t /bin/zsh
_ _ _ _
| |__ __ _ _ __ __| (_) |_
| '_ \ / _` | '_ \ / _` | | __|
| |_) | (_| | | | | (_| | | |_
|_.__/ \__,_|_| |_|\__,_|_|\__|
This is an OverTheWire game server.
More information on http://www.overthewire.org/wargames
[email protected]'s password:
WELCOME TO THE UPPERCASE SHELL
>> $0
$ /bin/bash
bandit33@bandit:~$ cat /etc/bandit_pass/bandit33
odHo63fHiFqcWWJG9rLiLDtPm45KzUKy
```


What is $0 in a Bash Script?

The name of the terminal or shelled script is expanded using “$0”. At shell initialization, this is set. $0 is assigned to the name of that directory if Bash is called with a collection of commands. To put it simply, we utilize “$0” in bash to store the name of the script and display it in the terminal. The parameters for the bash command on Linux are “$0,” “$1,” and “$2, etc. The first one stores the name of the script, the second one stores the first value, and so on.
18 changes: 18 additions & 0 deletions OverTheWire/Bandit/33.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Bandit Level 33

```
ssh [email protected] -p 2220
odHo63fHiFqcWWJG9rLiLDtPm45KzUKy
```

```
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!
```

0 comments on commit e9bc4f7

Please sign in to comment.