Wargame/bandit

Bandit Level 9 -> Level 10

핏디 2021. 4. 4. 13:40
SMALL

[문제]


[풀이]

> ls -al 명령어를 통해 data.txt 파일을 확인할 수 있다.

 

> file 명령어를 통해 data.txt 의 파일 형태를 확인해보니 사람이 읽을 수 없는 data 형(바이너리) 파일이었다.

 

> cat 명령어를 통해 data.txt 파일을 열어보니 부분적으로 문자와 숫자로 저장되어 있지만 대부분 읽을 수 없었다.

> 이 파일 속에서 '=' 이 포함된 문자열을 찾아야 한다.

 

> strings 명령어를 통해 '=' 이 포함된 문자열을 출력한 결과, 패스워드를 획득할 수 있었다.


[핵심]

1. strings 명령어

> 바이너리 파일, 실행 파일에서 문자열을 추출하는 명령어

> strings [option] [file] 형태로 사용

> 주로 grep 명령어와 함께 사용

 

strings 명령어 옵션

 


[출처]

blog.naver.com/bomyzzang/220217101708

 

Linux Strings Command 문자열 추출

strings 오브젝트 파일(바이너리 파일)의 내용을 확인하기 위해서 vi 또는 cat 명령을 사용할수 없다, 그렇...

blog.naver.com

 


 

LIST

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

Bandit Level 11 -> Level 12  (0) 2021.04.04
Bandit Level 10 -> Level 11  (0) 2021.04.04
Bandit Level 8 -> Level 9  (0) 2021.04.04
[리눅스] Bandit Level 7 -> Level 8  (0) 2021.04.04
[리눅스] Bandit Level 6 -> Level 7  (0) 2021.04.04