CTF_Write_UP/overthewire

Overthewire : Bandit Level 1 → Level 2

PowerCo3e_LCH 2019. 4. 11. 15:48

 

시작

안녕하세요 :D

이번에는 지난 시간에 얻었던 bandit1의 패스워드로 Level 1 → Level 2로 가봅시다!!

root@goorm:/# ssh bandit1@bandit.labs.overthewire.org -p2220

문제

Level Goal

The password for the next level is stored in a file called - located in the home directory

Level 0 → Level 1과 비슷한 느낌이네요.

home 디렉터리에 -라는 파일이 bandit2의 패스워드를 가지고 있나 봅니다.

지난번과 똑같이 ls 명령어로 확인해볼까요?

bandit1@bandit:~$ ls -l
total 4
-rw-r----- 1 bandit2 bandit1 33 Oct 16 14:00 -

- 라는 파일이 있네요.

cat 명령어로 바로 확인해봅시다!!

bandit1@bandit:~$ cat -

..아무런 반응이 없네요.

아마 -가 특수문자라 리눅스에서 파일명으로 인식을 못하는 것 같군요.

그러면 ! 절대경로를 이용하여 -home 디렉터리에 있는 파일이다!! 라고 말해줍시다.

bandit1@bandit:~$ cat ~/-
CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9

bandit2 계정의 패스워드가 CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9인 것을 알았습니다!!

마무리

특수문자로 된 파일을 보기 위해서 절대경로를 사용하는 방법을 알게 되었습니다.

바로 Level 2 → Level 3 에서 뵙겠습니다 !! :D