유튜브를 보다가 괜찮은 리눅스 워게임이 있다고 해서 한번 풀어볼려고 들어가 보았다.
https://overthewire.org/wargames/bandit/
OverTheWire: Bandit
We're hackers, and we are good-looking. We are the 1%. Bandit The Bandit wargame is aimed at absolute beginners. It will teach the basics needed to be able to play other wargames. If you notice something essential is missing or have ideas for new levels, p
overthewire.org
사이트는 여기고 가상환경에서 돌리거나 Putty로 윈도우에서 돌리기엔 속도도 느리고 그래서
원래 쓰던 리눅스 노트북을 사용하기로 했다.
일단 시작하기 전에 ssh 설정을 해줘야 한다.
sudo apt update
sudo apt install open sshserver
ssh 설치를 한번 해주고 난뒤 접속을 하면 되는데 사이트에 접속 주소와 계정이 나와있다.
Host: bandit.labs.overthewire.org | Port: 2220 | Password : bandit0
따라서 접속을 해주면 된다.
ssh bandit0 @ bandit.labs.overthewire.org
레벨에 맞게 계정이름 넣어주면 됨 지금은 0이라서 bandit0 으로 접속
들어가게 되면 아래와 같은 창이 나올 것 이다.
이제 level0 으로 접속을 했는데 여기서 문제를 풀면 된다.
사이트에 들어가면 문제별로 힌트를 제공해주는데 힌트를 한번 보았다.
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.
readme 파일에 level 1의 단서가 있는 것 같다.
그래서 파일의 형식을 확인해보았다.
아스키 코드로 된 텍스트 파일이라고 한다. 그러면 cat 명령어를 사용해서 보면 될 것 같다.
file . readme
.: directory
readme: ASCII text
cat readme
cat 명령어로 살펴보면 다음과 같은 문자열이 보이는데 이게 level 1의 패스워드 일 것이다.
N???????????????????????????????
문자열이라서 그냥 ? 처리
이제 exit을 입력하여 나왔다가 다시 level 1로 접속하면 된다.
'CTF > Pwnable' 카테고리의 다른 글
How to using Linux Bandit Level 5 ~ Level 6 (0) | 2024.01.30 |
---|---|
How to using Linux Bandit Level 4 ~ Level 5 (0) | 2024.01.30 |
How to using Linux Bandit Level 3 ~ Level 4 (0) | 2024.01.30 |
How to using Linux Bandit Level 2 ~ Level 3 (0) | 2024.01.30 |
How to using Linux Bandit Level 1 ~ Level 2 (0) | 2024.01.30 |