Bandit Level 27 → Level 28

장일영·2024년 5월 13일

Bandit

목록 보기
28/33

Level

Goal

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

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

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

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

Commands you may need to solve this level

git

Exploit

bandit27@bandit:~$ ls -al
total 20
drwxr-xr-x  2 root root 4096 Oct  5  2023 .
drwxr-xr-x 70 root root 4096 Oct  5  2023 ..
-rw-r--r--  1 root root  220 Jan  6  2022 .bash_logout
-rw-r--r--  1 root root 3771 Jan  6  2022 .bashrc
-rw-r--r--  1 root root  807 Jan  6  2022 .profile

현재 홈 디렉토리에 w 권한이 없으므로 임시 디렉토리를 생성해 해당 디렉토리 하위에 저장소를 클론해야 한다.

bandit27@bandit:~$ cd $(mktemp -d)
bandit27@bandit:/tmp/tmp.neA9UuNYJG$ git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo

0개의 댓글