Software Security - Cross-Site Scripting

Software Engineering
1.0x

Software Security - Cross-Site Scripting

Created 2 years ago

Duration 0:05:23
lesson view count 368
Select the file type you wish to download
Slide Content
  1. Software Security: Cross-Site Scripting

    Slide 1 - Software Security: Cross-Site Scripting

    • Emerson Murphy-Hill
  2. Cross Site Scripting (XSS)

    Slide 2 - Cross Site Scripting (XSS)

    • Web application takes input from a user but fails to validate the input
    • Input is echoed directly in a web page.
    • Input could be malicious JavaScript, when echoed and interpreted in the destination browser any number of issues could result
    • 1“Build Security In” https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/guidelines/342.html
  3. Cross Site Scripting – Reflected XSS

    Slide 3 - Cross Site Scripting – Reflected XSS

    • http://myserver.com/test.jsp?name=Stefan
    • http://myserver.com/welcome.jsp?name=<script>alert("Attacked")</script>
    • <HTML>
    • <Body>
    • Welcome Stefan
    • </Body>
    • </HTML>
    • <HTML>
    • <Body>
    • Welcome <script>alert("Attacked")</script>
    • </Body>
    • </HTML>
  4. Cross Site Scripting

    Slide 4 - Cross Site Scripting

    • Reflected XSS
    • Attacker-provided script is embedded in the web page generated by the server as an immediate response of an HTTP request.
    • Stored XSS
    • Attacker-provided script is stored to a database and later retrieved and embedded in the web page generated by the server.
  5. Cross Site Scripting – Stored XSS

    Slide 5 - Cross Site Scripting – Stored XSS

    • From: www.itsa.ufl.edu/2006/presentations/malpani.ppt
  6.  Cross Site Scripting – Stored XSS

    Slide 6 - Cross Site Scripting – Stored XSS

    • From: www.itsa.ufl.edu/2006/presentations/malpani.ppt
  7. Cross Site Scripting – Stored XSS

    Slide 7 - Cross Site Scripting – Stored XSS

    • From: www.itsa.ufl.edu/2006/presentations/malpani.ppt
  8. Cross Site Scripting – Stored XSS

    Slide 8 - Cross Site Scripting – Stored XSS

    • Unvalidated Input resulted in a Cross-Site Scripting Attack and the theft of the Administrator’s Cookie
    • From: www.itsa.ufl.edu/2006/presentations/malpani.ppt
  9. Testing for XSS and SQL Injection

    Slide 9 - Testing for XSS and SQL Injection

    • Test for: valid HTML and script code allowed in an input field
    • Special characters like < or >
    • <script>alert(“XSS”);<script>
    • <script>alert(document.cookie);<script>
    • article.php?title=<meta%20http-equiv="refresh"%20content="0;">
    • Causes denial of service
    • See http://ha.ckers.org/xss.html
    • See http://www.owasp.org/index.php/Testing_for_Cross_site_scripting