메-모해봅시다.

Bandit Level 2 → Level 3 본문

리눅스/Over The Wire

Bandit Level 2 → Level 3

RollingPumpkin 2020. 5. 8. 15:45

Level Goal

The password for the next level is stored in a file called spaces in this filename located in the home directory

Commands you may need to solve this level

ls, cd, cat, file, du, find


목표

 

다음 단계로 가는 비밀번호는 홈 디렉토리의 spaces in this filename(이 파일명에 공백)라는 파일에 있습니다.

 

이 단계를 해결할 때 유용한 명령어

 

ls, cd, cat, file, du, find



-어떻게 풀까?


이번 단계는 정석으로 푸는 방법은 아마도 리눅스에서 공백으로 처리되는 \(백스페이스)로 공잭을 입력해 cat spaces\ in\ this\ filename으로 여는 방법일 것이다.

그러나 조금 더 쉽게 푸는 방법이 있다면 존재하는 파일명을 자동완성해주는 tap키를 이용하는 것이다.

cat s 까지 입력한 후 tap키를 누르면 존재하는 파일명중에 s로 시작하는 유일한 파일인 spaces in this filename이 자동완성되어 입력된다.

추가로 spaces in this filename외에도 spaces file이라는 파일이 존재한다고 가정했을 때 cat s 를 입력하고 tap을 누를 시 공통적으로 포함되는 시작단어인 spaces까지만 자동완성이 된다.

이 후 i를 입력하고 tap키를 누르면 spaces in this filename이 자동완성될 것이고, f를 입력하고 tap키를 누르면 spaces file이 자동완성될 것이다.

cat s를 치고 tap키를 누르든 정직하게 전부 입력하든 같은 모양이 될 것이다.

비밀번호인 UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK 를 알아냈으니 다음 단계로 넘어가도록 하자

bandit3 접속

 

'리눅스 > Over The Wire' 카테고리의 다른 글

Bandit Level 4 → Level 5  (0) 2020.05.08
Bandit Level 3 → Level 4  (0) 2020.05.08
Bandit Level 1 → Level 2  (0) 2020.05.08
Bandit Level 0 → Level 1  (0) 2020.05.08
Bandit Level 0  (0) 2020.05.08