0% found this document useful (0 votes)
91 views6 pages

WMS Exp2

Sarthak Puri designed an experiment to simulate HTML injection and cross-site scripting (XSS) attacks. The objective was to test for vulnerabilities in websites using tools like OWASP Mutillidae II and XSS game sites. The document described how HTML injections work by sending malicious URLs to users, and how XSS attacks execute script code injected into a website. It provided examples of stored, reflected, and DOM-based XSS and steps to perform tests of these vulnerabilities. The learning outcome was a demonstration of how to identify and exploit injection vulnerabilities in real systems.

Uploaded by

Sarthak Puri
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)
91 views6 pages

WMS Exp2

Sarthak Puri designed an experiment to simulate HTML injection and cross-site scripting (XSS) attacks. The objective was to test for vulnerabilities in websites using tools like OWASP Mutillidae II and XSS game sites. The document described how HTML injections work by sending malicious URLs to users, and how XSS attacks execute script code injected into a website. It provided examples of stored, reflected, and DOM-based XSS and steps to perform tests of these vulnerabilities. The learning outcome was a demonstration of how to identify and exploit injection vulnerabilities in real systems.

Uploaded by

Sarthak Puri
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/ 6

EXPERIMENT – 1

Name – Sarthak Puri Class – 705/A


UID – 20BCS7233 Subject – web and mobile security
Semester – 5th

AIM
Design a method to simulate the html injection and cross site scripting to exploit the vulnerabilities as
attackers.

OBJECTIVE
To test HTML and XSS injection

SOFTWARE AND HARDWARE REQUIRED


Window 7 and above version

Chrome / or any other browser

TOOLS TO BE USED
OWASP Mutillidae II : web pwn in mass production

XSS game site

INTRODUCTION
Acunetix is a web-application security scanner that gives you a 360- degree various organisation’s
security .

This end-to-end web security scanner can identify vulnerabilities like XSS and misconfigurations . it
has capabilities for scanning all types of apps , complex web applications , etc.

Acunetix offers specialised technologies that let you detect more and fix faster.

HTML INJECTIONS - :
1. First attacker have to find vulnerable web application with few loop holes.
2. The attacker have to send modified URL to the user of that website by any means , like SMS or
E-mail .
3. This URL has been injected with HTML injections .
4. When user will click on that injected false URL , user will be navigated to the attacker’s webpage
which he have created
5. The attacker’s webpage looks same like original website.
6. User will enter his/her personal details like user-name , passwords , ATM card pins , etc.
7. This information will directly transferred to attackers server and he can misuse it .

CROSS SITE SCRIPTING (XSS)


• 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.
• An attacker can use XSS to send a malicious script to an unsuspecting user. The end user’s
browser has no way to know that the script should not be trusted, and will execute the script.

TYPE OF XSS-:
1. STORED XSS ->

• stored XSS, also known as Type-1 or Persistent XSS attacks, typically rely on unsanitized user
input points for scripts permanently stored on the target servers.
• Since these attacks allow malicious users to control how the browser executes a script, they can
typically facilitate a complete user account takeover.
2. REFLECTED XSS ->
• It is also known as non- persistent XSS.
• It occurs when user input is immediately returned by a web application in an error
message/search result or input provided by the user as part of the request and without permanently
storing the user provided data.
3. DOM BASED XSS ->
• DOM Based XSS is an XSS attack wherein the attack payload is executed as a result of
modifying the DOM “environment” in the victim’s browser used by the original client side script,
so that the client side code runs in an “unexpected” manner.
• That is, the page itself (the HTTP response that is) does not change, but the client side code
contained in the page executes differently due to the malicious modifications that have occurred
in the DOM environment.

STEP / METHOD / CODING


HTML INJECTIONS →

1. Open website : OWASP mutillidae II : web pwn in mass production (URL)


http://128.198.49.198:8102/mutillidae/index.php?page=documentation/usage-instructions.php

2. Now we will be transferred to the website which is suffering from an HTML injection
vulnerability which allows the user to submit his entry in the blog.
3. On the left top corner , put the cursor on
• OWASP 2017 →
• A1 – injections (others)→
• HTML injections(HTMLi)→
• Add to your blog .
4. Now blog window will appear on the pc screen.

5. Now we have to try to inject malicious code in the blank spot .


Enter html code to set up html attack.
Example - :
<td/> CU blog <marquee> you are hacked </marquee>

6. The vulnerabilities is in html code . injected into application web server


Whenever the user will visit that malicious page , servers get render everytime.
XSS ATTACK

1. Open the link


url-: https://xss-game.appspot.com/level1

you will be redirected towards a website

2. If the search field is vulnerable , when the user enters any script , then it will be executed
Enter any script in white space And search
, for example:
<script>alert(‘HELLO , YOU ARE HACKED!!!’)</script>

3. After clicking on search , the entered script will be executed .


A pop up will automatically come on pc screen . this just shows the vulnerability of the XSS
attack

LEARNING OUTCOME

• We have learned about HTML injections and how to use it in vulnerable websites and also about
XSS injections .
• We have learned how to apply these injections and attacks on real systems.
• If app or website lack proper formation or sanitization , the malicious link execute the attacker
code on the system.
• Attacker can steal all your information and can do you harm as much possible .

You might also like