min8282

Bandit Level 2 -> Level 3 본문

Wargame/Bandit

Bandit Level 2 -> Level 3

min8282 2024. 4. 10. 04:28

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

Helpful Reading Material


이번 목표는 spaces(공백)이 포함된 파일명을 가진 파일을 읽어 보는 것이다.

 

ls로 전체 파일리스트를 확인해 보면 spaces in this filename 이라는 파일이 있다.

해당 파일을 읽기 위해서 cat spaces in this filename으로 시도해 봤지만 확인 불가. 파일명에 공백이 있어서 spaces, in, this, filename을 각각 4개의 파일명으로 받아 들여짐.

 

검색결과 공백이 있는 파일은 ''(싱글쿼츠/홑따옴표)를 사용해서 파일명을 감싸 전달하면 된다는 것을 확인

 

공백이 있는 파일도 확인 성공!

aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG

 

다른 방법으로는 공백 앞에 \(역슬래시)를 붙여서 작성해도 가능하다.

 

'Wargame > Bandit' 카테고리의 다른 글

Bandit Level 4 -> Level 5  (1) 2024.04.11
Bandit Level 3 -> Level 4  (0) 2024.04.11
Bandit Level 1 -> Level 2  (0) 2024.04.10
Bandit Level 0 -> Level 1  (0) 2024.04.10
Bandit Level 0  (0) 2024.04.10