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

zzsla·2023년 8월 9일
0

문제 정보

This lab contains a stored cross-site scripting vulnerability in the comment functionality.

To solve this lab, submit a comment that calls the alert function when the blog post is viewed.

문제

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

분석

댓글 기능에 Stored XSS 취약점이 있다.
목표
블로그 게시글을 볼 때 alert이 작동되게 한다.

댓글 기능에 Stored XSS 취약점이 있다고 하니까 블로그에 들어가서 <script>alert(1)</script>을 넣는다.

Post comment 버튼을 누르면 문제가 풀린다.

해당 블로그에 가서 코드를 보면 html 안에 <script>alert(1)</script>가 들어있는 것을 볼 수 있다.
Stored XSS는 이런 식으로 저장되어서 발생한다.

profile
[README]newbi security hacker :p

0개의 댓글