Iriton's log
[Dreamhack/Wargame] Lv.1 xss-2 본문

* xss-1 풀이 참고
https://eunginius.tistory.com/30
[Dreamhack/Wargame] Lv.1 xss-1
문제 풀이에 앞서, XSS(Cross Site Script)취약점은 Web Application에서 사용자 입력 값에 대한 필터링이 제대로 이뤄지지 않을 경우 input 가능한 form에 script를 삽입하여 공격할 수 있는 것을 말한다. 문제
eunginius.tistory.com
문제 페이지 분석

페이지들도, 코드도 xss-1랑 너무 똑같았다.
한 가지 다른 점은 vuln page에 alert이 작동하지 않는다는 것이다.
이런 경우에는 사이트에 활성화된 방화벽을 우회해야 하는데 우회하는 방법은 case에 따라 너무 많다.
각종 태그를 활용할 수 있다.
이 풀이에서는 <svg onload>를 쓸 것이다.
svg onload는 svg 그래픽을 담기 위한 태그이다.

vuln page에서 사용해 보니 우회가 된다...!
그럼 이대로 xss-1에서 사용한 xss를 조금만 변경하여 공격하면 된다.
xss: <svg onload=location="/memo?memo="+document.cookie;>

'WebHacking > WarGame' 카테고리의 다른 글
| [Dreamhack/Wargame] Lv.1 image-storage (0) | 2023.04.10 |
|---|---|
| [Dreamhack/Wargame] Lv.1 command-injection-1 (0) | 2023.04.10 |
| [Dreamhack/Wargame] Lv.1 xss-1 (0) | 2023.04.10 |
| [Dreamhack/Wargame] Lv.1 session-basic (0) | 2023.04.07 |
| [Dreamhack/Wargame] Lv.1 cookie (0) | 2023.04.07 |
Comments