Level 9 → Level 10

옥영진·2020년 5월 16일
0

Bandit - OverTheWire

목록 보기
10/33

Level 9 → Level 10

목표

Level Goal
The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters.

Commands you may need to solve this level
grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

다음 레벨로 가는 패스워드는 data.txt 파일에 사람이 읽을 수 있고, 여러 개의 = 문자열로 시작한다고 한다.

해결

file 명령어를 사용하면 data.txt 가 data 파일이라는 것을 알 수 있다. 파일 내용을 살펴보면 대부분 읽을 수 없는 형태로 되어 있다.

strings ./data.txt | grep =

strings 명령어를 통해 data.txt 파일 내에 읽을 수 있는 내용들만 추출하여 grep 명령어의 입력으로 전달하여 그 중 = 문자열만 필터링 하여 출력한다. 출력된 내용 중 패스워드로 추측할 수 있는 문자열을 볼 수 있다.

  • strings
    파일 내용 중 읽을 수 있는 내용들만 추출하는 명령어다.
profile
안녕하세요 함께 공부합시다

0개의 댓글