TechTalk - Cross Site Scripting XSS

44 %
56 %
Information about TechTalk - Cross Site Scripting XSS

Published on February 17, 2014

Author: axxessio



Jürgen Kranz and Justice Nanhou (Architecture and Development Department at axxessio) focused on Cross Site Scripting XSS during this TechTalk.


Table of Contents » » » » » » ^ Introduction Stored XSS Reflected XSS DOM Based XSS XSS Attack Consequences How to Protect Yourself 2

Introduction ^ 3

Introduction ^ XSS flaws occur whenever » application takes untrusted data and sends it to a web browser without proper validation and escaping It allows » attackers to execute scripts in the victim’s browser which can: » hijack user sessions, » deface web sites, or » redirect the user to malicious sites. 4

Introduction ^ 5

Stored XSS Attacks ^ » The injected code is permanently stored on the target servers: » » » » Database Message forum Visitor log Comment field. … » The victim then retrieves the malicious script from the server when it requests the stored information 6

Stored XSS Attacks ^ Test XSS, <script>alert(document.cookie)</script> 7

Stored XSS Attacks ^ Test XSS, <script>alert(document.cookie)</script> 8

Reflected XSS Attacks ^ » The injected code is reflected off the web server, such as in: » » » » An error message Search result An e-mail message Or any other response that includes some or all of the input sent to the server as part of the request 9

Reflected XSS Attacks ^<script>window.onload = function() {var AllLinks=document.getElementsByTagName("a"); AllLinks[0].href = ""; }</script> 10

Reflected XSS Attacks ^ Different syntax or enconding " onfocus="alert(document.cookie) "><script >alert(document.cookie)</script > "%3cscript%3ealert(document.cookie)%3c/script%3e "><ScRiPt>alert(document.cookie)</ScRiPt> 11

DOM Based XSS ^ » The DOM, or Document Object Model, » is the structural format used to represent documents in a browser. » is the de-facto name for XSS bugs <script> document.write("Site is at: " + document.location.href + "."); </script> 12

XSS Attack Consequences ^ » The consequence is the same regardless of whether it is stored, reflected or Dom based. » The most severe XSS attacks involve disclosure of the user’s session cookie, allowing an attacker to hijack the user’s session and take over the account. » It can also include the disclosure of end user files » installation of Trojan horse programs » redirect the user to some other page or site » modify presentation of content. 13

How to Protect Yourself ^ » Escape Output Provided by Users HTML encode any <, >, &, ‘, “ or don’t allow it » Validate user data to make sure it meets your expectations Use an HTML Policy engine to validate or clean user-driven HTML in an outbound way Attribute Escape Before Inserting Untrusted Data into HTML Common Attributes String safe = ESAPI.encoder().encodeForHTMLAttribute( request.getParameter( "input" ) ); JavaScript Escape Before Inserting Untrusted Data into JavaScript Data Values String safe = ESAPI.encoder().encodeForJavaScript( request.getParameter( "input" ) ); 14

Thank you for your attention!

Additional Information ^ » OWASP YouTube Chanel » OWASP » OWASP Protect ME ion_Cheat_Sheet » Obscurity by Security, and Other Techitudes by Adam Jon R. 16

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

TECH TALK: Web Security and Cross-Site Scripting Attack ...

... Security and Cross-Site Scripting is a common hacking method used to g ...
Read more

What is Cross-site Scripting and How Can You Fix it?

This article will show you how Cross-site Scripting attacks work and how you can use Acunetix WVS to protect your website ... Cross-site Scripting (XSS) ...
Read more

Kĩ thuật tấn công CROSS-SITE SCRIPTING | Tech Talk

Nhưng thỉnh thoảng vẫn có trường hợp website đó bị dính lỗi XSS nhưng vẫn không xuất hiện cái popup thì buộc lòng bạn ...
Read more

Skriptfilter über mehrere Websites hinweg - Microsoft Windows

Internet Explorer 9 enthält einen Cross-Site-Scripting-Filter (XSS-Filter), der diese Arten von Angriffen erkennen kann. Wenn Bedrohungen gefunden ...
Read more

Cross-Site Scripting (XSS) Cheat Sheet | Veracode

Cross-Site Scripting (XSS) Tutorial: Learn About XSS Vulnerabilities, Injections and How to Prevent Attacks. XSS - What Is Cross-Site Scripting?
Read more

Cross-site Scripting (XSS) - OWASP

See the XSS (Cross Site Scripting) Prevention Cheat Sheet. See the DOM based XSS Prevention Cheat Sheet. See the OWASP Development Guide article on Phishing.
Read more

Cross Site Scripting (XSS) | Web-Sicherheit | WWW ...

Cross Site Scripting (XSS) Hauptnavigation. Link zur Startseite. Universität. Organisation; Fakten und Zahlen; Rektorat; Campusplan ...
Read more

Cross-Site Scripting - Sicherheit - Tutorials, Tipps und ...

Mit Cross-Site Scripting (XSS) ... Dann können Sie nach der Anmeldung "Cross-Site Scripting" hier bearbeiten. Mitarbeiter. Marc Rochow.
Read more

Cross-Site Scripting (XSS) Web Application Vulnerability ...

Cross-site scripting vulnerability is a commonly exploited web application vulnerability. Find out if your website is vulnerable to XSS with Netsparker.
Read more