Bandit Level 31 → Level 32

장일영·2024년 5월 13일

Bandit

목록 보기
32/33

Level

Goal

There is a git repository at ssh://bandit31-git@localhost/home/bandit31-git/repo via the port 2220. 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.

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

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

Commands you may need to solve this level

git

Exploit

bandit31@bandit:/tmp/tmp.JvaMeAuqzn/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

README.md 파일에서 이 레벨에서 해야하는 것은 리모트에 아래에 정의된 파일을 push 하는 것이다.

bandit31@bandit:/tmp/tmp.3VOqvQhGNV/repo$ echo "May I come in?" > ./key.txt
bandit31@bandit:/tmp/tmp.3VOqvQhGNV/repo$ git add -f "./key.txt"
bandit31@bandit:/tmp/tmp.3VOqvQhGNV/repo$ git commit -m "add key.txt"
[master 91f6677] add key.txt
 1 file changed, 1 insertion(+)
 create mode 100644 key.txt
bandit31@bandit:/tmp/tmp.3VOqvQhGNV/repo$ git push -u origin master

0개의 댓글