PRIVATE/bandit
Level 0-SSH
sonotree
2024. 12. 25. 19:00
<Level Goal>
The goal of this level is for you to log into the game using SSH. The host to which you need to connect is bandit.labs.overthewire.org, on port 2220. The username is bandit0 and the password is bandit0. Once logged in, fo to the Level1 page to find out how to beat Level 1
Solve
내 컴퓨터로 bandit 서버로 SSH 접속하기 위해서는, 서버 컴퓨터의 user ID와 IP주소(도메인 주소)를 알아야한다. Level Goal에서 username은 bandit0, password는 bandit0, 그리고 연결 주소는 bandit.labs.overthewire.org라고 알려줬으니 우리는 이걸 입력하면 된다.
ssh -p 2220 bandit0@bandit.labs.overthewire.org
명령어를 입력하고 password를 입력하면 아래와 같이 ssh 연결이 성공적으로 수행되는걸 확인할 수 있다. 0단계 클리어다!
┌──(kali㉿kali)-[~/.ssh]
└─$ ssh -p 2220 bandit0@bandit.labs.overthewire.org
_ _ _ _
| |__ __ _ _ __ __| (_) |_
| '_ \ / _` | '_ \ / _` | | __|
| |_) | (_| | | | | (_| | | |_
|_.__/ \__,_|_| |_|\__,_|_|\__|
This is an OverTheWire game server.
More information on http://www.overthewire.org/wargames
bandit0@bandit.labs.overthewire.org's password:
....
bandit0@bandit:~$
처음 bandit 문제를 접했을때, flag를 입력받는 창이 없어서 "그럼 다음 단계로 넘어가려면 어떻게 해야하지?"라는 의문이 있었다.
-> 각 문제의 답이 다음 단계로 넘어가는 password이다. 예를 들어, 레벨1의 답을 알아냈다면 다음 단계 ssh 접속 id를 bandit1(bandit[레벨])로 바꾸고 이 때의 password가 level0에서 구한 답이다.