NEFUS_19/리눅스

OVER THE WIRE( bandit 1 level ~5 level )

유찬수 2021. 7. 23. 06:44

https://overthewire.org/wargames/bandit/bandit0.html)

 

OVER THE WIRE

level 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.
번역 : 이 레벨의 목표는 SSH를 사용하여 게임에 로그인하는 것입니다. 연결해야 하는 호스트는 포트 2220의 bandit.labs.overthewire.org입니다. 사용자 이름은 bandit0이고 암호는 bandit0입니다. 로그인한 후 레벨 1 페이지로 이동하여 레벨 1을 이기는 방법을 알아보세요.

ssh 접속을 한다.( ssh bandit0@bandit.labs.overthewire.org -p2220)

그러면 이것은 overthewire 게임 서버이며 더 많은 정보를 위해 링크에 접속하라고 하며 비밀번호를 입력하라고 뜬다

그러면 아까준 비밀번호인 bandit0이라고 쓴다

해결


Level 0 → Level 1

문제 :  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.
commands you may need to solve this level : ls, cd, cat, file, du, find
번역 : 다음 레벨의 비밀번호는 홈 디렉토리에 있는 readme라는 파일에 저장됩니다. SSH를 사용하여 bandit1에 로그인하려면 이 비밀번호를 사용하십시오. 레벨에 대한 암호를 찾을 때마다 SSH(포트 2220에서)를 사용하여 해당 레벨에 로그인하고 게임을 계속하십시오.
이 레벨을 해결하는 데 필요한 명령 : ls, cd, cat, file, du, find

cat으로 파일을 알아낸다.

cat ./readme

비번을 알아냈다 (비 번 : boJ9jbbUNNfktd78OOpsqOltutMc3MY1)

성공


Level 1 → Level 2

문제 :The password for the next level is stored in a file called - located in the home directory
commands you may need to solve this level : ls, cd, cat, file, du, find
다음 레벨의 비밀번호는 홈 디렉토리에 있는 -라는 파일에 저장됩니다.
이 레벨을 해결하는 데 필요한 명령 : ls, cd, cat, file, du, find

ssh 접속을 한다.( ssh bandit1@bandit.labs.overthewire.org -p2220)

위에서 구한 비번 입력

cat ./- 

입력하면된다.

비번을 알아냈다 (비 번 : CV1DtqXWVFXTvM2F0k09SHz0YwRINYA9)

성공


Level 2 → Level 3

문제 : The password for the next level is stored in a file called spaces in this filename located in the home directory
commands you may need to solve this level : ls, cd, cat, file, du, find
번역 : 다음 레벨의 비밀번호는 홈 디렉토리에 있는 spaces in this filename이라는 파일에 저장됩니다.
이 레벨을 해결하는 데 필요한 명령: ls, cd, cat, file, du, find

ssh 접속을 한다.( ssh bandit2@bandit.labs.overthewire.org -p2220)

위에서 구한 비번 입력

cat ./ spaces\ in\ this\ filename

비번을 알라냄 ( 비번 : UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK )

성공


Level 3 → Level 4

문제 :The password for the next level is stored in a hidden file in the inhere directory.
commands you may need to solve this level : ls, cd, cat, file, du, find
번역 : 다음 레벨의 비밀번호는 inhere 디렉토리의 hidden 파일에 저장됩니다.
이 레벨을 해결하는 데 필요한 명령: ls, cd, cat, file, du, find

ssh 접속을 한다.( ssh bandit3@bandit.labs.overthewire.org -p2220)

위에서 구한 비번 입력

순서대로 입력

cd ./inhere
cat ./.hidden

비번을 알라냄 ( 비번 : pIwrPrtPN36QITSp3EQaw936yaFoFgAB )

성공


Level 4 → Level 5

문제 :The password for the next level is stored in the only human-readable file in the inhere directory. Tip: if your terminal is messed up, try the “reset” command.
commands you may need to solve this level : ls, cd, cat, file, du, find
번역 : 다음 레벨의 비밀번호는 inhere 디렉토리에서 사람이 읽을 수 있는 유일한 파일에 저장됩니다. 팁: 터미널이 엉망이면 "reset" 명령을 시도하십시오.
이 레벨을 해결하는 데 필요한 명령: ls, cd, cat, file, du, find

ssh 접속을 한다.( ssh bandit4@bandit.labs.overthewire.org -p2220)

위에서 구한 비번 입력

cat ./inhere
file ./ file▯▯                  //▯▯에 파일 번호 입력

-file07에만 아스키코드로 우리 읽을수 있다는 것을 알았다.

비번을 알라냄 ( 비번 : koReBOKuIDDepwhWk7jZC0RTdopnAYKh )

성공

 


Level 5 → Level 6

문제 :The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:
  • human-readable
  • 1033 bytes in size
  • not executable
commands you may need to solve this level : ls, cd, cat, file, du, find
번역 : 다음 레벨의 비밀번호는 inhere 디렉토리 아래 어딘가에 있는 파일에 저장되며 사람이 읽을 수 있는 1033바이트 크기, 실행할 수 없는 다음 속성을 모두 가지고 있습니다.
이 레벨을 해결하는 데 필요한 명령: ls, cd, cat, file, du, find

ssh 접속을 한다.( ssh bandit5@bandit.labs.overthewire.org -p2220)

위에서 구한 비번 입력

cd inhere
find -size 1033c //find로 파일 크기가 1033바이트인 것을 찾는다.

b : 블록 단위

c : 바이트 단위

k : 키로 바이트 단위

w : 2바이트 워드

m : 메가바이트 단위

g : 기가 바이트 단위

cd ./maybehere07
cat ./.file2

비번을 알라냄 ( 비번 : DXjZPULLxYr17uwoI01bNLQbtFemEgo7 )

성공