XSS filter on Server side


Published on

project for the final year of engineering
.to create a signature based model on server side
to prevent XSS attacks

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

XSS filter on Server side

  1. 1. MITIGATION OF XSS USING SIGNATURE BASED MODEL ON SERVER SIDE SEMINAR BY Dhanashree Waikar Abhijeet Kate Shailesh Khachane GUIDED BY Mrs. M.A. Pradhan (Head Of Department)
  2. 2. XSS ? ? ? ? (Cross Site Scripting) <ul><li>Allow code injection by malicious web users </li></ul><ul><li>XSS attacks the end user -- it runs arbitrary code in their browser. </li></ul><ul><li>The browser is behind your firewall and is acting within the user’s security context </li></ul>
  3. 3. JavaScript power <ul><li>JavaScript can control what appears on screen. </li></ul><ul><li>JavaScript has access to your history. </li></ul><ul><li>Sites often store session tokens in GET request. </li></ul><ul><li>JavaScript can intercept cookies. </li></ul><ul><li>JavaScript can enumerate your network. </li></ul>
  4. 4. EXAMPLE <ul><li>Code:- <script>alert(&quot;/XSS&quot;/)</script> <script>alert(&quot;XSS&quot;)</script> <script>alert(&quot;XSS&quot;)</script>; <script>alert(String.fromCharCode(88,83,83))</script> </li></ul><ul><li>Effect </li></ul>
  5. 5. Available options to prevent XSS attacks <ul><li>Signature Based </li></ul><ul><ul><li>Positive signature </li></ul></ul><ul><ul><li>Negative signature </li></ul></ul><ul><li>Behavior based </li></ul><ul><li>Client side or server side </li></ul>
  6. 6. Signature based model <ul><li>Prevention using negative signature based model </li></ul><ul><li>Configurable black listed tags </li></ul><ul><li>Placed at the top most layer of the web application. </li></ul><ul><li>Recognized attacks are blocked </li></ul>
  7. 7. Modules for xss prevation <ul><li>Blocker </li></ul><ul><li>Parser </li></ul><ul><li>Validator </li></ul><ul><li>Tag cluster </li></ul>
  8. 8. <ul><li>Blocker </li></ul><ul><ul><li>Checks for the existence of special characters </li></ul></ul><ul><ul><li>For example ‘<’, ‘>’, ‘%’, ‘&’, ‘, ‘&#’ are few of the special characters used to embed JavaScript functions in the tags </li></ul></ul><ul><ul><li>Blocker is responsible to allow or to reject the input string from the user </li></ul></ul><ul><ul><li>According to the status which it receives from validator </li></ul></ul>
  9. 9. <ul><li>Parser </li></ul><ul><ul><li>Called by the Blocker </li></ul></ul><ul><ul><li>Breaks the input into multiple tokens, as tags and attributes </li></ul></ul><ul><ul><li>Stores it as a element in a vector object </li></ul></ul><ul><ul><li>The vector object created by the parser component which invokes the validator </li></ul></ul><ul><ul><li>For <img src=http://www.sample.com/image1.gif> </li></ul></ul><ul><ul><li>The vector elements are </li></ul></ul><ul><ul><ul><li>img, src=http://www.sample.com/image1.gif </li></ul></ul></ul>
  10. 10. <ul><li>Validator </li></ul><ul><ul><li>Checks input for vulnarability by executing the rules using the tag cluster </li></ul></ul><ul><ul><li>Compares tags or attributes of input script </li></ul></ul><ul><ul><li>If mached then marked as vulnabrable </li></ul></ul><ul><ul><li>Verifier() </li></ul></ul><ul><ul><li>detectMalicious() </li></ul></ul>
  11. 11. <ul><li>Tag cluster </li></ul><ul><ul><li>The prohibited tags and the prohibited attributes of tags are categorized as black listed cluster </li></ul></ul><ul><ul><li>Rules for vulnerability identification </li></ul></ul>
  12. 12. <ul><li>Flow diagram </li></ul>
  13. 13. Future Enhancements <ul><li>modular based . </li></ul><ul><li>Modules for Other web application attacks can be added easily. </li></ul><ul><li>E.g. sql injection, Buffer-overflow attacks </li></ul><ul><li>Updates can be provided for the tag cluster </li></ul>
  14. 14. Limitations <ul><li>Only known attacks can be blocked </li></ul><ul><li>Web application’s response performance is reduced. </li></ul>
  15. 15. Conclusion <ul><li>The presented server side solution </li></ul><ul><li>approach meets the need to protect the web </li></ul><ul><li>Applications with the perspective to improve the response time while addressing the XSS attacks </li></ul>
  16. 16. References <ul><li>1. G. A. Di Lucca, A. R. Fasolino, M. Mastoianni, P. Tramontana, &quot;Identifying Cross Site Scripting Vulnerabilities in Web Applications,&quot; Sixth IEEE International Workshop on Web Site Evolution(WSE'04) , pp. 71-80, , 2004. </li></ul><ul><li>2. M. M. Burnett and J. C. Foster, “Hacking the Code: ASP.NET Web Application Security,” Chapter 5 - Filtering User Input, Syngress Publishing © 2004 </li></ul><ul><li>3. Scott, D., Sharp, R. “Developing Secure Web Applications.” IEEEInternet Computing, 6(6), pp. 38-45, Nov 2002. </li></ul><ul><li>4. Jin-Cherng Lin, Jan-Min Chen, &quot;An Automatic Revised Tool for Anti-Malicious Injection,&quot; cit, p. 164, Sixth IEEE International Conference on Computer and Information Technology (CIT'06), 2006. </li></ul><ul><li>5. Zhendong Su, Gary Wassermann, “The essence of command injection attacks in web applications,” Annual Symposium on Principles of Programming Languages, Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles </li></ul><ul><li>6. Christopher Krugel, G.Vigna, William Robertson, “A multimodel approach to the detection of web based attacks,”Computer Networks 48 (2005) pp.717-738 – ELSEVIER, 2005. </li></ul>
  17. 17. Thank you <ul><li>We would like to specially thank </li></ul><ul><li>Mrs. M. A. Pradhan madam , </li></ul><ul><li>Mrs. Vaishali Vairale madam, </li></ul><ul><li>and all respected teachers for </li></ul><ul><li>their continuous help and support. </li></ul>
  18. 18. <ul><li>THANK YOU </li></ul>
  19. 19. <ul><li>QUESTIONS </li></ul>