티스토리 뷰

Wargame/Bandit

Bandit Level 28 → Level 29

장일영 2024. 5. 16. 13:39

 

Goal

There is a git repository at ssh://bandit28-git@localhost/home/bandit28-git/repo via the port 2220. The password for the user bandit28-git is the same as for the user bandit28.

Clone the repository and find the password for the next level.

2220번 포트를 통해 `ssh://bandit28-git@localhost/home/bandit28-git/repo`에 접속하면 git 저장소에 접근할 수 있다. bandit28-git 유저의 패스워드는 bandit28 유저의 패스워드와 동일하다.

저장소를 클론해 다음 레벨의 패스워드를 찾아라.
 
Commands you may need to solve this level
`git`
 

Write Up

bandit28@bandit:/tmp/tmp.k4AGJLMlTw$ git clone ssh://bandit28-git@localhost:2220/home/bandit28-git/repo

 
임시 디렉토리를 생성하고 주어진 git 저장소를 클론한다.

bandit28@bandit:/tmp/tmp.k4AGJLMlTw/repo$ cat README.md
# Bandit Notes
Some notes for level29 of bandit.

## credentials

- username: bandit29
- password: xxxxxxxxxx

 
`README.md` 파일을 보면 bandit29 계정의 패스워드에 대한 부분이 있으나 볼 수 없다. 하지만 git 저장소를 확인했기 때문에 추가적으로 확인해볼 수 있는 부분이 남아 있다. 가장 먼저 확인해볼 만한 것은 log다. 커밋 내역을 확인하면 다음과 같다.

bandit28@bandit:/tmp/tmp.k4AGJLMlTw/repo$ git log
commit 14f754b3ba6531a2b89df6ccae6446e8969a41f3 (HEAD -> master, origin/master, origin/HEAD)
Author: Morla Porla <morla@overthewire.org>
Date:   Thu Oct 5 06:19:41 2023 +0000

    fix info leak

commit f08b9cc63fa1a4602fb065257633c2dae6e5651b
Author: Morla Porla <morla@overthewire.org>
Date:   Thu Oct 5 06:19:41 2023 +0000

    add missing data

commit a645bcc508c63f081234911d2f631f87cf469258
Author: Ben Dover <noone@overthewire.org>
Date:   Thu Oct 5 06:19:41 2023 +0000

    initial commit of README.md

 
comment만 봐서는 어떤 내용을 어떻게 변경했는지 알기 어려운데, 가장 마지막 커밋의 결과물은 이미 확인했으니 아래 두 개의 내용만 확인해보면 될 것 같다.

bandit28@bandit:/tmp/tmp.k4AGJLMlTw/repo$ git show f08b9cc63fa1a4602fb065257633c2dae6e5651b

'Wargame > Bandit' 카테고리의 다른 글

Bandit Level 30 → Level 31  (0) 2024.05.16
Bandit Level 29 → Level 30  (0) 2024.05.16
Bandit Level 27 → Level 28  (0) 2024.05.16
Bandit Level 26 → Level 27  (0) 2024.05.16
Bandit Level 25 → Level 26  (0) 2024.05.16
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2026/06   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함