[PortSwigger Web Security Academy]Lab: Reflected XSS into HTML context with nothing encoded write up

zzsla·2023년 8월 9일
0

문제 정보

This lab contains a simple reflected cross-site scripting vulnerability in the search functionality.

To solve the lab, perform a cross-site scripting attack that calls the alert function.

문제

lab에 들어가면 가상 blog 사이트가 나온다.

분석

검색 기능에 Reflected XSS 취약점이 있다.
목표
alert을 사용한 XSS를 한다.

검색 기능에 Reflected XSS가 있다고 하니 검색창에 <script>alert(1)</script>로 넣고 검색을 하여, XSS를 확인한다.

XSS가 어떻게 들어가는지 burpsuite repeater로 보면 해당 페이로드는 html에 들어간 것을 볼 수 있다.
Reflected XSS는 application이 HTTP request일 때 데이터를 수신하고, response일 때 해당 데이터가 포함되면 발생한다.

해당 페이로드 alert이 작동된다.

그리고 난 뒤에 OK 버튼을 누르면 문제가 풀린다.

profile
[README]newbi security hacker :p

0개의 댓글