Bandit Level 2 → Level 3

장일영·2024년 5월 10일

Bandit

목록 보기
3/33

Level

Goal

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

다음 레벨의 패스워드는 home 디렉토리의 spaces in this filename 파일에 저장되어 있다.

Commands you may need to solve this level

ls , cd , cat , file , du , find

Helpful Reading Material

Google Search for “spaces in filename”

Exploit

리눅스 파일에는 일반적으로 이름에 공백이 포함되어 있지 않다. 공백을 포함한 이름으로 파일을 생성하는 것은 가능하나 굳이? 하지 않는 것이 좋다.

command [options] arg1... arg2...

리눅스 명령어는 일반적으로 위와 같은 형태다. 따라서 파일명에 공백이 포함되어 있으면 하나의 파일명이 별도의 인수로 처리된다.

cat "spaces in this filename"
cat spaces\ in\ this\ filename
cat ./*
cat ./sp*

0개의 댓글