| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
- 쿠키변조
- sql injection
- androGoat
- error-based
- 모의해킹
- pentest
- 취약점 진단
- bandit #밴딧 #웹해킹 #해킹 #화이트해커 #공부 #스터디 #IT #hacking #linux #openssl #nmap
- 리눅스
- androidhacking
- 안드로이드 모의해킹
- time-based
- Bandit
- 밴딧
- msfconsole #heartbleed #247ctf #misc #webhacking
- Linux
- Today
- Total
d0r1
[bandit] 0~3 까지 풀이 본문

웹 만드는게 학교 과제로 넘어간 이상,,
공개는 추후 종강하고 하는걸로
그 동안, bandit이라는 녀석을 만났다.
[0->1]
bandit.labs.overthewire.org 2220
으로 접근하여, bandit0/ bandit0으로 로그인한 다음, home의 readme를 읽는 문제.
ssh -p 2220 bandit0@bandit.labs.overthewire.org
pw : NH2SXQwcBdpmTEzi3bvBHMM9H66vVXjL
[1->2]
The password for the next level is stored in a file called - located in the home directory
-이라는 파일명을 읽으면 풀리는 문제.
bandit1@bandit:~$ cat ./-
rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi
여기서 중요한 것은, 리눅스에서는 "-"가 인지 되지 아니함을 알고있어야한다.
그렇기 때문에, ./- 를 통해 확인할 수 있었다.
pw : rRGizSaX8Mk1RTb1CNQoXTcYZWU6lgzi
[2->3]
The password for the next level is stored in a file called spaces in this filename located in the home directory
파일명에 공백이 들어간 파일을 읽으면 문제가 풀린다.
bandit2@bandit:~$ ls
spaces in this filename
bandit2@bandit:~$ cat "spaces in this filename"
aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG
파일명에 공백이 들어있다고 하여, cat spaces in this filename을 하면, 띄어쓰기를 기준으로 각각의 파일로 인식한다.
그렇기 때문에 출력이 되지 않는다.
이를 해결하기 위해서는, 문자열을 ""로 묶어 처리하는 방법을 사용할 수 있다.
pw : aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG
[3->4]
The password for the next level is stored in a hidden file in the inhere directory.
inhere 이라는 숨김 폴더에 패스워드가 존재한다고 한다.

ls를 수행하였을 때, 아무런 파일이 보이지 않았기에,
ls -a 옵션을 통해, 모든 파일을 확인하였고, 해당 폴더 내에 .hidden이라는 파일이 존재했다.
이 파일을 읽었더니 패스워드가 나왔다.
pw : 2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe
'bandit' 카테고리의 다른 글
| [bandit] 16-20 (2) | 2023.10.05 |
|---|---|
| [bandit] 12-15 (0) | 2023.09.19 |
| [bandit] 6~11 (1) | 2023.09.19 |
| [bandit] 4-5 (0) | 2023.06.19 |
| [bandit] (0) | 2023.06.15 |