일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- active recon
- War Game
- THM
- Reconnaissance
- tryhackme
- sql injection
- php To Do List
- access control
- php 로그인 페이지 만들기
- Leviathan
- privilege escalation
- ssrf
- SQLi
- Cryptography
- Recon
- file upload
- active reconnaissance
- php 파일 업로드하기
- OS Command Injection
- BANDiT
- over the wire
- overthewire
- 파일 업로드 취약점
- php file upload
- php
- php login page
- Cookie
- FTZ
- Server Side Request Forgery
- Authentication
Archives
- Today
- Total
R's Hacking Daily Log
Bandit7 본문
Overthewire - Bandit level7
Connection : bandit7@bandit.labs.overthewire.org -p 2220
username : bandit7

Bandit level7) data.txt 파일의 millionth 단어 뒤에 오는 것이 다음 level의 passwd라고 한다.
Kali linux - Terminal


파일 내용을 한 번 열어봤더니 굉장히 많은 문장이 출력되었다.
각 문장은 단어와 passwd 같은 긴 문자열로 이루어져 있는 듯.

grep command를 이용해서 단어 millionth이 들어가 있는 문자열을 data.txt 중에서 찾아내 보자.
조건에 일치하는 문장이 output으로 출력되었다. 뒤에 붙어 나온 문자열이 다음 level의 passwd!
COMMAND)
grep -w "word" "file_name" //word가 들어간 문장을 file_name file에서 찾아서 출력해줘.
grep command는 파일에서 특정 문자열을 찾아낼 때 사용할 수 있는 명령어이다.
그중에서 -w 옵션은 특정 단어가 들어간 문자열을 찾을 때 사용할 수 있다.
Comments