-

레벨 2로 넘어가면 위와 같은 페이지가 반겨준다.
이 문제는 Stored XSS 취약점을 이용해 푸는 문제이다.

<script>alert(1);</script>다음과 같이 입력해보았다.

결과는 alert창 띄우기에 실패하였다.
혹시 script라는 문자열을 필터링 하나해서 아래와 같이 ScRipT
<ScRipT>alert(1);<ScRipT>로 바꾸어 필터링 우회를 시도해보았다.


결과는 이 또한 실패하였다.
다른 방법으로 onerror를 이용해 alert 창이 뜨게끔 시도해보았다.
<img src "#" onerror "alert(1)">img 태그에서 오류를 발생시켜 오류에 대한 예외 처리로 alert 창이 뜨게끔 한다.


alert 창이 출력되었다. 성공적으로 Level 2를 클리어 하였다.
XSS game
Welcome, recruit! Cross-site scripting (XSS) bugs are one of the most common and dangerous types of vulnerabilities in Web applications. These nasty buggers can allow your enemies to steal or modify user data in your apps and you must learn to dispatch the
xss-game.appspot.com
'Wargame > XSS game' 카테고리의 다른 글
[XSS game] Level 6 (0) 2022.02.11 [XSS game] Level 5 (0) 2022.02.11 [XSS game] Level 4 (0) 2022.02.11 [XSS game] Level 3 (0) 2022.02.11 [XSS game] Level 1 (0) 2022.02.10 댓글