root@hfairy:~$

[Bandit] Level 2 - Level 3 본문

워게임/Bandit

[Bandit] Level 2 - Level 3

hfairy 2021. 11. 29. 02:57

 

https://overthewire.org/wargames/bandit/

 

OverTheWire: Bandit

We're hackers, and we are good-looking. We are the 1%. Bandit The Bandit wargame is aimed at absolute beginners. It will teach the basics needed to be able to play other wargames. If you notice something essential is missing or have ideas for new levels, p

overthewire.org

 

문제

문제를 해석하자면 홈 디렉터리에 위치하는 'spaces in this filename'라는 파일 안에 다음 단계로 넘어갈 수 있는 패스워드가 담겨있다고 한다.

 

더보기

ls: 디렉터리에 있는 내용(디렉터리, 파일 등)을 확인한다.

cd: 디렉터리를 이동한다.

cat: 명령어 뒤에 파일명을 함께 입력하면 그 파일의 내용을 출력한다.

file: 파일의 종류(type)를 확인한다.

du: 디렉터리나 파일의 사용량을 확인한다.

find: 파일 및 디렉터리를 검색한다.

 

bandit2로 접속한다. 패스워드는 전 단계에서 얻은 것을 입력하면 됩니다:)

문제에서 홈 디렉터리에 위치한 파일이라고 했으니까 ls 명령어를 이용해 저장된 파일을 확인한다.

음! 문제에 주어진 이름과 같은 파일이 존재하는 것을 확인했다.

그리고 자연스럽게 cat명령어로 파일을 열어보았다!

띠로리..ㅋㅋㅋ 이렇게 파일을 열면 spaces, in, this, filename 각각을 파일 이름으로 인식하는 것 같다.

그래서 한 파일명으로 인식할 수 있도록 'spaces in this filename'으로 묶어서 다시 cat명령어를 주었다.

성공~!

 

'워게임 > Bandit' 카테고리의 다른 글

[Bandit] Level 4 - Level 5  (0) 2025.12.31
[Bandit] Level 3 - Level 4 / [linux] hidden file  (0) 2025.12.31
[Bandit] Level 0 ~ Level 2  (0) 2021.08.19