Level Goal

The password for the next level is stored in the file data.txt next to the word millionth

Commands you may need to solve this level

grep, sort, uniq, strings, base64, tr, tar, gzip, bzip2, xxd

data.txt 파일 내용 중 millionth 옆에 비밀번호가 있다고 합니다.

문제 풀이

data.txt 를 cat 명령어로 열어보면 무수히 많은 문자들이 반겨줍니다.

우리는 millionth 문자열 옆에 답이 있다는 것을 알기 때문에 이를 활용해 찾도록 하겠습니다.

grep "millionth" data.txt

를 사용해서 바로 찾을 수 있습니다.

의미는 data.txt에서 millionth라는 문자열을 가진 해당 줄을 출력한다 입니다.

**Linux 명령어 설명(누적)

ls : 현재 디렉토리에 있는 파일을 보여줍니다.

ls -a : 현재 디렉토리에 있는 파일을 숨겨진 파일까지 전부 보여줍니다.

cat [파일명] : [파일명]의 내용을 출력합니다.

cat ./[파일명] : 현재 디렉토리에 있는 [파일명]의 내용을 출력합니다.

cat [파\ 일\ 명] : linux는 공백을 기준으로 앞뒤를 서로 다른 파일로 인식합니다.

cd [디렉토리명] : 해당 디렉토리로 이동합니다.

cd .. : 현재 디렉토리의 상위 디렉토리로 이동합니다.

file [파일명] : [파일명] 파일의 종류를 출력합니다.

find [파일명] : [파일명]으로 된 파일을 찾습니다.

find -size [용량][단위] : [용량][단위]인 파일을 찾습니다.

(b:block, c:bytes, w:2bytes, k:kbytes, M:mbytes, G:gbytes)

find -user [user이름] : 소유중인 user 이름이 [user이름]인 파일을 찾습니다.

find -group [group이름] : 소유중인 group 이름이 [group이름]인 파일을 찾습니다.

grep "[문장]" [파일명] : [파일명]에서 [문장]이 속한 해당 줄을 출력합니다.(*)

* : 와일드카드, 문자를 대체하여 사용합니다.

'Hacking-기초 > Linux Bandit' 카테고리의 다른 글

Bandit Level 9 → Level 10  (0) 2020.04.10
Bandit Level 8 → Level 9  (0) 2020.04.10
Bandit Level 6 → Level 7  (0) 2020.04.10
Bandit Level 5 → Level 6  (0) 2020.04.10
Bandit Level 4 → Level 5  (1) 2020.04.10

+ Recent posts