There is no commentSelect some text and then click Comment, or simply add a comment to this page from below to start a discussion.
PortSwigger Lab: Reflected DOM XSS
Description
This lab demonstrates a reflected DOM vulnerability. Reflected DOM vulnerabilities occur when the server-side application processes data from a request and echoes the data in the response. A script on the page then processes the reflected data in an unsafe way, ultimately writing it to a dangerous sink.
To solve this lab, create an injection that calls the alert() function.
Recon
Image Not ShowingPossible Reasons
The image was uploaded to a note which you don't have access to
The note which the image was originally uploaded to has been deleted
Đọc thấy biến searchResultsObj thay vì được khai báo như thông thường là:
var searchResultsObj =this.responseText;
Thì ở đây lại sử dụng eval() để thực thi code JavaScript dưới dạng 1 string được truyền vào, vì vậy có thể xác định rằng có thể khai thác XSS thông qua chức năng search của trang web
eval('var searchResultsObj ='+this.responseText);
Exploit
Bật BurpSuite để intercept request khi search và gửi đến Burp Repeater
Image Not ShowingPossible Reasons
The image was uploaded to a note which you don't have access to
The note which the image was originally uploaded to has been deleted