카테고리 없음

Bandit Level 1 → Level 2 풀이

TwoIceFish 2019. 4. 26. 12:55

Level Goal

The password for the next level is stored in a file called - located in the home directory

Commands you may need to solve this level

ls, cd, cat, file, du, find

Helpful Reading Material


 

1. bandit1 로그인

boJ9jbbUNNfktd78OOpsqOltutMc3MY1

 

2. 파일 정보확인

bandit1@bandit:~$ ls -l
total 4
-rw-r----- 1 bandit2 bandit1 33 Oct 16  2018 -

ls -l 으로 현재 폴더에 존재하는 파일에대해 상세정보를 조회할 수 있다. 파일의 이름은 - 이며 파일소유자는 bandit2이며 그룹이름은 bandit1이다. 소유자 bandit2는 읽기 쓰기(r/w)를 할수있고 그룹에 속한 bandit1은 읽기(r)만 가능하다.

 

3. 파일 내용읽기

bandit1@bandit:~$ cat ./-
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

cat 으로 파일내용을 출력할 것인데 현재 디렉토리(./)의 파일이름(-)을 출력해달라고 작성한 문장이다. cat 바로다음 - 를 입력하게되면 옵션시작 문자열로 인식이되어 조회가 불가능하다.

 

4. bandit2 비밀번호

CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9