힌트를 확인해보자.
The password for the next level is stored in the only human-readable file in the inheredirectory. Tip: if your terminal is messed up, try the “reset” command.
음... 사람이 읽을 수 있는 파일이고 inhere 디렉토리 안에 있다고 한다.
일단 한번 확인해보기로 했다.
힌트에서 말했던 디렉토리가 보인다.
한번 들어가 보았다.
cd /home/bandit4/inhere
여기서 확인을 해보면 여러가지들이 나오는데 힌트대로라면 이중에 있다는 이야기가 된다
그렇다면 여기서 사람이 읽을 수 있는 파일이 무엇인지 파일 유형을 살펴봐야 할 것이다.
그래서 file 명령어를 활용하기로 했다.
file ./*
-file07이 패스워드 인것 같지만 권한을 확인해 봐야 하기 때문에 ls -al을 확인해서 권한을 보았다.
level5의 권한을 가지고 있고 읽을 수 있는 권한을 가지고 있었다.
그래서 -file07이 패스워드일 것이다.
cat 으로 확인해봤다.
cat < '-file07'
문제가 해결되었다.
'CTF > Pwnable' 카테고리의 다른 글
How to using Linux Bandit Level 6 ~ Level 7 (0) | 2024.01.30 |
---|---|
How to using Linux Bandit Level 5 ~ Level 6 (0) | 2024.01.30 |
How to using Linux Bandit Level 3 ~ Level 4 (0) | 2024.01.30 |
How to using Linux Bandit Level 2 ~ Level 3 (0) | 2024.01.30 |
How to using Linux Bandit Level 1 ~ Level 2 (0) | 2024.01.30 |