SlideShare une entreprise Scribd logo
1  sur  33
BACKSLASH POWERED
SCANNING
James Kettle
AUTOMATING HUMAN INTUITION
©PortSwigger Ltd 2017 All Rights Reserved
marketizer1
Invalid username or password
©PortSwigger Ltd 2017 All Rights Reserved
OUTLINE
• The three failures of scanners
• Solving the 'Million Payload Problem'
• Black-box interrogation
• Exploit iteration
• Payload sets
• Findings&illustrations
• Further research
• Q&A
©PortSwigger Ltd 2017 All Rights Reserved
WHOAMI
@albinowax
Head of Research at PortSwigger Web Security
My Background: pentesting & bug-bounty hunting
I automate vulnerability detection:
• Cross-Site Request Forgery, PRSSI/RPO, Burp Collaborator
• Server-Side Template Injection
©PortSwigger Ltd 2017 All Rights Reserved
BLIND SPOT 1/3: RARE TECHNOLOGY
• Security through obscurity works (versus scanners)
• How many types of Server-Side Template Injection does your scanner
support?
• 2014: { }
{Amber, Apache Velocity, action4JAVA, ASP.NET (Microsoft), ASP.NET (Mono), AutoGen, Beard, Blade, Blitz, Casper, CheetahTemplate, Chip Template
Engine, Chunk Templates, CL-EMB, CodeCharge Studio, ColdFusion, Cottle, csharptemplates, CTPP, dbPager, Dermis, Django, DTL::Fast (port of Django
templates), Djolt-objc, Dwoo, Dylan Server Pages, ECT, eRuby, FigDice, FreeMarker, Genshi (templating language), Go templates, Google-ctemplate,
Grantlee Template System, GvTags, H2o, HAH, Haml, Hamlets, Handlebars, Hyperkit PHP/XML Template Engine, Histone template Engine, HTML-
TEMPLATE, HTTL, Jade, JavaServer Pages, jin-template, Jinja, Jinja2, JScore, Kalahari, Kid (templating language), Liquid, Lofn, Lucee, Mako, Mars-
Templater, MiniTemplator, mTemplate, Mustache, nTPL, Open Power Template, Obyx, Pebble, Outline, pHAML, PHP, PURE Unobtrusive Rendering Engine,
pyratemp, QueryTemplates, RainTPL, Razor, Rythm, Scalate, Scurvy, Simphple, Smarty, StampTE, StringTemplate, SUIT Framework, Template Attribute
Language, Twital, Template Blocks, Template Toolkit, Thymeleaf, TinyButStrong, Tonic, Toupl, Twig, Twirl, uBook Template, vlibTemplate, WebMacro,
ZeniTPL, BabaJS, Rage, PlannerFw, Fenom}
http://artsploit.blogspot.co.uk/2016/08/pprce2.html
©PortSwigger Ltd 2017 All Rights Reserved
BLIND SPOT 2/3: Variants & filters
• How do we detect blind eval() injection?
".sleep(10)."
• If parenthesis is filtered? False Negative
".`sleep 10`."
• If there's a WAF? False Negative
".sl%D0%B5ep(10)." (Cyrillic е)
• If " is filtered? False Negative
{${sleep(10)}}
• SQLi in double quotes
©PortSwigger Ltd 2017 All Rights Reserved
BLIND SPOT 3/3: Buried vulnerabilities
GET /search/?q=david HTTP/1.1
Host: sea.ebay.com.sg
User-Agent: Mozilla/5.0 etc Firefox/49.0
Accept: text/html
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://sea.ebay.com.sg/
Cookie: session=pZGFjciI6IjAkLCJlx2V4cCI6MTA4
Connection: close
Origin: null
X-Forwarded-For: 127.0.0.1
X-Forwarded-Host: evil.com
http://secalert.net/2013/12/13/ebay-remote-code-execution/
&q[1]=sec{${phpinfo()}}
©PortSwigger Ltd 2017 All Rights Reserved
THE MILLION PAYLOAD PROBLEM
•For every request
•For every input
• For every vulnerability class
• For every technology
• For every variant
• For every filter
• Send the payload!
©PortSwigger Ltd 2017 All Rights Reserved
IDENTIFYING SUSPECTS
Don't scan for vulnerabilities
Scan for suspicious behavior
Iteratively gather evidence
©PortSwigger Ltd 2017 All Rights Reserved
text=foo 200 OK
text=foo' 500 Error
text=foo' 200 OK
PROBE-PAIR FUZZING
• You have an error in your SQL syntax…
• Invalid input
©PortSwigger Ltd 2017 All Rights Reserved
'
'
VULN
PROBE-PAIR CONTROL FLOW
VULNVULN
MATCH
MATCH
NO MATCH
NO MATCH
©PortSwigger Ltd 2017 All Rights Reserved
BLACK-BOX INTERROGATION
Question Probe pair
Am I in a single-quoted string?
Am I in a numeric context?
Am I in a file path?
Am I a function invocation?
Am I in a JSON value?
z'z vs z'z
X/0 vs X/1
","a"," vs ","a":"
sprintg vs sprintf
./../x vs ././x
©PortSwigger Ltd 2017 All Rights Reserved
BLACK-BOX ITERATION
Question Probe pair
What type of quotes am I in?
How can I concatenate?
Can I call a generic function?
Which language am I executing?
z'z vs z'z
z"z vs z"z
z"z"z vs z"."z
z"z"z vs z"||"z
z"z"z vs z"+"z
"+abz(1)+" vs "+abs(1)+"
"+phpversioz()+" vs "+phpversion()+"
"+to_numbez(1)+" vs "+to_number(1)+"
"+isFinitez(1)+" vs "+isFinite(1)+"
©PortSwigger Ltd 2017 All Rights Reserved
Attributes: status code, content type, tag structure, line count, word count ,
input reflection count, keyword count, leading/trailing characters
We need at least one attribute with two properties
• Consistently different between probe1 and probe2
• Consistently the same across repeats
Burp Extender API:
responseDetails.updateWith(response1);
responseDetails.updateWith(response2);
List<String> consistentDetails =
responseDetails.getInvariantAttributes();
RESPONSE COMPARISON
©PortSwigger Ltd 2017 All Rights Reserved
foo 200 1393 25
foo' 200 1392 23
foo' 200 1393 24
String - apostrophe foo' foo'
word_count 1392 1393
Evidence Probe Code Words Lines
©PortSwigger Ltd 2017 All Rights Reserved
Probe Code Words
7 200 139
7/0 500 27
7/1 200 121
7/0 500 27
7/1 200 142
Divide by 0 /0 /1
status_code 500 200
word_count 27 *121* Released today
Evidence
©PortSwigger Ltd 2017 All Rights Reserved
PROBE SELECTION&DELIVERY
•Random content
• Repeat probes
•Alternating responses
• Shuffle probe order
•Deterministic random content
• Use probe batches (cosmetic)
• Before: 7/0 vs 7/1
• After: {7/0, 7/00, 7/0*0} vs {7/1, 7/01, 7/1*1}
©PortSwigger Ltd 2017 All Rights Reserved
221 965
221' 965
221/0 327
221/1 327
221,abz(1) 0
221,abs(1) 965
221,abs(0,1) 0
221,abs(01) 965
221,power(current_request_idz(),0) 0
221,power(current_request_id(),0) 965
221,power(current_request_ic(),0) 0
221,power(current_request_id(),0) 965
SAMPLE REQUEST LOG
©PortSwigger Ltd 2017 All Rights Reserved
HUNTING FINDINGS
©PortSwigger Ltd 2017 All Rights Reserved
TESTING AT SCALE
• Requirements
• Per-domain throttling
• High net speed
• Attack-surface optimisation
• distributeDamage
• Interleave target hosts
• Extract URLs to file for spidering
• Scan each parameter once per site per response type
©PortSwigger Ltd 2017 All Rights Reserved
SAMPLE - MySQLi
Basic fuzz z`z'z" `z'z"
content_length 5357 5263
String - apostrophe z'z z'z
Concatenation: '|| z||'z'z zz'||'z
Basic function
injection
'||abz(1)||' '||abs(1)||'
MySQL injection
'||power(
unix_timestanp(),0
)||'
'||power(
unix_timestamp(),0
)||'
©PortSwigger Ltd 2017 All Rights Reserved
SAMPLE – TRICKIER
String - doublequoted " "
error 1 0
tag_count 3 0
Concatenation: ". ."z"z z"."z
error 1 0
tag_count 3 0
Interpolation: dollar ${{ }}$
error 1 0
tag_count 3 0
©PortSwigger Ltd 2017 All Rights Reserved
SAMPLE - INTERRUPTED
Order-by injection ,abz(1) ,abs(1)
word_count *0* 1023
MSSQL Injection
,power(
current_request_iz()
,0)
,power(
current_request_id()
,0)
word_count 0 1023
403 Forbidden
©PortSwigger Ltd 2017 All Rights Reserved
SAMPLE – REGEX INJECTION
java.lang.illegalargumentexception: character to be escaped is missing
java.util.regex.matcher.appendreplacement(matcher.java:809)
org.tuckey.web.filters.urlrewrite.utils.regexmatcher.replaceall(regexmatcher.java:72)
GET /folder?q=foo0bar HTTP/1.1
HTTP/1.1 301 Moved Permanently
Location: https://zz.com/folder/?q=foohttp://zz.com/folder/bar
Backslash ( vs )
Regex breakout:
q=foo/<regex flags>
q=${sleep(1)}/e%00
©PortSwigger Ltd 2017 All Rights Reserved
SAMPLE - FALSE POSITIVE
WAF grepping for 'substr'
Fixed by adding substr('',0,9) vs substr('',0,0)
Function Injection '||substrz('',0,0)||' '||substr('',0,0)||'
status_code 302 403
©PortSwigger Ltd 2017 All Rights Reserved
SAMPLE - INTEL
•A WAF is re-writing requests to remove comments
•Use this to bypass browser XSS filters
Comment Injection 0/**z'*/ 0*/*/z'*/
status_code 200 500
Tag stripping 0->zz<- <-zz->
status_code 200 500
Released today
©PortSwigger Ltd 2017 All Rights Reserved
MYSTERY SAMPLE
Backslash  
<div 24 32
Escape - unicode g0041 u0041
<div 24 32
Released today
String - singlequoted z' z'
<div 24 32
©PortSwigger Ltd 2017 All Rights Reserved
http://example.com/?q=pub
->http://backend/?q=pub&city=london
http://example.com/?q=pub%26city=';exploit%23
->http://backend/?q=pub&city=';exploit#&city=london
HTTP PARAMETER POLLUTION
Backend Parameter Injection $<x%zz &<x%zz
status_code 500 200
Released today
©PortSwigger Ltd 2017 All Rights Reserved
HPP – BACKEND PARAMETER GUESSING
Released today
Backend param: city %26city=<a'"<% %26cityz=<a'"<%
<script count 5 11
<div count 89 1095
©PortSwigger Ltd 2017 All Rights Reserved
COLD-START BRUTEFORCE ATTACKS
•Enumerating inputs with no prior knowledge
•parameters
•usernames/passwords
•files/folders
•gadgets/classes
©PortSwigger Ltd 2017 All Rights Reserved
ENUMERABLE INPUT DETECTION
/edit_profile?id=734
•Is id enumerable?
•id=734, id=735 and id=736 are distinct
•Is there a finite number of entries?
•id=100735 and id=100736 are the same
©PortSwigger Ltd 2017 All Rights Reserved
RESOURCES
Backslash Powered Scanner code:
https://github.com/portswigger/backslash-powered-scanner
DistributeDamage code:
https://github.com/portswigger/distribute-damage
Original whitepaper:
http://blog.portswigger.net/2016/10/backslash-powered-scanning.html
©PortSwigger Ltd 2017 All Rights Reserved
TAKE-AWAYS
@albinowax
Email: james.kettle@portswigger.net
Scanners can find research grade vulnerabilities
Enhance, don't replace, the pentester
This is still just the beginning

Contenu connexe

Tendances

An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015CODE BLUE
 
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016Christian Schneider
 
Take a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru Otsuka
Take a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru OtsukaTake a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru Otsuka
Take a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru OtsukaCODE BLUE
 
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...CODE BLUE
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP
 
The old is new, again. CVE-2011-2461 is back!
The old is new, again. CVE-2011-2461 is back!The old is new, again. CVE-2011-2461 is back!
The old is new, again. CVE-2011-2461 is back!Luca Carettoni
 
Object Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypassObject Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypassSam Thomas
 
Advanced JS Deobfuscation
Advanced JS DeobfuscationAdvanced JS Deobfuscation
Advanced JS DeobfuscationMinded Security
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerAndrey Karpov
 
The Little Unicorn That Could
The Little Unicorn That CouldThe Little Unicorn That Could
The Little Unicorn That CouldPVS-Studio
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositoriessnyff
 
SAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the codeSAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the codeAndrey Karpov
 
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)Vladimir Kochetkov
 
Why Windows 8 drivers are buggy
Why Windows 8 drivers are buggyWhy Windows 8 drivers are buggy
Why Windows 8 drivers are buggyAndrey Karpov
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerAndrey Karpov
 
Python and Ruby implementations compared by the error density
Python and Ruby implementations compared by the error densityPython and Ruby implementations compared by the error density
Python and Ruby implementations compared by the error densityPVS-Studio
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CorePositive Development User Group
 

Tendances (20)

An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
An Abusive Relationship with AngularJS by Mario Heiderich - CODE BLUE 2015
 
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016
 
Take a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru Otsuka
Take a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru OtsukaTake a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru Otsuka
Take a Jailbreak -Stunning Guards for iOS Jailbreak- by Kaoru Otsuka
 
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
 
Fixing the Java Serialization Mess
Fixing the Java Serialization Mess Fixing the Java Serialization Mess
Fixing the Java Serialization Mess
 
The old is new, again. CVE-2011-2461 is back!
The old is new, again. CVE-2011-2461 is back!The old is new, again. CVE-2011-2461 is back!
The old is new, again. CVE-2011-2461 is back!
 
Object Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypassObject Oriented Exploitation: New techniques in Windows mitigation bypass
Object Oriented Exploitation: New techniques in Windows mitigation bypass
 
Advanced JS Deobfuscation
Advanced JS DeobfuscationAdvanced JS Deobfuscation
Advanced JS Deobfuscation
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzer
 
The Little Unicorn That Could
The Little Unicorn That CouldThe Little Unicorn That Could
The Little Unicorn That Could
 
Ln monitoring repositories
Ln monitoring repositoriesLn monitoring repositories
Ln monitoring repositories
 
SAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the codeSAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the code
 
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)
How to Develop a Secure Web Application and Stay in Mind? (PHDays 3)
 
Test doubles
Test doublesTest doubles
Test doubles
 
Learning Dtrace
Learning DtraceLearning Dtrace
Learning Dtrace
 
Why Windows 8 drivers are buggy
Why Windows 8 drivers are buggyWhy Windows 8 drivers are buggy
Why Windows 8 drivers are buggy
 
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical ReviewerC++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
 
Python and Ruby implementations compared by the error density
Python and Ruby implementations compared by the error densityPython and Ruby implementations compared by the error density
Python and Ruby implementations compared by the error density
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
 

Similaire à Сканирование с использованием бэкслэша: подключаем интуицию

OWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersOWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersLewis Ardern
 
Improving password-based authentication
Improving password-based authenticationImproving password-based authentication
Improving password-based authenticationFrank Denis
 
SSRF For Bug Bounties
SSRF For Bug BountiesSSRF For Bug Bounties
SSRF For Bug BountiesOWASP Nagpur
 
Search for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisSearch for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisAndrey Karpov
 
Defending against application level DoS attacks
Defending against application level DoS attacksDefending against application level DoS attacks
Defending against application level DoS attacksChu Xu
 
Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017Aaron Hnatiw
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecuritiesamiable_indian
 
Whatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processWhatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processguest3379bd
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourSoroush Dalili
 
Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12Jim Manico
 
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINXWallarm
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxFernandoVizer
 
Modern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a FoxModern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a FoxC4Media
 
Fosdem10
Fosdem10Fosdem10
Fosdem10wremes
 
OWASP San Diego Training Presentation
OWASP San Diego Training PresentationOWASP San Diego Training Presentation
OWASP San Diego Training Presentationowaspsd
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyBishan Singh
 
Beyond OWASP Top 10 - TASK October 2017
Beyond OWASP Top 10 - TASK October 2017Beyond OWASP Top 10 - TASK October 2017
Beyond OWASP Top 10 - TASK October 2017Aaron Hnatiw
 

Similaire à Сканирование с использованием бэкслэша: подключаем интуицию (20)

Attacking HTML5
Attacking HTML5Attacking HTML5
Attacking HTML5
 
OWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript DevelopersOWASP Portland - OWASP Top 10 For JavaScript Developers
OWASP Portland - OWASP Top 10 For JavaScript Developers
 
Improving password-based authentication
Improving password-based authenticationImproving password-based authentication
Improving password-based authentication
 
Web Application Defences
Web Application DefencesWeb Application Defences
Web Application Defences
 
SSRF For Bug Bounties
SSRF For Bug BountiesSSRF For Bug Bounties
SSRF For Bug Bounties
 
Search for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisSearch for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code Analysis
 
Defending against application level DoS attacks
Defending against application level DoS attacksDefending against application level DoS attacks
Defending against application level DoS attacks
 
Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017Beyond OWASP Top 10 - Hack In Paris 2017
Beyond OWASP Top 10 - Hack In Paris 2017
 
Hacking Client Side Insecurities
Hacking Client Side InsecuritiesHacking Client Side Insecurities
Hacking Client Side Insecurities
 
Whatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the processWhatever it takes - Fixing SQLIA and XSS in the process
Whatever it takes - Fixing SQLIA and XSS in the process
 
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ BehaviourWAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
WAF Bypass Techniques - Using HTTP Standard and Web Servers’ Behaviour
 
Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12Top Ten Web Application Defenses v12
Top Ten Web Application Defenses v12
 
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
 
Practice of AppSec .NET
Practice of AppSec .NETPractice of AppSec .NET
Practice of AppSec .NET
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptxOWASP_Top_Ten_Proactive_Controls_v2.pptx
OWASP_Top_Ten_Proactive_Controls_v2.pptx
 
Modern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a FoxModern Web Security, Lazy but Mindful Like a Fox
Modern Web Security, Lazy but Mindful Like a Fox
 
Fosdem10
Fosdem10Fosdem10
Fosdem10
 
OWASP San Diego Training Presentation
OWASP San Diego Training PresentationOWASP San Diego Training Presentation
OWASP San Diego Training Presentation
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & Ugly
 
Beyond OWASP Top 10 - TASK October 2017
Beyond OWASP Top 10 - TASK October 2017Beyond OWASP Top 10 - TASK October 2017
Beyond OWASP Top 10 - TASK October 2017
 

Plus de Positive Hack Days

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesPositive Hack Days
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerPositive Hack Days
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesPositive Hack Days
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikPositive Hack Days
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQubePositive Hack Days
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityPositive Hack Days
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Positive Hack Days
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для ApproofPositive Hack Days
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Positive Hack Days
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложенийPositive Hack Days
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложенийPositive Hack Days
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application SecurityPositive Hack Days
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летPositive Hack Days
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиPositive Hack Days
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОPositive Hack Days
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке СиPositive Hack Days
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CorePositive Hack Days
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опытPositive Hack Days
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterPositive Hack Days
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиPositive Hack Days
 

Plus de Positive Hack Days (20)

Инструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release NotesИнструмент ChangelogBuilder для автоматической подготовки Release Notes
Инструмент ChangelogBuilder для автоматической подготовки Release Notes
 
Как мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows DockerКак мы собираем проекты в выделенном окружении в Windows Docker
Как мы собираем проекты в выделенном окружении в Windows Docker
 
Типовая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive TechnologiesТиповая сборка и деплой продуктов в Positive Technologies
Типовая сборка и деплой продуктов в Positive Technologies
 
Аналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + QlikАналитика в проектах: TFS + Qlik
Аналитика в проектах: TFS + Qlik
 
Использование анализатора кода SonarQube
Использование анализатора кода SonarQubeИспользование анализатора кода SonarQube
Использование анализатора кода SonarQube
 
Развитие сообщества Open DevOps Community
Развитие сообщества Open DevOps CommunityРазвитие сообщества Open DevOps Community
Развитие сообщества Open DevOps Community
 
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
Методика определения неиспользуемых ресурсов виртуальных машин и автоматизаци...
 
Автоматизация построения правил для Approof
Автоматизация построения правил для ApproofАвтоматизация построения правил для Approof
Автоматизация построения правил для Approof
 
Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»Мастер-класс «Трущобы Application Security»
Мастер-класс «Трущобы Application Security»
 
Формальные методы защиты приложений
Формальные методы защиты приложенийФормальные методы защиты приложений
Формальные методы защиты приложений
 
Эвристические методы защиты приложений
Эвристические методы защиты приложенийЭвристические методы защиты приложений
Эвристические методы защиты приложений
 
Теоретические основы Application Security
Теоретические основы Application SecurityТеоретические основы Application Security
Теоретические основы Application Security
 
От экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 летОт экспериментального программирования к промышленному: путь длиной в 10 лет
От экспериментального программирования к промышленному: путь длиной в 10 лет
 
Уязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на граблиУязвимое Android-приложение: N проверенных способов наступить на грабли
Уязвимое Android-приложение: N проверенных способов наступить на грабли
 
Требования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПОТребования по безопасности в архитектуре ПО
Требования по безопасности в архитектуре ПО
 
Формальная верификация кода на языке Си
Формальная верификация кода на языке СиФормальная верификация кода на языке Си
Формальная верификация кода на языке Си
 
Механизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET CoreМеханизмы предотвращения атак в ASP.NET Core
Механизмы предотвращения атак в ASP.NET Core
 
SOC для КИИ: израильский опыт
SOC для КИИ: израильский опытSOC для КИИ: израильский опыт
SOC для КИИ: израильский опыт
 
Honeywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services CenterHoneywell Industrial Cyber Security Lab & Services Center
Honeywell Industrial Cyber Security Lab & Services Center
 
Credential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атакиCredential stuffing и брутфорс-атаки
Credential stuffing и брутфорс-атаки
 

Dernier

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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 productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
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...Miguel Araújo
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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 textsMaria Levchenko
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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 organizationRadu Cotescu
 
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...Neo4j
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Dernier (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 
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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Сканирование с использованием бэкслэша: подключаем интуицию

  • 2. ©PortSwigger Ltd 2017 All Rights Reserved marketizer1 Invalid username or password
  • 3. ©PortSwigger Ltd 2017 All Rights Reserved OUTLINE • The three failures of scanners • Solving the 'Million Payload Problem' • Black-box interrogation • Exploit iteration • Payload sets • Findings&illustrations • Further research • Q&A
  • 4. ©PortSwigger Ltd 2017 All Rights Reserved WHOAMI @albinowax Head of Research at PortSwigger Web Security My Background: pentesting & bug-bounty hunting I automate vulnerability detection: • Cross-Site Request Forgery, PRSSI/RPO, Burp Collaborator • Server-Side Template Injection
  • 5. ©PortSwigger Ltd 2017 All Rights Reserved BLIND SPOT 1/3: RARE TECHNOLOGY • Security through obscurity works (versus scanners) • How many types of Server-Side Template Injection does your scanner support? • 2014: { } {Amber, Apache Velocity, action4JAVA, ASP.NET (Microsoft), ASP.NET (Mono), AutoGen, Beard, Blade, Blitz, Casper, CheetahTemplate, Chip Template Engine, Chunk Templates, CL-EMB, CodeCharge Studio, ColdFusion, Cottle, csharptemplates, CTPP, dbPager, Dermis, Django, DTL::Fast (port of Django templates), Djolt-objc, Dwoo, Dylan Server Pages, ECT, eRuby, FigDice, FreeMarker, Genshi (templating language), Go templates, Google-ctemplate, Grantlee Template System, GvTags, H2o, HAH, Haml, Hamlets, Handlebars, Hyperkit PHP/XML Template Engine, Histone template Engine, HTML- TEMPLATE, HTTL, Jade, JavaServer Pages, jin-template, Jinja, Jinja2, JScore, Kalahari, Kid (templating language), Liquid, Lofn, Lucee, Mako, Mars- Templater, MiniTemplator, mTemplate, Mustache, nTPL, Open Power Template, Obyx, Pebble, Outline, pHAML, PHP, PURE Unobtrusive Rendering Engine, pyratemp, QueryTemplates, RainTPL, Razor, Rythm, Scalate, Scurvy, Simphple, Smarty, StampTE, StringTemplate, SUIT Framework, Template Attribute Language, Twital, Template Blocks, Template Toolkit, Thymeleaf, TinyButStrong, Tonic, Toupl, Twig, Twirl, uBook Template, vlibTemplate, WebMacro, ZeniTPL, BabaJS, Rage, PlannerFw, Fenom} http://artsploit.blogspot.co.uk/2016/08/pprce2.html
  • 6. ©PortSwigger Ltd 2017 All Rights Reserved BLIND SPOT 2/3: Variants & filters • How do we detect blind eval() injection? ".sleep(10)." • If parenthesis is filtered? False Negative ".`sleep 10`." • If there's a WAF? False Negative ".sl%D0%B5ep(10)." (Cyrillic е) • If " is filtered? False Negative {${sleep(10)}} • SQLi in double quotes
  • 7. ©PortSwigger Ltd 2017 All Rights Reserved BLIND SPOT 3/3: Buried vulnerabilities GET /search/?q=david HTTP/1.1 Host: sea.ebay.com.sg User-Agent: Mozilla/5.0 etc Firefox/49.0 Accept: text/html Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Referer: http://sea.ebay.com.sg/ Cookie: session=pZGFjciI6IjAkLCJlx2V4cCI6MTA4 Connection: close Origin: null X-Forwarded-For: 127.0.0.1 X-Forwarded-Host: evil.com http://secalert.net/2013/12/13/ebay-remote-code-execution/ &q[1]=sec{${phpinfo()}}
  • 8. ©PortSwigger Ltd 2017 All Rights Reserved THE MILLION PAYLOAD PROBLEM •For every request •For every input • For every vulnerability class • For every technology • For every variant • For every filter • Send the payload!
  • 9. ©PortSwigger Ltd 2017 All Rights Reserved IDENTIFYING SUSPECTS Don't scan for vulnerabilities Scan for suspicious behavior Iteratively gather evidence
  • 10. ©PortSwigger Ltd 2017 All Rights Reserved text=foo 200 OK text=foo' 500 Error text=foo' 200 OK PROBE-PAIR FUZZING • You have an error in your SQL syntax… • Invalid input
  • 11. ©PortSwigger Ltd 2017 All Rights Reserved ' ' VULN PROBE-PAIR CONTROL FLOW VULNVULN MATCH MATCH NO MATCH NO MATCH
  • 12. ©PortSwigger Ltd 2017 All Rights Reserved BLACK-BOX INTERROGATION Question Probe pair Am I in a single-quoted string? Am I in a numeric context? Am I in a file path? Am I a function invocation? Am I in a JSON value? z'z vs z'z X/0 vs X/1 ","a"," vs ","a":" sprintg vs sprintf ./../x vs ././x
  • 13. ©PortSwigger Ltd 2017 All Rights Reserved BLACK-BOX ITERATION Question Probe pair What type of quotes am I in? How can I concatenate? Can I call a generic function? Which language am I executing? z'z vs z'z z"z vs z"z z"z"z vs z"."z z"z"z vs z"||"z z"z"z vs z"+"z "+abz(1)+" vs "+abs(1)+" "+phpversioz()+" vs "+phpversion()+" "+to_numbez(1)+" vs "+to_number(1)+" "+isFinitez(1)+" vs "+isFinite(1)+"
  • 14. ©PortSwigger Ltd 2017 All Rights Reserved Attributes: status code, content type, tag structure, line count, word count , input reflection count, keyword count, leading/trailing characters We need at least one attribute with two properties • Consistently different between probe1 and probe2 • Consistently the same across repeats Burp Extender API: responseDetails.updateWith(response1); responseDetails.updateWith(response2); List<String> consistentDetails = responseDetails.getInvariantAttributes(); RESPONSE COMPARISON
  • 15. ©PortSwigger Ltd 2017 All Rights Reserved foo 200 1393 25 foo' 200 1392 23 foo' 200 1393 24 String - apostrophe foo' foo' word_count 1392 1393 Evidence Probe Code Words Lines
  • 16. ©PortSwigger Ltd 2017 All Rights Reserved Probe Code Words 7 200 139 7/0 500 27 7/1 200 121 7/0 500 27 7/1 200 142 Divide by 0 /0 /1 status_code 500 200 word_count 27 *121* Released today Evidence
  • 17. ©PortSwigger Ltd 2017 All Rights Reserved PROBE SELECTION&DELIVERY •Random content • Repeat probes •Alternating responses • Shuffle probe order •Deterministic random content • Use probe batches (cosmetic) • Before: 7/0 vs 7/1 • After: {7/0, 7/00, 7/0*0} vs {7/1, 7/01, 7/1*1}
  • 18. ©PortSwigger Ltd 2017 All Rights Reserved 221 965 221' 965 221/0 327 221/1 327 221,abz(1) 0 221,abs(1) 965 221,abs(0,1) 0 221,abs(01) 965 221,power(current_request_idz(),0) 0 221,power(current_request_id(),0) 965 221,power(current_request_ic(),0) 0 221,power(current_request_id(),0) 965 SAMPLE REQUEST LOG
  • 19. ©PortSwigger Ltd 2017 All Rights Reserved HUNTING FINDINGS
  • 20. ©PortSwigger Ltd 2017 All Rights Reserved TESTING AT SCALE • Requirements • Per-domain throttling • High net speed • Attack-surface optimisation • distributeDamage • Interleave target hosts • Extract URLs to file for spidering • Scan each parameter once per site per response type
  • 21. ©PortSwigger Ltd 2017 All Rights Reserved SAMPLE - MySQLi Basic fuzz z`z'z" `z'z" content_length 5357 5263 String - apostrophe z'z z'z Concatenation: '|| z||'z'z zz'||'z Basic function injection '||abz(1)||' '||abs(1)||' MySQL injection '||power( unix_timestanp(),0 )||' '||power( unix_timestamp(),0 )||'
  • 22. ©PortSwigger Ltd 2017 All Rights Reserved SAMPLE – TRICKIER String - doublequoted " " error 1 0 tag_count 3 0 Concatenation: ". ."z"z z"."z error 1 0 tag_count 3 0 Interpolation: dollar ${{ }}$ error 1 0 tag_count 3 0
  • 23. ©PortSwigger Ltd 2017 All Rights Reserved SAMPLE - INTERRUPTED Order-by injection ,abz(1) ,abs(1) word_count *0* 1023 MSSQL Injection ,power( current_request_iz() ,0) ,power( current_request_id() ,0) word_count 0 1023 403 Forbidden
  • 24. ©PortSwigger Ltd 2017 All Rights Reserved SAMPLE – REGEX INJECTION java.lang.illegalargumentexception: character to be escaped is missing java.util.regex.matcher.appendreplacement(matcher.java:809) org.tuckey.web.filters.urlrewrite.utils.regexmatcher.replaceall(regexmatcher.java:72) GET /folder?q=foo0bar HTTP/1.1 HTTP/1.1 301 Moved Permanently Location: https://zz.com/folder/?q=foohttp://zz.com/folder/bar Backslash ( vs ) Regex breakout: q=foo/<regex flags> q=${sleep(1)}/e%00
  • 25. ©PortSwigger Ltd 2017 All Rights Reserved SAMPLE - FALSE POSITIVE WAF grepping for 'substr' Fixed by adding substr('',0,9) vs substr('',0,0) Function Injection '||substrz('',0,0)||' '||substr('',0,0)||' status_code 302 403
  • 26. ©PortSwigger Ltd 2017 All Rights Reserved SAMPLE - INTEL •A WAF is re-writing requests to remove comments •Use this to bypass browser XSS filters Comment Injection 0/**z'*/ 0*/*/z'*/ status_code 200 500 Tag stripping 0->zz<- <-zz-> status_code 200 500 Released today
  • 27. ©PortSwigger Ltd 2017 All Rights Reserved MYSTERY SAMPLE Backslash <div 24 32 Escape - unicode g0041 u0041 <div 24 32 Released today String - singlequoted z' z' <div 24 32
  • 28. ©PortSwigger Ltd 2017 All Rights Reserved http://example.com/?q=pub ->http://backend/?q=pub&city=london http://example.com/?q=pub%26city=';exploit%23 ->http://backend/?q=pub&city=';exploit#&city=london HTTP PARAMETER POLLUTION Backend Parameter Injection $<x%zz &<x%zz status_code 500 200 Released today
  • 29. ©PortSwigger Ltd 2017 All Rights Reserved HPP – BACKEND PARAMETER GUESSING Released today Backend param: city %26city=<a'"<% %26cityz=<a'"<% <script count 5 11 <div count 89 1095
  • 30. ©PortSwigger Ltd 2017 All Rights Reserved COLD-START BRUTEFORCE ATTACKS •Enumerating inputs with no prior knowledge •parameters •usernames/passwords •files/folders •gadgets/classes
  • 31. ©PortSwigger Ltd 2017 All Rights Reserved ENUMERABLE INPUT DETECTION /edit_profile?id=734 •Is id enumerable? •id=734, id=735 and id=736 are distinct •Is there a finite number of entries? •id=100735 and id=100736 are the same
  • 32. ©PortSwigger Ltd 2017 All Rights Reserved RESOURCES Backslash Powered Scanner code: https://github.com/portswigger/backslash-powered-scanner DistributeDamage code: https://github.com/portswigger/distribute-damage Original whitepaper: http://blog.portswigger.net/2016/10/backslash-powered-scanning.html
  • 33. ©PortSwigger Ltd 2017 All Rights Reserved TAKE-AWAYS @albinowax Email: james.kettle@portswigger.net Scanners can find research grade vulnerabilities Enhance, don't replace, the pentester This is still just the beginning

Notes de l'éditeur

  1. Imagine if you could conduct a pentest, and only do the interesting bits Skip the hours of repetitive fuzzing and trawling through meaningless results, and jump straight to that one page that reacts in a mysterious way to your every input that turns out to be code injection into a language you'd never even heard of, or SQLi behind a heavyweight filter that *almost* stops you from cracking open the database. The kind of page no black-box vulnerability scanner would ever find. In this session, I'll share with you the conception and development of a new type of scanner that can find *research grade* injection vulnerabilities 45 plus questions
  2. This all got started around four years ago. I'd just started a pentest on a company we'll call marketizer, and I had a problem that's probably familiar to many of you. No credentials. This was really upsetting. Just from the 90s visual design of the login page I could hear vulnerabilities screaming out at you? No attack surface Didn't even know a valid username. when I did get access, dumped out passwords naturally stored in plaintext and found director's password: [companyName1] His username was more secure than his password next time, I'll get access before the client gives me credentials. Letmein Sometimes it worked spectacularly, but it mostly failed horribly while trying to fix it, realised if I could use the response diffing tech for something far cooler, and that's what I'm here to share with you today
  3. Three huge blind spots = million payload problem I've avoided these issues by using a new approach, implemented in an open source scanner Showcase the results of running this on live sites By the end you'll know why scanners suck, how to build and modify a better scanner, how to use that scanner for maximum effectiveness
  4. I work at portswigger where we make a tool you may have heard of called burp suite My role is to design scanner checks So although I'm about to spent some time slagging off scanners, it's coming from a position of respect I think scanners are great I know they aren't close to their full potential at the moment I also research new vulnerabilities. I spoke at black hat USA about a new type of vulnerability called Server-Side Template Injection. One of the objectives is to make a scanner that can do research for me.
  5. Those are just the well known ones @artsploit got RCE on demo.paypal.com via Dust.js There's a huge tail of obscure tech. If you use it scanners will miss vulnerabilities, Can happen in unexpected ways. For example, some scanners read the etc passwd file to identify XXE and LFI. Using SELinux can prevent a scanner from finding LFI. (the vuln still exists). That's pretty bad.
  6. So, we're limited to languages we explicitly support like, say, PHP But how well can we do those? of these three examples, two are from pentests Most scanners will miss SQLi in double quotes
  7. Assuming vulnerability is in a known technology, and there are no filters Found because q has a spellchecker
  8. Scanners can't do this, so they're reduced to best-effort payloads Leads to people saying "scanners are good for finding low-hanging fruit" which is a statement that breaks my heart what we need and deserve is a scanner that finds high hanging fruit
  9. If we want to make a scanner that doesn't have these blind spots, we need to harness the intuition that human testers have Rather than sending a specific payload that says "find me injection into a double-quoted string being evaluated in PHP", we send a generic payload that says "find me something suspicious" If they find something interesting, they focus on that area and gather further evidence
  10. Concept: pairs of probes To build something powerful, we need to start out with something crude and simple This payload is about as simple as it gets "nice try but there's no sqli here" as a human, we can look at see what's going on scanners try to simulate this by grepping for error messages: flawed – miss handled exceptions We can use a property of the vulnerability to send a payload that is really similar but doesn't break everything I'm going ot show you is built on this concept of pairs of almost identical probes
  11. Concept: visual overview of last slide base response - application's original response before we did any tampering Does it change if we supply ' once again, we have something that's very efficient Does it change back if we supply \' => something interesting is happening the application is probably putting out input in a single quoted string this decision tree underlies all the probe pairs
  12. Using this concept of probe-pairs, we can ask questions of the application You've already seen how to ask if we're in a single-quoted string You can also ask... This is a tiny sample of the questions you can ask If you can think of a vulnerability you can express as a probe pair, you can add it yourself in five lines of code.
  13. Concept: iteration So that's cool, but the true power we can use the answers from these questions to decide what to do next This can detect variants, it can handle filters, it can handle unknown languages This is just one possible outcome from hundreds of combinations Iteration makes this highly efficient - one request to majority of inputs So it addresses all three blind spots!
  14. I've got ahead of myself slightly - haven't defined how to know when two responses are different simple equality will never work - meaningless junk In order to use probes, we need to answer the question 'are these two responses significantly different'? Originally tried to solve this by generating a regular expression Most important thing to note is that at no point do we predict what effect a specific payload will have on the application
  15. Here's a simple example - one valid attributes This scanner has found real sqli vulnerabilities where the only tell is a single word disappearing If there are multiple valid attributes they'll all appear in a table
  16. Status code is normal But the word count isn't static - it's changing randomly Two causes - words attribute is overloaded, or our payload flawed As of todays update, italics + starred Should be taken with a pinch of salt
  17. This diffing strategy is good, but we need to back it up with carefully crafted probes Although the probe pairs look quite simple, the way they're chosen and delivered is really important. This approach will only work if Cosmetic variations
  18. hopefully made sense View from server log
  19. This isn't relevant to interpreting results, so it could be skipped Application expects specific input value Syntax error indistinguishable from incorrect value
  20. that's enough about how the scanner works in theory
  21. 'Black box' doesn't do this justice
  22. The goal was to be polite and avoid flooding people with traffic, but the result (if you're just using backslash powered scanner) is really quite stealthy. From the server's point of view, you're sending a tiny number of innocuous payloads really slowly. So it might come in useful if you're on a red team.. .mil blah
  23. Helps to think of the scanner as a highly enthusiastic rookie security tester Give them a well known vulnerability with no filters, they will identify exactly what's happening Real report from a live website That's cool but no better than any other scanner really.
  24. The strength of this scanner will tell you "I've found something interesting" This was the first critical vuln my scanner found Can anyone tell me what this is? Yep, blind spot #2. PHP with parenthesis filtered out Missed because the input was in the path Kind of thing you expect from an internet of crap device, not a household name website
  25. Whenever you see a partial issue, you can be sure things won't be straightforward When I tried to verify, all requests were being blocked by a WAF - got ip banned! Affects over 100 servers guess other scanners got banned before they finished the scan
  26. if you spend hours investigating, possibly the most disappointing outcome
  27. False positives are caused by flaws in the probe pairs, The ones in backslash powered scanner have been gradually refined But if you add your own probes, you'll need to refine then Something's odd – 403 on valid function Example of why payloads should be as similar as possible By bringing the payloads syntactically closer, we've avoided the vulnerability
  28. Another use of iteration!
  29. Almost matches Java eval on single-quoted regex \" causes an error when it shouldn't
  30. Server-side HTTP Parameter pollution If the frontend fails to URL-encode the input, they can injection extra paramters
  31. after implementing that, got flooded
  32. http://ir.teslamotors.com/corporate-governance-document.cfm?DocumentID=7152 /1 /0 /(1-1) /(1-0) /12 /13 -1 -0 HPP on yahoo? Facebook?
  33. It's easy to enumerate usernames if you start with a username you know is valid. It's the same for parameters – you don't know in advance what the response to a valid parameter will be Files/folders easy to do basic, needs this to be reliable (hello mass assignment&extract) Edge case detection: Integer overflows {2147483647 vs 2147483648}
  34. With a bit of creativity, we can go far beyond injection vulnerabilities As a human, you can read that URL and know what it does All the scanner sees is an input that's a number Enumerable – we're accessing a set of items. Need three unique responses because if we get two, then it could be the intended response, and something saying 'invalid id' Kinda works but it will find things like calendars and other things than transform your input. We can filter out such things by asking the question.. Prototype of this has found all kinds of crazy things, planning on implementing next week
  35. If you simply want to install it, it's in the bapp store This is not one of those security tools that gets released in a presentation and never updated. It has huge potential and I'm planning on loads of improvements to it over the next few months.