Bandit Level 30 → Level 31

장일영·2024년 5월 13일

Bandit

목록 보기
31/33

Level

Goal

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

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

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

저장소를 클론해 다음 레벨의 패스워드를 찾아라.

Commands you may need to solve this level

git

Exploit

bandit30@bandit:/tmp/tmp.J7BG9OvZpE/repo$ cat README.md
just an epmty file... muahaha

bandit30@bandit:/tmp/tmp.J7BG9OvZpE/repo$ git log --all
commit d39631d73f786269b895ae9a7b14760cbf40a99f (HEAD -> master, origin/master, origin/HEAD)
Author: Ben Dover <noone@overthewire.org>
Date:   Thu Oct 5 06:19:45 2023 +0000

    initial commit of README.md

모든 branch의 커밋 로그를 확인해 보았으나 애초에 README.md 파일이 작성된 이후로 변경된 부분이 없다. 다른 branch도 없다. 이런 경우에는 레퍼런스를 확인해보는 방법이 있다. branch는 제거되었지만 해당 branch가 가리키던 commit은 여전히 기록으로 남아 있을 수 있다.

bandit30@bandit:/tmp/tmp.J7BG9OvZpE/repo$ git show-ref
d39631d73f786269b895ae9a7b14760cbf40a99f refs/heads/master
d39631d73f786269b895ae9a7b14760cbf40a99f refs/remotes/origin/HEAD
d39631d73f786269b895ae9a7b14760cbf40a99f refs/remotes/origin/master
831aac2e2341f009e40e46392a4f5dd318483019 refs/tags/secret

bandit30@bandit:/tmp/tmp.J7BG9OvZpE/repo$ git show d39631d73f786269b895ae9a7b14760cbf40a99f

0개의 댓글