Level 5 → Level 6

옥영진·2020년 5월 15일
0

Bandit - OverTheWire

목록 보기
6/33

Level 5 → Level 6

목표

Level Goal
The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:

human-readable
1033 bytes in size
not executable

Commands you may need to solve this level
ls, cd, cat, file, du, find

다음 레벨로 가는 패스워드는 inhere라는 디렉토리 내에 다음과 같은 속성들을 가진 파일 내에 있다고 한다.

  • 사람이 읽을 수 있는 형태
  • 파일 크기가 1033 byte
  • 비 실행파일

해결

cd ~/inhere
ls -arl ./*

inhere 디렉토리에는 maybehere00부터 maybehere19까지 많은 디렉토리들이 존재하고 그 안에도 많은 파일들이 존재한다.
이 때 find 명령어를 통해 원하는 파일을 찾을 수 있다. 다음 레벨로 가는 패스워드를 가진 파일은 그 크기가 1033 byte라고 했다.

find ./ -size 1033c

find 명령어에서 -size 옵션을 통해 1033 byte 크기를 가진 파일을 찾아낸다.

cat ./maybehere07/.file2

찾은 파일의 내용을 출력하면 다음 레벨로 가는 패스워드를 얻을 수 있다.

profile
안녕하세요 함께 공부합시다

0개의 댓글