[OverTheWire] Bandit Level 28 → 29
There is a git repository at ssh://bandit28-git@localhost/home/bandit28-git/repo. The password for the user bandit28-git is the same as for
[OverTheWire] Bandit Level 28 → 29

https://overthewire.org/wargames/bandit/bandit29.html
Goal
There is a git repository at
*ssh://bandit28-git@localhost/home/bandit28-git/repo. The password for the user `bandit28-git* is the same as for the userbandit28`.
Clone the repository and find the password for the next level.
Possible commands to solve this level
*git*
┌─────────┬────────────────────────────────────────────────┐
│ Command │ Explanation │
├─────────┼────────────────────────────────────────────────┤
│ git │ Git is a version control system to keep track │
│ │ of changes to files and projects over time │
└─────────┴────────────────────────────────────────────────┘
Write Up
Information
Host Name : bandit.labs.overthewire.org
Username : bandit28
Password : 0ef186ac70e04ea33b4c1853d2526fa2
Port Number : 2220
To find the password for Level 29
[# Step 1]: Connect and login to the account with the username & password stated above.
[# Step 2]: As mentioned in the description, to obtain bandit29‘s password, we are require to “clone the repository”. In other words, we have to create a copy of the repository.
Since a WRITE permission is needed to create a copy of the repository. Hence, we can’t clone it in the home directory (~/) with only a READ permission. Therefore, we have to create a temporary folder in /tmp directory FIRST, before cloning the repository. In this case, I will named my temporary folder as myBandit28:
bandit28@bandit:~$ mkdir /tmp/myBandit28
bandit28@bandit:~$ cd /tmp/myBandit28
bandit28@bandit:/tmp/myBandit28$
[# Step 3]: Next, in myBandit28 folder, we will clone the repository by using the **git clone command:
`git clone** ssh://bandit28-git@localhost/home/bandit28-git/repoand enterbandit28`‘s password when prompt. The git will then create a working copy of the cloned repository.
As mentioned in the previous level, the command git clone will clone a repository into a new directory.
bandit28@bandit:/tmp/myBandit28$ git clone ssh://bandit28-git@localhost/home/bandit28-git/repo
Cloning into 'repo'...
Could not create directory '/home/bandit28/.ssh'.
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:98UL0ZWr85496EtCRkKlo20X3OPnyPSB5tB5RPbhczc.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/bandit28/.ssh/known_hosts).
This is a OverTheWire game server. More information on http://www.overthewire.org/wargames
bandit28-git@localhost's password: 0ef186ac70e04ea33b4c1853d2526fa2
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (9/9), done.
Resolving deltas: 100% (2/2), done.
[# Step 4]: After cloning, executing ls will display a folder named repo. After changing directory to repo, running ls again will display a file named README.md. However, reading the file, we will noticed that bandit29‘s password is hidden: xxxxxxxxxx.
bandit28@bandit:/tmp/myBandit28$ ls
repo
bandit28@bandit:/tmp/myBandit28$ cd repo/
bandit28@bandit:/tmp/myBandit28/repo$ ls
README.md
bandit28@bandit:/tmp/myBandit28/repo$ cat README.md
# Bandit Notes
Some notes for level29 of bandit.
## credentials
- username: bandit29
- password: xxxxxxxxxx
[# Step 5]: Fortunately, the beauty of Git is whenever a change is committed (made), a log entry is created. Thus, we can study the repository history by running the git log command to view any recent commits.
[What is
*git log* ?]:
The Git Log tool allows you to view information about previous commits that have occurred in a project. The simplest version of the log command shows the commits that lead up to the state of the currently checked out branch. These commits are shown in REVERSE chronological order (the most recent commits first).
10 Essential Git Log Command Examples on Linux to View Commits
bandit28@bandit:/tmp/myBandit28/repo$ git log
commit edd935d60906b33f0619605abd1689808ccdd5ee
Author: Morla Porla <morla@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
fix info leak
commit c086d11a00c0648d095d04c089786efef5e01264
Author: Morla Porla <morla@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
add missing data
commit de2ebe2d5fd1598cd547f4d56247e053be3fdc38
Author: Ben Dover <noone@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
initial commit of README.md
Indeed, in the latest commit, the comment: “fix info leak” sounds interesting. We need to check out this commit edd935d60906b33f0619605abd1689808ccdd5ee.
[# Step 6]: To checkout the commit, perform:
**git show** edd935d60906b33f0619605abd1689808ccdd5ee. The git show command will display the log message and textual differences. In other words, it will display the changes made.
bandit28@bandit:/tmp/myBandit28/repo$ git show edd935d60906b33f0619605abd1689808ccdd5ee
commit edd935d60906b33f0619605abd1689808ccdd5ee
Author: Morla Porla <morla@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
fix info leak
diff --git a/README.md b/README.md
index 3f7cee8..5c6457b 100644
--- a/README.md
+++ b/README.md
@@ -4,5 +4,5 @@ Some notes for level29 of bandit.
## credentials
- username: bandit29
-- password: bbc96594b4e001778eee9975372716b2
+- password: xxxxxxxxxx
As expected, running git show display the bandit29‘s password.
[# Step 7]: To logout:
- First, perform
rm -rf /tmp/myBandit28to removed the temporary file created. - Finally, execute
exitto quit the program.
Solution
[# Step 1]
> ~ ssh bandit28@bandit.labs.overthewire.org -p 2220
This is a OverTheWire game server. More information on http://www.overthewire.org/wargames
bandit28@bandit.labs.overthewire.org's password:
0ef186ac70e04ea33b4c1853d2526fa2
[# Step 2]
bandit28@bandit:~$ mkdir /tmp/myBandit28
bandit28@bandit:~$ cd /tmp/myBandit28
[# Step 3]
bandit28@bandit:/tmp/myBandit28$ git clone ssh://bandit28-git@localhost/home/bandit28-git/repo
Cloning into 'repo'...
Could not create directory '/home/bandit28/.ssh'.
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ECDSA key fingerprint is SHA256:98UL0ZWr85496EtCRkKlo20X3OPnyPSB5tB5RPbhczc.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/home/bandit28/.ssh/known_hosts).
This is a OverTheWire game server. More information on http://www.overthewire.org/wargames
bandit28-git@localhost's password: 0ef186ac70e04ea33b4c1853d2526fa2
remote: Counting objects: 9, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 9 (delta 2), reused 0 (delta 0)
Receiving objects: 100% (9/9), done.
Resolving deltas: 100% (2/2), done.
[# Step 4]
bandit28@bandit:/tmp/myBandit28$ ls
repo
bandit28@bandit:/tmp/myBandit28$ cd repo/
bandit28@bandit:/tmp/myBandit28/repo$ ls
README.md
bandit28@bandit:/tmp/myBandit28/repo$ cat README.md
# Bandit Notes
Some notes for level29 of bandit.
## credentials
- username: bandit29
- password: xxxxxxxxxx
[# Step 5]
bandit28@bandit:/tmp/myBandit28/repo$ git log
commit edd935d60906b33f0619605abd1689808ccdd5ee
Author: Morla Porla <morla@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
fix info leak
commit c086d11a00c0648d095d04c089786efef5e01264
Author: Morla Porla <morla@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
add missing data
commit de2ebe2d5fd1598cd547f4d56247e053be3fdc38
Author: Ben Dover <noone@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
initial commit of README.md
[# Step 6]
bandit28@bandit:/tmp/myBandit28/repo$ git show edd935d60906b33f0619605abd1689808ccdd5ee
commit edd935d60906b33f0619605abd1689808ccdd5ee
Author: Morla Porla <morla@overthewire.org>
Date: Thu May 7 20:14:49 2020 +0200
fix info leak
diff --git a/README.md b/README.md
index 3f7cee8..5c6457b 100644
--- a/README.md
+++ b/README.md
@@ -4,5 +4,5 @@ Some notes for level29 of bandit.
## credentials
- username: bandit29
-- password: bbc96594b4e001778eee9975372716b2
+- password: xxxxxxxxxx
[# Step 7]
bandit28@bandit:/tmp/myBandit28/repo$ rm -rf /tmp/myBandit28
bandit28@bandit:/tmp/myBandit28/repo$ exit
logout
Connection to bandit.labs.overthewire.org closed.
Level 29’s Username & Password
Username : bandit29
Password : bbc96594b4e001778eee9975372716b2
Level 28 Completed !
Resources
https://explainshell.com/
https://git-scm.com/docs/user-manual
https://rogerdudler.github.io/git-guide/
https://www.thegeekstuff.com/2014/04/git-log/
Previously …
To Continue …
메타데이터
- post_id
- 41cbf0409d1c
- slug
- overthewire-bandit-level-28-29-41cbf0409d1c
- url
- https://medium.com/@h.nt/overthewire-bandit-level-28-29-41cbf0409d1c
- canonical_url
- https://medium.com/@h.nt/overthewire-bandit-level-28-29-41cbf0409d1c
- author_url
- https://medium.com/@h.nt
- status
- ok
- fetched_at
- 2026-06-25 07:00:49