+ All Categories
Home > Technology > Xss what the heck-!

Xss what the heck-!

Date post: 14-Apr-2017
Category:
Upload: vodqablr
View: 174 times
Download: 0 times
Share this document with a friend
25
Cross Site Scripting(XSS) What the heck?! Harinee Muralinath Karthik Krishnan
Transcript
Page 1: Xss   what the heck-!

Cross Site Scripting(XSS)What the heck?!

Harinee MuralinathKarthik Krishnan

Page 2: Xss   what the heck-!

Agenda

❏What is our intent?

❏What is XSS?

❏Prevention techniques

❏Testing tools

Page 3: Xss   what the heck-!

What is our intent?

❏security-related jargons - one at a time

❏generate interest

❏give you a guided, hands-on experience

❏apply on projects

❏take your time to learn

Page 4: Xss   what the heck-!

What this session will NOT be

❏Make you security experts

❏Tool-oriented

Page 5: Xss   what the heck-!

Source: owasp.org

Page 6: Xss   what the heck-!
Page 7: Xss   what the heck-!
Page 8: Xss   what the heck-!

What is Cross-site Scripting (XSS)?

❏ Concept of planting scripts by misusing the powers of HTML, CSS, javascript etc.

❏ When web applications take data from users and dynamically include it in Web pages without first properly validating the data

❏ The victim of XSS is usually another user, instead of the host server itself (which is just a medium)

Page 9: Xss   what the heck-!

Demo

Page 10: Xss   what the heck-!

Forms of XSS❏Reflective XSS

❏Persistent XSS

Page 11: Xss   what the heck-!

Reflective XSS

Page 12: Xss   what the heck-!

Persistent XSS

Page 13: Xss   what the heck-!

Demo

Page 14: Xss   what the heck-!

Prevention Techniques

❏Input validation

❏Output encoding

Page 15: Xss   what the heck-!

Possible Solutions?

Page 16: Xss   what the heck-!

Solution #1Validate Input for HTML tag characters (< >)

Page 17: Xss   what the heck-!

Solution #2Blacklist script Tags

Page 18: Xss   what the heck-!

Solution #3Output encode HTML Tags

Page 19: Xss   what the heck-!

Solution #4Content Security Policy

Page 20: Xss   what the heck-!

Content Security Policy

No inline scripts or JS event handlers

Before:<head>

<script>alert(“Hi, I’m an inline script”);</script></head>

Now:<head>

<script src=”non-inline-script.js”></script></head>

Page 21: Xss   what the heck-!

Content Security Policy

Whitelist domains

Before:<head>

<script src=”http://attacker.com/evil.js”></script></head>Now:<head>

<script src=”https://trusted.com/safe.js”></script></head>

Content-Security-Policy:script-src https://trusted.com

Page 23: Xss   what the heck-!

Demo

Page 24: Xss   what the heck-!

Future references❏XSS Cheat Sheet

https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet

❏XSS Prevention Cheat Sheethttps://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

Page 25: Xss   what the heck-!

Thank you!Please reach out to

Harinee Muralinath - [email protected] Krishnan - [email protected]


Recommended