[OverTheWire Bandit]Level 0 write up

zzsla·2023년 8월 22일
0

문제 정보

없다.

문제

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, go to the Level 1 page to find out how to beat Level 1.

분석

호스트는 bandit.labs.overthewire.org이고, 포트는 2220이다.
username은 bandit0이고 password도 bandit0이다.
목표
SSH를 사용해서 로그인한다.
그리고 Level 1로 간다.

일단 SSH를 사용하라고 했으니까 SSH에 대해 알아본다.
간단하게 SSH(Secure Shell)는 원격 시스템에 로그인해서 원격 시스템에 명령을 내리게 할 수 있는 프로토콜이다. 그리고 호스트 간에 암호화된 통신을 할 수 있다.

사용방법을 보기 위해 메뉴얼 페이지를 살펴 본다.
메뉴얼 페이지는 아래 해당 주소나 명령어를 통해 볼 수 있다.

https://man7.org/linux/man-pages/man1/ssh.1.html

man ssh

명령어는 [user@]hostnamessh://[user@]hostname[:port] 이런 식으로 사용해서 로그인할 수 있다.

위에 주어진 정보로 ssh를 명령어를 쓰면 ssh bandit0@banditlabs.overthewire.org 이렇게 나온다.

하지만 접속을 하지 못했다. 내용을 보면 현재 포트가 22번으로 되어 있어서 로그인을 할 수 없다고 나온다. ssh의 기본 포트번호는 22번인데 지금 문제에 주어진 포트 2220번이여서 접속하지 못했다.
그렇기 때문에 해당 명령어에 옵션을 사용해서 포트를 연결시켜줘야 한다.
포트를 연결시켜주는 옵션은 -p이다.

그래서 다시 명령어를 쓰면 ssh bandit0@bandit.labs.overthewire.org -p 2220으로 나온다.

또는 uri형식인 ssh ssh://bandit0@bandit.labs.overthewire.org:2220으로도 접속할 수 있다.

password는 bandit0이므로 이것을 치면 접속이 가능하다.(password칠 때는 보인다.)

profile
[README]newbi security hacker :p

0개의 댓글