티스토리 뷰

Goal
The password for the next level is stored in the file data.txt in one of the few human-readable strings, preceded by several ‘=’ characters.
다음 레벨의 패스워드는 `data.txt` 파일에 저장되어 있으며 몇 개의 `=` 문자로 시작되고 읽을 수 있는 몇 안 되는 문자 중 하나다.
Commands you may need to solve this level
`grep`, `sort`, `uniq`, `strings`, `base64`, `tr`, `tar`, `gzip`, `bzip2`, `xxd`
Write Up
bandit9@bandit:~$ ls -al
total 40
drwxr-xr-x 2 root root 4096 Oct 5 2023 .
drwxr-xr-x 70 root root 4096 Oct 5 2023 ..
-rw-r--r-- 1 root root 220 Jan 6 2022 .bash_logout
-rw-r--r-- 1 root root 3771 Jan 6 2022 .bashrc
-rw-r----- 1 bandit10 bandit9 19379 Oct 5 2023 data.txt
-rw-r--r-- 1 root root 807 Jan 6 2022 .profile
bandit9@bandit:~$ file data.txt
data.txt: data
`data.txt` 파일은 data 형식의 파일이다. 플래그는 몇 개의 `=` 문자로 시작된다고 명시되어 있으므로 해당 파일에서 조건을 만족하는 부분을 추출할 수 있다. 만약 다음과 같이 `cat` 커맨드를 사용하면,
bandit9@bandit:~$ cat data.txt | grep "="
grep: (standard input): binary file matches
`data.txt` 파일은 data 형식의 파일이기 때문에 stdin으로 받을 수 없으므로 `strings` 커맨드를 사용해 해당 파일에서 ASCII에 해당하는 부분만 추출해 입력값으로 넘긴다.
bandit9@bandit:~$ strings data.txt | grep "="'Wargame > Bandit' 카테고리의 다른 글
| Bandit Level 11 → Level 12 (0) | 2024.05.16 |
|---|---|
| Bandit Level 10 → Level 11 (0) | 2024.05.16 |
| Bandit Level 8 → Level 9 (0) | 2024.05.16 |
| Bandit Level 7 → Level 8 (0) | 2024.05.16 |
| Bandit Level 6 → Level 7 (0) | 2024.05.16 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- SEO
- WEB
- JPA
- Transaction
- Database
- test
- WarGame
- XSS
- React
- DP
- java
- webgoat
- sql injection
- opengraph
- Dreamhack
- Framework
- math
- Misc
- Spring Security
- PS
- sqli
- oauth2
- Spring
- Bandit
- 회고
- askers
- CSRF
- linux
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함