일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- sql injection
- privilege escalation
- Cookie
- Server Side Request Forgery
- php
- php 로그인 페이지 만들기
- Authentication
- ssrf
- Cryptography
- over the wire
- tryhackme
- Leviathan
- SQLi
- Recon
- OS Command Injection
- file upload
- active reconnaissance
- overthewire
- php file upload
- access control
- php 파일 업로드하기
- 파일 업로드 취약점
- THM
- php To Do List
- War Game
- active recon
- FTZ
- Reconnaissance
- BANDiT
- php login page
Archives
- Today
- Total
R's Hacking Daily Log
Bandit26 본문
Overthewire - Bandit level 26
Connection : bandit26@bandit.labs.overthewire.org -p 2220
username : bandit26
Bandit level26 ) 이번 문제는 딱히 설명은 없고 얼른 bandit27의 passwd를 잡아내라고 한다.
Kali linux - Terminal
저번 level에 얻은 쉘로 풀어보자.
directory에는 text.txt 말고 bandit27-do라는 파일이 있어서 file command로 어떤 유형의 파일인지 확인해 보았다.
보자 하니 이 파일은 setuid가 설정되어있는 듯하다.
그렇다면 이전 level 중에서 setuid file을 실행시키는 동시에 명령어를 입력한 적이 있었는 데,
이번에도 같은 방식을 사용해 보자.
./bandit27-do cat /etc/bandit_pass/bandit27
setuid file을 실행시키는 순간만큼은 root 권한이 되기 때문에,
cat command로 다음 level의 passwd를 읽으면 된다.
예상한 대로 passwd가 잘 출력되는 것을 볼 수 있다.
Comments