writeup/Bandit

Bandit Level 5 -> Level 8

tnvori 2025. 2. 9. 15:20

일을 너무 벌려놓음.

 

Level 5 -> Level 6

https://overthewire.org/wargames/bandit/bandit6.html

 

OverTheWire: Level Goal

We're hackers, and we are good-looking. We are the 1%. <!-- Please read and accept the Rules! --> Level Goal 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 10

overthewire.org

 

이번 문제에서는 inhere에서 텍스트 파일, 1033 바이트 크기면서도 실행 파일이 아닌 것을 찾아야 한다.

 

나는 find를 활용했다.

size 옵션으로 크기 1033 바이트를 설정하고, executable이 아닌 파일을 찾았다. 결과는 다음과 같다.

 

 

 

Level 6 -> Level 7

https://overthewire.org/wargames/bandit/bandit7.html

 

OverTheWire: Level Goal

We're hackers, and we are good-looking. We are the 1%. <!-- Please read and accept the Rules! --> Level Goal The password for the next level is stored somewhere on the server and has all of the following properties: owned by user bandit7 owned by group ban

overthewire.org

이번에는 서버에 있는 패스워드 파일을 찾아야 한다. 소유 유저와 소유 그룹, 그리고 파일 용량이 힌트다.

 

각각 user, group, size 옵션을 사용하면 된다. 이를 적용하여 실행하면 다음과 같이 출력되는데, 보기 힘들다.

 

2>/dev/null을 추가하여 오류를 보지 않을 수 있다.

0은 입력, 1은 출력, 2는 오류를 의미하고, /dev/null로 이동한 오류는 서버에 저장되지 않고 삭제된다.

 

 

 

level 7 -> level 8

https://overthewire.org/wargames/bandit/bandit8.html

 

OverTheWire: Level Goal

We're hackers, and we are good-looking. We are the 1%. <!-- Please read and accept the Rules! --> Level Goal The password for the next level is stored in the file data.txt next to the word millionth Commands you may need to solve this level man, grep, sort

overthewire.org

패스워드가 data.txt의 millionth 옆에 적혀있다고 한다.

 

별 다른 조치 없이 cat data.txt를 실행하면 다음과 같이 출력된다.

이중에서 millionth가 있는 부분을 찾아야 하는데, 이때 grep을 사용할 수 있다.

 

'writeup > Bandit' 카테고리의 다른 글

Bandit Level 17 -> Level 19  (0) 2025.03.04
Bandit Level 14 -> Level 17  (0) 2025.02.27
Bandit Level 12 -> Level 14  (0) 2025.02.25
Bandit Level 9 -> Level 12  (0) 2025.02.11
Bandit Level 0 -> Level 5  (0) 2025.02.05