Level Goal

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

 

ssh://bandit31-git@localhost/home/bandit31-git/repo에 git 저장소가 있습니다. bandit31-git 사용자의 비밀번호는 bandit31 사용자의 비밀번호와 동일합니다.

저장소를 복제하고 다음 레벨의 비밀번호를 찾으십시오.

Hint

1. git의 .gitignore

Write Up

더보기

위 사진과 같이 /tmp/lrtk 디렉토리를 생성하여 git clone을 진행하였다.

 

git clone을 이용하여 다운로드한 repo 디렉토리를 확인해보니, .gitignore 파일이 있었다.
해당 파일은 git을 사용할 때 무시하고 싶은 파일 리스트이다.

 

.gitignore 파일의 내용을 확인해보니, 확장자가 txt인 파일을 모두 무시한다고 써져있었다.

 

로그를 살펴보니, README.md의 내용이 key.txt이라는 파일과 코멘트로 "들어가도 될까요?"이라는 힌트를 주고 있었다.

 

혹시 또 다른 브랜치가 있는지 확인해봤지만, 별다른 건 없었다.

 

나는 README.md에 나온 코멘트를 그대로 key.txt에 넣어주고 git add 옵션을 사용하여 배포 항목에 넣어줬다.
여기서 주의할 점은 .gitignore 파일 때문에 -f를 넣어줘서 추가해줘야한다.

 

그 이후 commit를 진행하였다.
 

이후 local repository에 있는 key.txt 파일을 remote repository에 업로드하였는데, 경고문이 뜨면서 bandit32의 pw를 출력하였다.

 

bandit32 :: 56a9bf19c63d650ce78e6ec0354ee45e

 

복사했습니다!