1 / 12

XSS: Cross Site Scripting

XSS: Cross Site Scripting. Alan Geleynse. Example. <? php $name = $_GET ['name']; echo "Hello $name!";. /1.php?name =<script>alert ("XSS ")</script>. Don’t display parameters. User profile page User enters their name Other users can view their name. <? php

astrid
Download Presentation

XSS: Cross Site Scripting

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XSS:Cross Site Scripting Alan Geleynse

  2. Example <?php $name = $_GET['name']; echo "Hello $name!";

  3. /1.php?name=<script>alert("XSS")</script>

  4. Don’t display parameters

  5. User profile page • User enters their name • Other users can view their name

  6. <?php $name = htmlspecialchars($_GET['name']); echo "Hello $name!";

  7. &lt;SCRIPT&gt;alert("XSS") &lt;/SCRIPT&gt;

  8. Only way to protect against XSS is to remove: • < • > • This prevents the use of HTML as well

  9. <imgsrc="javascript:alert('XSS');">

  10. What do we do? • Don’t allow “<“ and “>” unless absolutely necessary • Never trust input • ALL data should be processed before display

  11. Does this really happen? • 9 days ago apache.org was compromised • Attackers opened a bug issue • The bug was a tinyurl directing to a XSS attack • The attack stole the user’s login cookie • This gave them access to administrator accounts • They uploaded a jsp file and could then log passwords • They sent password reset emails to convince users to log in

  12. Questions

More Related