TechTalk - Cross Site Scripting XSS

42 %
58 %
Information about TechTalk - Cross Site Scripting XSS
Technology

Published on February 17, 2014

Author: axxessio

Source: slideshare.net

Description

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

Cross Site Scripting XSS TechTalk FEBRUARY 2014 DEPARTMENT: ARCHITECTURE AND DEVELOPMENT

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

Introduction https://www.owasp.org/index.php/Top_10_2013-Release_Notes ^ 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 https://www.youtube.com/watch?v=_Z9RQSnf8-g ^ 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 ^ http://example.com/index.php?user=<script>window.onload = function() {var AllLinks=document.getElementsByTagName("a"); AllLinks[0].href = "http://badexample.com/malicious.exe"; }</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 https://www.youtube.com/watch?v=_Z9RQSnf8-g » OWASP https://www.owasp.org/index.php/XSS https://www.owasp.org/index.php/Testing_for_Cross_site_scripting » OWASP Protect ME https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevent ion_Cheat_Sheet » Obscurity by Security, and Other Techitudes by Adam Jon R. http://adamjonrichardson.com/2012/02/01/improving-xss-cross-site-scriptingprevention-in-four-simple-steps/ 16

Add a comment

Related presentations

Related pages

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

... www.fullstackacademy.com. 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