0% found this document useful (0 votes)
26 views4 pages

CS - Lab Assignment-5

Uploaded by

Alester
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views4 pages

CS - Lab Assignment-5

Uploaded by

Alester
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Experiment No: 5

Cyber Security Lab Experiment - 5


Reflective Cross Site Scripting

Name : Alester Dsouza


ID : 201080004
Branch : Information Technology (IT)
Batch :A

Aim:
Perform reflective cross site scripting on the given site.

Theory:
Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected
into otherwise benign and trusted websites. XSS attacks occur when an attacker uses a web
application to send malicious code, generally in the form of a browser side script, to a different
end user. Flaws that allow these attacks to succeed are quite widespread and occur anywhere a
web application uses input from a user within the output it generates without validating or encoding
it.

Reflected Cross Site Scripting


Reflected XSS attacks, also known as non-persistent attacks, occur when a malicious script is
reflected off of a web application to the victim’s browser.
The script is activated through a link, which sends a request to a website with a vulnerability that
enables execution of malicious scripts. The vulnerability is typically a result of incoming
requests not being sufficiently sanitized, which allows for the manipulation of a web
application’s functions and the activation of malicious script
Experiment No: 5

To distribute the malicious link, a perpetrator typically embeds it into an email or third party website (e.g.,
in a comment section or in social media). The link is embedded inside an anchor text that provokes the
user to click on it, which initiates the XSS request to an exploited website, reflecting the attack back to
the user.

Impact of Reflected Cross Site Scripting

If an attacker can control a script that is executed in the victim's browser, then they can typically fully
compromise that user. Amongst other things, the attacker can:

1. Perform any action within the application that the user can perform.
2. View any information that the user is able to view.
3. Modify any information that the user is able to modify.
4. Initiate interactions with other application users, including malicious attacks, that will appear to
originate from the initial victim user.

Reflected XSS attack prevention and mitigation

There are several effective methods for preventing and mitigating reflected XSS attacks.
First and foremost, from the user’s point-of-view, vigilance is the best way to avoid XS
scripting. Specifically, this means not clicking on suspicious links which may contain
malicious code. Suspicious links include those found in:

1. Emails from unknown senders


2. A website’s comments section
3. Social media feed of unknown users

Having said that, it is ultimately up to a website operator to prevent potential abuse to


their users.
Scripts:
1. Redirecting the user to the other website
Experiment No: 5

2. Using alert() to pop up a dialog box.

Output :
1.
Experiment No: 5

2.

Conclusion:
Hence, Reflective Cross Site scripting was studied and implemented on the given website.
The impacts, prevention and mitigation methods of reflective XSS were understood.

You might also like