-
OverTheWire: Level Goal: Bandit Level 5 → Level 6 풀이2021 SCP Mentoring/OverTheWire: Bandit 2021. 4. 26. 00:20
문제 inhere diretory 안에 어딘가에 있는 파일에서 password를 확인할 수 있다고 한다.
파일의 조건은 다음과 같다
- 사람이 읽을 수 있음
- 1033 bytes의 크기
- 실행 불가
ls 명령어를 통해 inhere directory 안의 내용을 살펴봤다.
엄청 많은 directory가 존재했고, 하나하나 열어보기에는 오래 걸리니 find 명령어를 사용하였다.
파일 조건에 나온 1033 byte의 크기를 이용하였고, find ./* -size 1033c(모든파일 중 1033 byte의 크기의 파일)을 사용하였다. 조건에 맞는 파일은 ./maybehere07/.file2 였고 해당 파일로 들어가 보았다.
maybehere07 diretory 로 들어가 ls 명령어를 통해 파일들을 확인해 보았는데 .file2 는 보이지 않았다.
ls -a 명령어를 통해 볼 수 있는 hidden file 이였고 .file2를 확인해 password DXjZPULLxYr17uwoI01bNLQbtFemEgo7를 얻을 수 있었다.
SSH 명령어를 사용하여 bandit6로 연결하고
$ ssh bandit6@bandit.labs.overthewire.org -p 2220
password에 DXjZPULLxYr17uwoI01bNLQbtFemEgo7 를 입력하였다.
'2021 SCP Mentoring > OverTheWire: Bandit' 카테고리의 다른 글
OverTheWire: Level Goal: Bandit Level 7 → Level 8 풀이 (0) 2021.05.01 OverTheWire: Level Goal: Bandit Level 6 → Level 7 풀이 (0) 2021.05.01 OverTheWire: Level Goal: Bandit Level 4 → Level 5 풀이 (0) 2021.04.26 OverTheWire: Level Goal: Bandit Level 3 → Level 4 풀이 (0) 2021.04.25 OverTheWire: Level Goal: Bandit Level 2 → Level 3 풀이 (0) 2021.04.25