SlideShare une entreprise Scribd logo
1  sur  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.

Contenu connexe

Tendances

Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Cross Site Scripting ( XSS)
Cross Site Scripting ( XSS)Amit Tyagi
 
Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Barrel Software
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionMikhail Egorov
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryDaniel Miessler
 
Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbharCross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbharSandeep Kumbhar
 
Web Application Security and Awareness
Web Application Security and AwarenessWeb Application Security and Awareness
Web Application Security and AwarenessAbdul Rahman Sherzad
 
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
 
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
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting GuideDaisuke_Dan
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksRaghav Bisht
 
Introduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & DefenseIntroduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & DefenseSurya Subhash
 
XSS- an application security vulnerability
XSS-   an application security vulnerabilityXSS-   an application security vulnerability
XSS- an application security vulnerabilitySoumyasanto Sen
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applicationsNiyas Nazar
 
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
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing TechniquesAvinash Thapa
 
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
 

Tendances (20)

Xss attack
Xss attackXss attack
Xss attack
 
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 ppt
Xss pptXss ppt
Xss ppt
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protection
 
Understanding Cross-site Request Forgery
Understanding Cross-site Request ForgeryUnderstanding Cross-site Request Forgery
Understanding Cross-site Request Forgery
 
Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbharCross site scripting (xss) attacks issues and defense - by sandeep kumbhar
Cross site scripting (xss) attacks issues and defense - by sandeep kumbhar
 
Web Application Security and Awareness
Web Application Security and AwarenessWeb Application Security and Awareness
Web Application Security and Awareness
 
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
 
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)
 
The Cross Site Scripting Guide
The Cross Site Scripting GuideThe Cross Site Scripting Guide
The Cross Site Scripting Guide
 
Xss (cross site scripting)
Xss (cross site scripting)Xss (cross site scripting)
Xss (cross site scripting)
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
 
Introduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & DefenseIntroduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & Defense
 
XSS- an application security vulnerability
XSS-   an application security vulnerabilityXSS-   an application security vulnerability
XSS- an application security vulnerability
 
SQL Injection
SQL Injection SQL Injection
SQL Injection
 
Vulnerabilities in modern web applications
Vulnerabilities in modern web applicationsVulnerabilities in modern web applications
Vulnerabilities in modern web applications
 
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 )
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing Techniques
 
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
 

En vedette

Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)OWASP Khartoum
 
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
 

En vedette (20)

Cross Site Scripting (XSS)
Cross Site Scripting (XSS)Cross Site Scripting (XSS)
Cross Site Scripting (XSS)
 
XSS
XSSXSS
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)
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
 
Firewall
FirewallFirewall
Firewall
 

Similaire à 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
 
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
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encodingEoin Keary
 

Similaire à 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
 
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
 
04. xss and encoding
04.  xss and encoding04.  xss and encoding
04. xss and encoding
 

Dernier

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Dernier (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

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.