OverTheWire : Bandit Level 0 → Level 1

heuniy·2023년 9월 23일

bandit_write up

목록 보기
2/10

문제

https://overthewire.org/wargames/bandit/bandit1.html

Bandit Level 0 → Level 1

The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.

home 디렉토리에 있는 readme 파일을 읽으면 password 을 얻을 수 있다.


풀이

지금 어디에 있는지 확인하기 위해 pwd 명령어를 사용한다.

pwd : 현재 작업중인 디렉토리 정보(경로) 출력

bandit0@bandit:~$ pwd
/home/bandit0

현재 home 디렉토리에 있는 것을 확인할 수 있다.



디렉토리 목록을 확인하기 위해 ls 명령어를 사용한다.

ls : 디렉토리 목록 확인

bandit0@bandit:~$ ls
readme

readme 파일이 있는 것을 확인할 수 있다.



파일을 내용을 확인하기 위해 cat 명령어를 사용한다.

cat : 파일 내용 출력

bandit0@bandit:~$ cat readme
NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL

패스워드가 NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL 라는 것을 알 수 있다.


기타

리눅스 명령어 정리 (누적)

pwd : 현재 작업중인 디렉토리 정보(경로) 출력

ls : 디렉토리 목록 확인

cat : 파일 내용 출력

profile
고양이 귀여워

0개의 댓글