SlideShare uma empresa Scribd logo
1 de 20
BY:- KINISH KUMAR(www.kinishcybersec.blogspot.in)
      https://www.facebook.com/kinishkumar
Cross Site Scripting (XSS) is a type of computer insecurity
vulnerability typically found in web applications(such as web
browsers through breaches of browser security) that
enables attackers to inject client-side script into web pages
viewed by the other users. Xss is mostly possible on
dynamic website where input is require .
   There are three types of XSS:-
1.Persistent (stored) XSS
        Attack is stored on the website’s server.
 2.Non Persistent (reflected) XSS
        User has to go through a special link to be exposed
 3.DOM-based XSS
      Problem exists within the client side scripts
The persistent(or stored) XSS vulnerability is a more
devasting variant of a cross site scripting flaw; it occurs when
the data provided by the attacker is saved by the server, and
then permanently displayed on “normal” pages returned to
the users in the course of regular browsing without proper
HTML escaping.

        Simply persistent xss is occurs when the developer
        stores the user input data into database server or
        simply writing it in a file without a proper filtration,
        then sending them again to the client browser.
Vulnerable Apps
            DATA     Forum ,blog ,search etc
            BASE
            SERVER


 <html>
 <script>                  <html>
                           <script>




VICTIM
                          ATTACKER
This fig shows how an attacker execute its
malicious script .Firstly attacker input his/her
html or java script in search , forum or blog and
due to no input filtration the script is saved in
server then some other user click on this forum
or page then the malicious script is executed
on the victim or client browser.
    Some example of scripts:-
        <script>alert(“Hello World”);</script>
             This script is used to pop up a box contain
             message Hello World
       <script>alert(document.cookie);</script>
               This script is used to show your cookies
To perform cross site scripting for learning
purpose you can setup ur own server with a
vulnerable apps

You can use XAMPP server and
DVWA application for this
purpose you can download this
from:-
http://www.apachefriends.org/en/xampp-windows.html

http://sourceforge.net/projects/dvwa/

     I login in my DVWA (damn vulnerable web
     application) the default username is
     “admin” and password is “password”
     without quotation marks.
When I input text message then its ok nothing happen it
show my message in box. lets try some script on this
message box
In this time I write stored xss in name field and <script>alert(“hello you are hacked”);</script>
in message field and when I click on guestbook it pop up a message every time any other user
click on the guestbook or this page he will get same message because the input is stored on the
server database.
The non-persistent( or reflected) cross site scripting
vulnerability is by far the most common type. These holes
show up when the data provided by a web client, most
commonly in HTTP query parameters or in HTML form
submissions, is used immediately by server-side scripts to
generate a page of results for that user, without sanitizing the
request.
Vulnerable Apps
                  DATA        Forum ,blog ,search etc
                  BASE
                  SERVER


 <html>
 <script>                           <html>
                                    <script>
                                                script



                      Session id



VICTIM      PHISING                ATTACKER
In persistent of reflected XSS the script is executed when it is input on
the forum or database in client browser when it submit it so this is not
an serious problem but this is also used to steal other cookies (session id
and other important info ) .

The attacker send an message to client or victim through email (fake
mail) in which he write Dear customer we have notice some illegal
activity in ur account to check where it is you or some other please click
this link to do that and the mail is crafted so nice the victim is come is on
the attacker net to do this attacker used other social engineering
techniques to fool the victims.


When victim click on ur link the script is executed and send the victim
cookies info to attacker website to do this attacker used a php script and
host it in web hosting website when victim click the cookies info of
victim is send to attacker website where he is host his/her php script in
a plain text format he /she used it to login ur website .
You can either used DVWA or WebGoat application to test ur skills like
real scenario u can download WebGoat through OWASP website . Here I
used DVWA application to demonstration.




         Hack to learn not learn to hack
Here I write kinish kumar and then submit then it display my name
again we write script and see what it display
Here I write <script>alert(“hello”);</script> and then it doesn’t display
the script it execute it but it executed once that is the basic difference of
persistent and non persistent xss.
Here I write script to display cookie I.e,<script>alert(doucument.cookie);</script>
and it show the cookies and we can do lot of things when we get somebody
cookies by apply phishing or social engineering methods.
Some vulnerable websites are :-

1. http://www.timesjobs.com/candidate/companySearch.htm

2. http://www.gnomonwatches.com

3.http://www.jouezetgagnez.net/index.php?email=


    Here I will do reflected xss on
    www.gnomonwatches.com because it is
    vulnerable to cross site scripting but please don’t
    do that this is illegal .

      ALWAYS REMEMBER THIS QUOTE :-
DOM-based vulnerabilities occur in the content processing stages performed by the
client, typically in client-side JavaScript. The name refers to the standard model for
representing HTML or XML contents which is called the Document Object Model
(DOM) JavaScript programs manipulate the state of a web page and populate it with
dynamically-computed data primarily by acting upon the DOM.
OR
DOM-based Cross-Site Scripting is the de-facto name for XSS bugs which are the result
of active browser-side content on a page, typically JavaScript, obtaining user input and
then doing something unsafe with it which leads to execution of injected code. This
document only discusses JavaScript bugs which lead to XSS.
The DOM, or Document Object Model, is the structural format used to represent
documents in a browser. The DOM enables dynamic scripts such as JavaScript to
reference components of the document such as a form field or a session cookie. The
DOM is also used by the browser for security - for example to limit scripts on different
domains from obtaining session cookies for other domains. A DOM-based XSS
vulnerability may occur when active content, such as a JavaScript function, is modified
by a specially crafted request such that a DOM element that can be controlled by an
attacker.
Reference:-

  www.infosec4all.tk

  http://en.wikipedia.org/wiki/Cross-
  site_scripting


  https://www.owasp.org/index.php/Cross-
  site_Scripting_(XSS)




    I try my best to explain basics of cross site scripting if there is
    any mistake please comment and give ur valuable suggestions.

Mais conteúdo relacionado

Mais procurados

Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site ScriptingAli Mattash
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting GuideDaisuke_Dan
 
Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Nabin Dutta
 
Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)Daniel Tumser
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionVishal Kumar
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)Ritesh Gupta
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryDaniel Miessler
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing TechniquesAvinash Thapa
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application SecurityRob Ragan
 
Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Aman Singh
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksRaghav Bisht
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)Manish Kumar
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security TestingMarco Morana
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxAaron Weaver
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?Yurii Bilyk
 

Mais procurados (20)

Cross Site Scripting
Cross Site ScriptingCross Site Scripting
Cross Site Scripting
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting Guide
 
Cross Site Scripting(XSS)
Cross Site Scripting(XSS)Cross Site Scripting(XSS)
Cross Site Scripting(XSS)
 
Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS)
 
Xss attack
Xss attackXss attack
Xss attack
 
Presentation on Web Attacks
Presentation on Web AttacksPresentation on Web Attacks
Presentation on Web Attacks
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request Forgery
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing Techniques
 
Intro to Web Application Security
Intro to Web Application SecurityIntro to Web Application Security
Intro to Web Application Security
 
Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)Cross Site Scripting: Prevention and Detection(XSS)
Cross Site Scripting: Prevention and Detection(XSS)
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
 
Cross site scripting (xss)
Cross site scripting (xss)Cross site scripting (xss)
Cross site scripting (xss)
 
CSRF Basics
CSRF BasicsCSRF Basics
CSRF Basics
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security Testing
 
Cross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert BoxCross Site Scripting Going Beyond the Alert Box
Cross Site Scripting Going Beyond the Alert Box
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?
 
Introduction XSS
Introduction XSSIntroduction XSS
Introduction XSS
 
Xss ppt
Xss pptXss ppt
Xss ppt
 

Destaque

Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)OWASP Khartoum
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingInMobi Technology
 
Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Michael Hendrickx
 
INTRODUCTION TO NETWORK OS
INTRODUCTION TO NETWORK OSINTRODUCTION TO NETWORK OS
INTRODUCTION TO NETWORK OSkinish kumar
 
Web Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSSWeb Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSSIvan Ortega
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of ckinish kumar
 
Man in the Middle? - No, thank you!
Man in the Middle? - No, thank you!Man in the Middle? - No, thank you!
Man in the Middle? - No, thank you!Daniel Schneller
 
Ryu: network operating system
Ryu: network operating systemRyu: network operating system
Ryu: network operating systemIsaku Yamahata
 
Tim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chongTim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chongVu Trung Kien
 
dynamic host configuration protocol
dynamic host configuration protocoldynamic host configuration protocol
dynamic host configuration protocolkinish kumar
 
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)Luc Cao
 
Modern Web Security
Modern Web SecurityModern Web Security
Modern Web SecurityBill Condo
 
Xss what the heck-!
Xss   what the heck-!Xss   what the heck-!
Xss what the heck-!VodqaBLR
 
Xss is more than a simple threat
Xss is more than a simple threatXss is more than a simple threat
Xss is more than a simple threatAvădănei Andrei
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCPOlivier Bonaventure
 
Security Bootcamp 2013 owasp top 10- 2013
Security Bootcamp 2013   owasp top 10- 2013Security Bootcamp 2013   owasp top 10- 2013
Security Bootcamp 2013 owasp top 10- 2013Security Bootcamp
 

Destaque (20)

Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
 
XSS
XSSXSS
XSS
 
Reflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site ScriptingReflective and Stored XSS- Cross Site Scripting
Reflective and Stored XSS- Cross Site Scripting
 
Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)Owasp Top 10 A3: Cross Site Scripting (XSS)
Owasp Top 10 A3: Cross Site Scripting (XSS)
 
INTRODUCTION TO NETWORK OS
INTRODUCTION TO NETWORK OSINTRODUCTION TO NETWORK OS
INTRODUCTION TO NETWORK OS
 
Web Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSSWeb Security - OWASP - SQL injection & Cross Site Scripting XSS
Web Security - OWASP - SQL injection & Cross Site Scripting XSS
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of c
 
Man in the Middle? - No, thank you!
Man in the Middle? - No, thank you!Man in the Middle? - No, thank you!
Man in the Middle? - No, thank you!
 
XSS - Attacks & Defense
XSS - Attacks & DefenseXSS - Attacks & Defense
XSS - Attacks & Defense
 
Ryu: network operating system
Ryu: network operating systemRyu: network operating system
Ryu: network operating system
 
Facebook Attacks
Facebook AttacksFacebook Attacks
Facebook Attacks
 
Tim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chongTim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chong
 
dynamic host configuration protocol
dynamic host configuration protocoldynamic host configuration protocol
dynamic host configuration protocol
 
phising netiqueta
phising netiquetaphising netiqueta
phising netiqueta
 
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
Báo cáo hàng tuần - Các chuẩn bảo mật web (OWASP)
 
Modern Web Security
Modern Web SecurityModern Web Security
Modern Web Security
 
Xss what the heck-!
Xss   what the heck-!Xss   what the heck-!
Xss what the heck-!
 
Xss is more than a simple threat
Xss is more than a simple threatXss is more than a simple threat
Xss is more than a simple threat
 
Internet innovation with Multipath TCP
Internet innovation with Multipath TCPInternet innovation with Multipath TCP
Internet innovation with Multipath TCP
 
Security Bootcamp 2013 owasp top 10- 2013
Security Bootcamp 2013   owasp top 10- 2013Security Bootcamp 2013   owasp top 10- 2013
Security Bootcamp 2013 owasp top 10- 2013
 

Semelhante a Cross site scripting

Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior
 
STORED XSS IN DVWA
STORED XSS IN DVWASTORED XSS IN DVWA
STORED XSS IN DVWARutvik patel
 
xss-100908063522-phpapp02.pdf
xss-100908063522-phpapp02.pdfxss-100908063522-phpapp02.pdf
xss-100908063522-phpapp02.pdfyashvirsingh48
 
Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Irfad Imtiaz
 
Pantallas escaneo Sitio Web
Pantallas escaneo Sitio WebPantallas escaneo Sitio Web
Pantallas escaneo Sitio Webandres1422
 
Xss 101 by-sai-shanthan
Xss 101 by-sai-shanthanXss 101 by-sai-shanthan
Xss 101 by-sai-shanthanRaghunath G
 
Web application attacks
Web application attacksWeb application attacks
Web application attackshruth
 
logout.php Session Data after Logout Username Email . $_.docx
logout.php Session Data after Logout  Username  Email  . $_.docxlogout.php Session Data after Logout  Username  Email  . $_.docx
logout.php Session Data after Logout Username Email . $_.docxsmile790243
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Jay Nagar
 
Cross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docx
Cross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docxCross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docx
Cross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docxmydrynan
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolArjun Jain
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeJeremiah Grossman
 
.NET Security Topics
.NET Security Topics.NET Security Topics
.NET Security TopicsShawn Gorrell
 

Semelhante a Cross site scripting (20)

Complete xss walkthrough
Complete xss walkthroughComplete xss walkthrough
Complete xss walkthrough
 
Secure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scriptingSecure Code Warrior - Cross site scripting
Secure Code Warrior - Cross site scripting
 
STORED XSS IN DVWA
STORED XSS IN DVWASTORED XSS IN DVWA
STORED XSS IN DVWA
 
XSS Exploitation
XSS ExploitationXSS Exploitation
XSS Exploitation
 
xss-100908063522-phpapp02.pdf
xss-100908063522-phpapp02.pdfxss-100908063522-phpapp02.pdf
xss-100908063522-phpapp02.pdf
 
SeanRobertsThesis
SeanRobertsThesisSeanRobertsThesis
SeanRobertsThesis
 
Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )Introduction to Cross Site Scripting ( XSS )
Introduction to Cross Site Scripting ( XSS )
 
Pantallas escaneo Sitio Web
Pantallas escaneo Sitio WebPantallas escaneo Sitio Web
Pantallas escaneo Sitio Web
 
Xss 101
Xss 101Xss 101
Xss 101
 
Xss 101 by-sai-shanthan
Xss 101 by-sai-shanthanXss 101 by-sai-shanthan
Xss 101 by-sai-shanthan
 
4.Xss
4.Xss4.Xss
4.Xss
 
Web application attacks
Web application attacksWeb application attacks
Web application attacks
 
logout.php Session Data after Logout Username Email . $_.docx
logout.php Session Data after Logout  Username  Email  . $_.docxlogout.php Session Data after Logout  Username  Email  . $_.docx
logout.php Session Data after Logout Username Email . $_.docx
 
Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )Website hacking and prevention (All Tools,Topics & Technique )
Website hacking and prevention (All Tools,Topics & Technique )
 
Cross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docx
Cross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docxCross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docx
Cross-site scripting (XSS) AttacksCross-site scripting (XSS) i.docx
 
Session7-XSS & CSRF
Session7-XSS & CSRFSession7-XSS & CSRF
Session7-XSS & CSRF
 
Xssandcsrf
XssandcsrfXssandcsrf
Xssandcsrf
 
XSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing toolXSS-Alert-Pentration testing tool
XSS-Alert-Pentration testing tool
 
Rich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safeRich Web App Security - Keeping your application safe
Rich Web App Security - Keeping your application safe
 
.NET Security Topics
.NET Security Topics.NET Security Topics
.NET Security Topics
 

Último

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Último (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Cross site scripting

  • 1. BY:- KINISH KUMAR(www.kinishcybersec.blogspot.in) https://www.facebook.com/kinishkumar
  • 2. Cross Site Scripting (XSS) is a type of computer insecurity vulnerability typically found in web applications(such as web browsers through breaches of browser security) that enables attackers to inject client-side script into web pages viewed by the other users. Xss is mostly possible on dynamic website where input is require . There are three types of XSS:- 1.Persistent (stored) XSS Attack is stored on the website’s server. 2.Non Persistent (reflected) XSS User has to go through a special link to be exposed 3.DOM-based XSS Problem exists within the client side scripts
  • 3. The persistent(or stored) XSS vulnerability is a more devasting variant of a cross site scripting flaw; it occurs when the data provided by the attacker is saved by the server, and then permanently displayed on “normal” pages returned to the users in the course of regular browsing without proper HTML escaping. Simply persistent xss is occurs when the developer stores the user input data into database server or simply writing it in a file without a proper filtration, then sending them again to the client browser.
  • 4. Vulnerable Apps DATA Forum ,blog ,search etc BASE SERVER <html> <script> <html> <script> VICTIM ATTACKER
  • 5. This fig shows how an attacker execute its malicious script .Firstly attacker input his/her html or java script in search , forum or blog and due to no input filtration the script is saved in server then some other user click on this forum or page then the malicious script is executed on the victim or client browser. Some example of scripts:- <script>alert(“Hello World”);</script> This script is used to pop up a box contain message Hello World <script>alert(document.cookie);</script> This script is used to show your cookies
  • 6. To perform cross site scripting for learning purpose you can setup ur own server with a vulnerable apps You can use XAMPP server and DVWA application for this purpose you can download this from:- http://www.apachefriends.org/en/xampp-windows.html http://sourceforge.net/projects/dvwa/ I login in my DVWA (damn vulnerable web application) the default username is “admin” and password is “password” without quotation marks.
  • 7.
  • 8. When I input text message then its ok nothing happen it show my message in box. lets try some script on this message box
  • 9. In this time I write stored xss in name field and <script>alert(“hello you are hacked”);</script> in message field and when I click on guestbook it pop up a message every time any other user click on the guestbook or this page he will get same message because the input is stored on the server database.
  • 10. The non-persistent( or reflected) cross site scripting vulnerability is by far the most common type. These holes show up when the data provided by a web client, most commonly in HTTP query parameters or in HTML form submissions, is used immediately by server-side scripts to generate a page of results for that user, without sanitizing the request.
  • 11. Vulnerable Apps DATA Forum ,blog ,search etc BASE SERVER <html> <script> <html> <script> script Session id VICTIM PHISING ATTACKER
  • 12. In persistent of reflected XSS the script is executed when it is input on the forum or database in client browser when it submit it so this is not an serious problem but this is also used to steal other cookies (session id and other important info ) . The attacker send an message to client or victim through email (fake mail) in which he write Dear customer we have notice some illegal activity in ur account to check where it is you or some other please click this link to do that and the mail is crafted so nice the victim is come is on the attacker net to do this attacker used other social engineering techniques to fool the victims. When victim click on ur link the script is executed and send the victim cookies info to attacker website to do this attacker used a php script and host it in web hosting website when victim click the cookies info of victim is send to attacker website where he is host his/her php script in a plain text format he /she used it to login ur website .
  • 13. You can either used DVWA or WebGoat application to test ur skills like real scenario u can download WebGoat through OWASP website . Here I used DVWA application to demonstration. Hack to learn not learn to hack
  • 14. Here I write kinish kumar and then submit then it display my name again we write script and see what it display
  • 15. Here I write <script>alert(“hello”);</script> and then it doesn’t display the script it execute it but it executed once that is the basic difference of persistent and non persistent xss.
  • 16. Here I write script to display cookie I.e,<script>alert(doucument.cookie);</script> and it show the cookies and we can do lot of things when we get somebody cookies by apply phishing or social engineering methods.
  • 17. Some vulnerable websites are :- 1. http://www.timesjobs.com/candidate/companySearch.htm 2. http://www.gnomonwatches.com 3.http://www.jouezetgagnez.net/index.php?email= Here I will do reflected xss on www.gnomonwatches.com because it is vulnerable to cross site scripting but please don’t do that this is illegal . ALWAYS REMEMBER THIS QUOTE :-
  • 18.
  • 19. DOM-based vulnerabilities occur in the content processing stages performed by the client, typically in client-side JavaScript. The name refers to the standard model for representing HTML or XML contents which is called the Document Object Model (DOM) JavaScript programs manipulate the state of a web page and populate it with dynamically-computed data primarily by acting upon the DOM. OR DOM-based Cross-Site Scripting is the de-facto name for XSS bugs which are the result of active browser-side content on a page, typically JavaScript, obtaining user input and then doing something unsafe with it which leads to execution of injected code. This document only discusses JavaScript bugs which lead to XSS. The DOM, or Document Object Model, is the structural format used to represent documents in a browser. The DOM enables dynamic scripts such as JavaScript to reference components of the document such as a form field or a session cookie. The DOM is also used by the browser for security - for example to limit scripts on different domains from obtaining session cookies for other domains. A DOM-based XSS vulnerability may occur when active content, such as a JavaScript function, is modified by a specially crafted request such that a DOM element that can be controlled by an attacker.
  • 20. Reference:- www.infosec4all.tk http://en.wikipedia.org/wiki/Cross- site_scripting https://www.owasp.org/index.php/Cross- site_Scripting_(XSS) I try my best to explain basics of cross site scripting if there is any mistake please comment and give ur valuable suggestions.