Level 29 → Level 30

옥영진·2020년 5월 22일
0

Bandit - OverTheWire

목록 보기
30/33

Level 29 → Level 30

목표

Level Goal
There is a git repository at ssh://bandit29-git@localhost/home/bandit29-git/repo. The password for the user bandit29-git is the same as for the user bandit29.

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

Commands you may need to solve this level
git

이번에도 git 저장소를 clone하여 패스워드를 찾으면 된다.

해결

저장소를 clone하면 repo 디렉토리 내에 이전과 마찬가지로 README.md 파일이 존재한다. 해당 파일 내용은 아래와 같다.

# Bandit Notes
Some notes for bandit30 of bandit.

## credentials

- username: bandit30
- password: <no passwords in production!>

패스워드가 기록되어 있지 않았고, 최초 커밋으로 되돌려도 마찬가지였다.

git branch -a
git checkout dev
git log -p

git branch -a 명령어로 branch 목록을 조회했다. 그 후 git checkout dev 명령어를 사용하여 dev branch로 변경했다.
git log -p 명령어를 사용하여 해당 branch 변경 이력을 조회했더니 README.md 파일에서 패스워드를 추가한 이력이 존재했다. 커밋 메세지가 add data needed for development인 걸 보아 개발 과정 중에 필요에 의해 패스워드를 기록해놓은 것으로 예상된다. 해당 이력을 통해 다음 레벨로 가는 패스워드를 얻을 수 있다.

profile
안녕하세요 함께 공부합시다

0개의 댓글