SlideShare a Scribd company logo
Bugs -> max
Time <= T
Omar Ganiev
11/10/2015
Hi!
• I’m Beched
• I do application security assessment and penetration
testing at IncSecurity
• Also I compete as RDot.Org independent team
member
Contents
• Intro
• Technical view
• Algorithmic view
• Whitebox
• Outro
The problem
Common situations where the problem of rapid testing of web
application arises:
• Pentesting a huge scope full of web apps. You have a
couple of weeks to analyse and pwn them
• The similar case – bug bounty. You want to collect (low)
hanging fruits faster than others
• Customer asks about the costs of your work. You want to
estimate the cost by looking at web app for 5 minutes
• Competition (Capture The Flag). You want to pwn the
tasks quickly to focus on others and to get extra points
The solution
• Prioritizing
• Parallelizing
• Automation
• Guessing
• Heuristics
• ???
• PROFIT
• That’s it?
Manual testing
• Tons of articles and books are written about
testing methodology (including OWASP Testing
Guide)
• Manual testing includes application logic
analysis along with fuzzing
• Manual testing is more careful (no or 1=1 in
DROP-queries, etc)
Manual testing
• You can capture low hanging fruits in <= T time
manually, but not in N applications
• Generally automated scanning surely sucks
• But anyway we’ll focus on improving tools
rather than hands =)
Semi-automated testing
• NMap, Burp Suite, Recon-NG, CMSMap, RAFT,
etc…
• The tools are cool and save time, but still, you
need to do a lot by hands, and the
combination of such tools is poorly scalable
Automated testing
• Most of pentesters write their own specialized
tools for automated pentesting
• Generally It is rather complex task with a bit of
rocket science
• There’re a lot of problems like rich application
crawling or natural language processing (your
program actually needs to read human
language to understand the application)
Automated testing
• There’re two main variables for measuring complexity
(speed) of the testing methodology: time (depends on
CPU & memory usage) and number of network
requests
• They correlate, and time can be decreased by technical
measures
• This is coverage vs requests count trade-of
• Bugs -> max; time <= T; requests <= Q
• We’ll mainly focus on the second parameter
Automated testing
• Let’s take a look at some tips’n’tricks useful for
pentesting toolkit
• We’ll observe technical and algorithmic ways
to decrease testing time and number of
network requests
Contents
• Intro
• Technical view
• Algorithmic view
• Whitebox
• Outro
Technical view
• Well-known things first
• HTTP speed-up: Keep-Alive & HEAD
• HEAD method can be used for directory listing and
any other checks, which only need response
headers (length- or time-based payloads,
response splitting, etc)
• Keep-Alive is always useful, decreases number of
connections and hanshakes and hence the server
load
Technical view
• Trivial paths first
• Why crawling the whole site, if there’re
sitemap.xml, robots.txt and Google dorks?
• Why scanning the whole site, when you can
detect a CMS and version and check for vulns
in database?
• Why fuzzing a login form a lot, when you can
hit top passwords?
Technical view
• Scaling
• Threading and horizontal scaling increase the
speed very much, hence they can provide
better covering (if we limit time, but not
requests)
• Recent example of distributed scanning
platform is https://github.com/yahoo/gryffin/
written in Go
Contents
• Intro
• Technical view
• Algorithmic view
• Whitebox
• Outro
Algorithmic view
• Algorithmic view is quite interesting. How can
we increase the number of fuzzed points and
checked vulnerabilities without increasing
requests count?
• Let’s remember the problems we face while
conducting (semi-)manual testing
Algorithmic view
• Ever seen such?
• How do you process it
manually?
• URL patterns, similar
pages
Algorithmic view
• Already mentiond Gryffin project by Yahoo uses quite a
handy algorithm – Simhash
• Take a look:
http://www.wwwconference.org/www2007/papers/pape
r215.pdf
• If we build a Simhash-index of pages, we can skip
duplicates, saving a lot of time
• Possibly it’s better to take into account not only response
body, but response status, headers, parameters, etc
Algorithmic view
• How to gather input points (GET, POST, Cookie,
headers, …)?
• Classical way: automate browser (PhantomJS)
and crawl the website, process each request
• Quick way:
• Parse forms, parse links with query strings,
parse XHR parameters from JS
Algorithmic view
• How to gather unknown input points?
• Brute force
• Quick: Iterative binary search
• Collect a list of common parameter names, hit
them all in query string at once and check
page for changes, then perform dichotomy
Algorithmic view
• How to fuzz input points?
• Long way: take a big list of fuzzing strings and
fuzz each parameter
• Quick way: construct polyglot payloads and
check for a bunch of vulns at once
• Take a look:
http://www.slideshare.net/MathiasKarlsson2/p
olyglot-payloads-in-practice-by-avlidienbrun
n-at-hackpra
Algorithmic view
• Polyglot payloads can be constructed because of
ignored contexts (such as comments) in diferent
languages
• Example of polyglot string: <tagxss>
%0dresponse:splitting'"attributexss
• Null-byte or backslash should be placed last
• Time-based for (Postgre|My)SQL-injection: '/*!
+sleep(10)*/+n1#(select 2 from (select
pg_sleep(10))x)n+'
Algorithmic view
• Ok, what do we actually do, when we look at
web app by eyes?
• We estimate “hackableness” of app or page
and then think how can we hack it
• Why not automate thinking? %)
Algorithmic view
• The thinking flow is like this:
“Hm… It’s enterprise .NET site with a single login form.
Probably not that hackable
…
Hm… It’s default WordPress installation without plugins and
custom themes. Probably not hackable
…
Hm… It’s shitty custom PHP engine with a lot of forms and
input parameters. Instantly hackable! 8)
“
Algorithmic view
• What makes us think one or another way? Let’s point out
some of features:
Platform (PHP, ASP, Ruby, …)
Server (Apache, Nginx, IIS, …)
Engine (WordPress, Django, RoR, …)
Queries (count parameters in links on main page)
Scripts (number of script tags on main page)
Inputs (number of input tags on main page)
SSL (if the site works with HTTPS or not)
Algorithmic view
• The simpliest vulnerable-vs-secure classifier
ever:
if PHP:
vulnerable = True
else:
vulnerable = False
• Ok, just kidding =)
Algorithmic view
Machine learning FTW!
Algorithmic view
Algorithmic view
• Today before the talk I scanned about a
thousand sites and built this decision tree on
obtained data
• Actual classifier is a bit bigger than simpliest,
but yet the common sense is preserved %)
• If the main page is PHP-script, there’re at least
4 GET-parameters in the links on it, and there’s
at least one script tag, then site is probably
vulnerable =)
Algorithmic view
• Ok, this is about cost estimation, but how can
this help us to scan the site?
• Ever seen this?
Algorithmic view
• Let’s calculate more features for each page
and build priority queue during scan
• If you do it right, /favicon.ico will be scanned
last, and /admin.php will be scanned first
Algorithmic view
• Which features can we calculate?
• Dynamic/static page: detected platform
(dynamic language vs none), content-type (html
vs static), extension
• Response status: OK vs Forbidden vs Redirect vs
Not Found vs …
• A bit of NLP: if the path contains important
words like admin, password, login, etc
Algorithmic view
Algorithmic view
• Lower priority() – higher priority:
Contents
• Intro
• Technical view
• Algorithmic view
• Whitebox
• Outro
Whitebox
• Static code analysis is a lot more rocket science
thing, than blackbox testing
• Modern enterprise static code analysis systems
are big and still not enough good (some of
them still not better than grep)
• They may have nice ads with samples, but ads-
samples can probably be constructed by
hand ;)
Whitebox
• Most pentesters have their own dirty hacks and
regexps for finding the vulns
• I also use a simple grep wrapper, which allows to spot
out security bottlenecks and obvious bugs in no time
• Especially useful during CTF, when the source code is
not that big
• If integrated with IDE, can be rather cool semi-manual
analyser
Whitebox
• Collect a list of dangerous sinks for various
languages
• Take a pattern for variable (like $.* in PHP)
• Take a list of securing functions
• Generate regexps with negative lookahead,
which will search for patterns like this:
danger_func(…not_a_securing_func(…$var
Whitebox
• Get the result like this
• Parse it into any IDE and analyse traces
Contents
• Intro
• Technical view
• Algorithmic view
• Whitebox
• Outro
Summary
• Application testing can be made faster in many
ways
• Some of ways are achievable during manual
assessment, some of them are not
• We can build fast and scalable web application
scanner for this
• It will traverse pwning paths graph in an efficient
way and halt after hitting the requests limit
Results
• Some of reviewed techniques are already
implemented in reps on my GitHub
(libpywebhack repository not updated for
years): https://github.com/beched
• It will be updated as soon as I finish debugging
PoC scripts
Questions?
beched@incsecurity.ru

More Related Content

What's hot

Security Code Review 101
Security Code Review 101Security Code Review 101
Security Code Review 101
Paul Ionescu
 
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
Sam Bowne
 
CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2
Sam Bowne
 
BSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability ManagementBSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability Management
Andrew McNicol
 
CNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side ControlsCNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side Controls
Sam Bowne
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
Vlad Voskoboynik
 
Php Debugging from the Trenches
Php Debugging from the TrenchesPhp Debugging from the Trenches
Php Debugging from the Trenches
Simon Jones
 
REST Api Tips and Tricks
REST Api Tips and TricksREST Api Tips and Tricks
REST Api Tips and Tricks
Maksym Bruner
 
CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)
CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)
CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)
Sam Bowne
 
DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1
Michael Gough
 
CNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationCNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking Authentication
Sam Bowne
 
CNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsCNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End Components
Sam Bowne
 
9: OllyDbg
9: OllyDbg9: OllyDbg
9: OllyDbg
Sam Bowne
 
Hibernate performance tuning
Hibernate performance tuningHibernate performance tuning
Hibernate performance tuning
Mikalai Alimenkou
 
3. Security Engineering
3. Security Engineering3. Security Engineering
3. Security Engineering
Sam Bowne
 
CNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the ApplicationCNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the Application
Sam Bowne
 
Introduction to shodan
Introduction to shodanIntroduction to shodan
Introduction to shodan
n|u - The Open Security Community
 
Preventing Complexity in Game Programming
Preventing Complexity in Game ProgrammingPreventing Complexity in Game Programming
Preventing Complexity in Game Programming
Yaser Zhian
 
Email keeps getting us pwned v1.1
Email keeps getting us pwned v1.1Email keeps getting us pwned v1.1
Email keeps getting us pwned v1.1
Michael Gough
 
padding oracle attack
padding oracle attackpadding oracle attack
padding oracle attack
Satish b
 

What's hot (20)

Security Code Review 101
Security Code Review 101Security Code Review 101
Security Code Review 101
 
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
CNIT 129S: 12: Attacking Users: Cross-Site Scripting (Part 1 of 2)
 
CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2CNIT 129S: Securing Web Applications Ch 1-2
CNIT 129S: Securing Web Applications Ch 1-2
 
BSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability ManagementBSidesJXN 2017 - Improving Vulnerability Management
BSidesJXN 2017 - Improving Vulnerability Management
 
CNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side ControlsCNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 129S: Ch 5: Bypassing Client-Side Controls
 
Introduction to django
Introduction to djangoIntroduction to django
Introduction to django
 
Php Debugging from the Trenches
Php Debugging from the TrenchesPhp Debugging from the Trenches
Php Debugging from the Trenches
 
REST Api Tips and Tricks
REST Api Tips and TricksREST Api Tips and Tricks
REST Api Tips and Tricks
 
CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)
CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)
CNIT 129S: 9: Attacking Data Stores (Part 2 of 2)
 
DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1DIR ISF - Email keeps getting us pwned v1.1
DIR ISF - Email keeps getting us pwned v1.1
 
CNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking AuthenticationCNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: Ch 6: Attacking Authentication
 
CNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End ComponentsCNIT 129S: 10: Attacking Back-End Components
CNIT 129S: 10: Attacking Back-End Components
 
9: OllyDbg
9: OllyDbg9: OllyDbg
9: OllyDbg
 
Hibernate performance tuning
Hibernate performance tuningHibernate performance tuning
Hibernate performance tuning
 
3. Security Engineering
3. Security Engineering3. Security Engineering
3. Security Engineering
 
CNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the ApplicationCNIT 129S Ch 4: Mapping the Application
CNIT 129S Ch 4: Mapping the Application
 
Introduction to shodan
Introduction to shodanIntroduction to shodan
Introduction to shodan
 
Preventing Complexity in Game Programming
Preventing Complexity in Game ProgrammingPreventing Complexity in Game Programming
Preventing Complexity in Game Programming
 
Email keeps getting us pwned v1.1
Email keeps getting us pwned v1.1Email keeps getting us pwned v1.1
Email keeps getting us pwned v1.1
 
padding oracle attack
padding oracle attackpadding oracle attack
padding oracle attack
 

Similar to [Russia] Bugs -> max, time &lt;= T

Practical automation for beginners
Practical automation for beginnersPractical automation for beginners
Practical automation for beginners
Seoweon Yoo
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
Acquia
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
Taylor Lovett
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in Enterprise
Taylor Lovett
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps Engineers
DevOps.com
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
Introduction to Penetration Testing
Introduction to Penetration TestingIntroduction to Penetration Testing
Introduction to Penetration Testing
Andrew McNicol
 
Scraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHP
Paul Redmond
 
Improving your team's source code searching capabilities - Voxxed Thessalonik...
Improving your team's source code searching capabilities - Voxxed Thessalonik...Improving your team's source code searching capabilities - Voxxed Thessalonik...
Improving your team's source code searching capabilities - Voxxed Thessalonik...
Nikos Katirtzis
 
Improving your team’s source code searching capabilities
Improving your team’s source code searching capabilitiesImproving your team’s source code searching capabilities
Improving your team’s source code searching capabilities
Nikos Katirtzis
 
What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptx
AbhijeetKumar456867
 
Case study
Case studyCase study
Case study
karan saini
 
How to Do a Performance Audit of Your .NET Website
How to Do a Performance Audit of Your .NET WebsiteHow to Do a Performance Audit of Your .NET Website
How to Do a Performance Audit of Your .NET Website
DNN
 
Static Site Generators: what they are and when they are useful
Static Site Generators: what they are and when they are usefulStatic Site Generators: what they are and when they are useful
Static Site Generators: what they are and when they are useful
Paul Walk
 
Real time web
Real time webReal time web
Real time web
Medhat Dawoud
 
Search Engine Optimization (Seo) for Developers
Search Engine Optimization (Seo) for DevelopersSearch Engine Optimization (Seo) for Developers
Search Engine Optimization (Seo) for Developers
Matthew Robinson
 
Manipulating Web Application Interfaces
Manipulating Web Application InterfacesManipulating Web Application Interfaces
Manipulating Web Application Interfaces
Felipe M
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspec
jeffrey1ross
 
Putting Compilers to Work
Putting Compilers to WorkPutting Compilers to Work
Putting Compilers to Work
SingleStore
 

Similar to [Russia] Bugs -> max, time &lt;= T (20)

Practical automation for beginners
Practical automation for beginnersPractical automation for beginners
Practical automation for beginners
 
5 Common Mistakes You are Making on your Website
 5 Common Mistakes You are Making on your Website 5 Common Mistakes You are Making on your Website
5 Common Mistakes You are Making on your Website
 
Best practices-wordpress-enterprise
Best practices-wordpress-enterpriseBest practices-wordpress-enterprise
Best practices-wordpress-enterprise
 
Best Practices for WordPress in Enterprise
Best Practices for WordPress in EnterpriseBest Practices for WordPress in Enterprise
Best Practices for WordPress in Enterprise
 
Security in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps EngineersSecurity in CI/CD Pipelines: Tips for DevOps Engineers
Security in CI/CD Pipelines: Tips for DevOps Engineers
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
 
Introduction to Penetration Testing
Introduction to Penetration TestingIntroduction to Penetration Testing
Introduction to Penetration Testing
 
Scraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHPScraping the web with Laravel, Dusk, Docker, and PHP
Scraping the web with Laravel, Dusk, Docker, and PHP
 
Improving your team's source code searching capabilities - Voxxed Thessalonik...
Improving your team's source code searching capabilities - Voxxed Thessalonik...Improving your team's source code searching capabilities - Voxxed Thessalonik...
Improving your team's source code searching capabilities - Voxxed Thessalonik...
 
Improving your team’s source code searching capabilities
Improving your team’s source code searching capabilitiesImproving your team’s source code searching capabilities
Improving your team’s source code searching capabilities
 
What-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptxWhat-is-Laravel-23-August-2017.pptx
What-is-Laravel-23-August-2017.pptx
 
Case study
Case studyCase study
Case study
 
How to Do a Performance Audit of Your .NET Website
How to Do a Performance Audit of Your .NET WebsiteHow to Do a Performance Audit of Your .NET Website
How to Do a Performance Audit of Your .NET Website
 
Static Site Generators: what they are and when they are useful
Static Site Generators: what they are and when they are usefulStatic Site Generators: what they are and when they are useful
Static Site Generators: what they are and when they are useful
 
Real time web
Real time webReal time web
Real time web
 
Search Engine Optimization (Seo) for Developers
Search Engine Optimization (Seo) for DevelopersSearch Engine Optimization (Seo) for Developers
Search Engine Optimization (Seo) for Developers
 
Manipulating Web Application Interfaces
Manipulating Web Application InterfacesManipulating Web Application Interfaces
Manipulating Web Application Interfaces
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspec
 
Putting Compilers to Work
Putting Compilers to WorkPutting Compilers to Work
Putting Compilers to Work
 

More from OWASP EEE

[Austria] ZigBee exploited
[Austria] ZigBee exploited[Austria] ZigBee exploited
[Austria] ZigBee exploited
OWASP EEE
 
[Austria] Security by Design
[Austria] Security by Design[Austria] Security by Design
[Austria] Security by Design
OWASP EEE
 
[Austria] How we hacked an online mobile banking Trojan
[Austria] How we hacked an online mobile banking Trojan[Austria] How we hacked an online mobile banking Trojan
[Austria] How we hacked an online mobile banking Trojan
OWASP EEE
 
[Poland] It's only about frontend
[Poland] It's only about frontend[Poland] It's only about frontend
[Poland] It's only about frontend
OWASP EEE
 
[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec tools[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec tools
OWASP EEE
 
[Cluj] Turn SSL ON
[Cluj] Turn SSL ON[Cluj] Turn SSL ON
[Cluj] Turn SSL ON
OWASP EEE
 
[Cluj] Information Security Through Gamification
[Cluj] Information Security Through Gamification[Cluj] Information Security Through Gamification
[Cluj] Information Security Through Gamification
OWASP EEE
 
[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)
OWASP EEE
 
[Cluj] A distributed - collaborative client certification system
[Cluj] A distributed - collaborative client certification system[Cluj] A distributed - collaborative client certification system
[Cluj] A distributed - collaborative client certification system
OWASP EEE
 
[Russia] Node.JS - Architecture and Vulnerabilities
[Russia] Node.JS - Architecture and Vulnerabilities[Russia] Node.JS - Architecture and Vulnerabilities
[Russia] Node.JS - Architecture and Vulnerabilities
OWASP EEE
 
[Russia] MySQL OOB injections
[Russia] MySQL OOB injections[Russia] MySQL OOB injections
[Russia] MySQL OOB injections
OWASP EEE
 
[Russia] Give me a stable input
[Russia] Give me a stable input[Russia] Give me a stable input
[Russia] Give me a stable input
OWASP EEE
 
[Russia] Building better product security
[Russia] Building better product security[Russia] Building better product security
[Russia] Building better product security
OWASP EEE
 
[Lithuania] I am the cavalry
[Lithuania] I am the cavalry[Lithuania] I am the cavalry
[Lithuania] I am the cavalry
OWASP EEE
 
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
OWASP EEE
 
[Lithuania] DigiCerts and DigiID to Enterprise apps
[Lithuania] DigiCerts and DigiID to Enterprise apps[Lithuania] DigiCerts and DigiID to Enterprise apps
[Lithuania] DigiCerts and DigiID to Enterprise apps
OWASP EEE
 
[Lithuania] Introduction to threat modeling
[Lithuania] Introduction to threat modeling[Lithuania] Introduction to threat modeling
[Lithuania] Introduction to threat modeling
OWASP EEE
 
[Hungary] I play Jack of Information Disclosure
[Hungary] I play Jack of Information Disclosure[Hungary] I play Jack of Information Disclosure
[Hungary] I play Jack of Information Disclosure
OWASP EEE
 
[Hungary] Survival is not mandatory. The air force one has departured are you...
[Hungary] Survival is not mandatory. The air force one has departured are you...[Hungary] Survival is not mandatory. The air force one has departured are you...
[Hungary] Survival is not mandatory. The air force one has departured are you...
OWASP EEE
 
[Hungary] Secure Software? Start appreciating your developers!
[Hungary] Secure Software? Start appreciating your developers![Hungary] Secure Software? Start appreciating your developers!
[Hungary] Secure Software? Start appreciating your developers!
OWASP EEE
 

More from OWASP EEE (20)

[Austria] ZigBee exploited
[Austria] ZigBee exploited[Austria] ZigBee exploited
[Austria] ZigBee exploited
 
[Austria] Security by Design
[Austria] Security by Design[Austria] Security by Design
[Austria] Security by Design
 
[Austria] How we hacked an online mobile banking Trojan
[Austria] How we hacked an online mobile banking Trojan[Austria] How we hacked an online mobile banking Trojan
[Austria] How we hacked an online mobile banking Trojan
 
[Poland] It's only about frontend
[Poland] It's only about frontend[Poland] It's only about frontend
[Poland] It's only about frontend
 
[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec tools[Poland] SecOps live cooking with OWASP appsec tools
[Poland] SecOps live cooking with OWASP appsec tools
 
[Cluj] Turn SSL ON
[Cluj] Turn SSL ON[Cluj] Turn SSL ON
[Cluj] Turn SSL ON
 
[Cluj] Information Security Through Gamification
[Cluj] Information Security Through Gamification[Cluj] Information Security Through Gamification
[Cluj] Information Security Through Gamification
 
[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)[Cluj] CSP (Content Security Policy)
[Cluj] CSP (Content Security Policy)
 
[Cluj] A distributed - collaborative client certification system
[Cluj] A distributed - collaborative client certification system[Cluj] A distributed - collaborative client certification system
[Cluj] A distributed - collaborative client certification system
 
[Russia] Node.JS - Architecture and Vulnerabilities
[Russia] Node.JS - Architecture and Vulnerabilities[Russia] Node.JS - Architecture and Vulnerabilities
[Russia] Node.JS - Architecture and Vulnerabilities
 
[Russia] MySQL OOB injections
[Russia] MySQL OOB injections[Russia] MySQL OOB injections
[Russia] MySQL OOB injections
 
[Russia] Give me a stable input
[Russia] Give me a stable input[Russia] Give me a stable input
[Russia] Give me a stable input
 
[Russia] Building better product security
[Russia] Building better product security[Russia] Building better product security
[Russia] Building better product security
 
[Lithuania] I am the cavalry
[Lithuania] I am the cavalry[Lithuania] I am the cavalry
[Lithuania] I am the cavalry
 
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
[Lithuania] Cross-site request forgery: ways to exploit, ways to prevent
 
[Lithuania] DigiCerts and DigiID to Enterprise apps
[Lithuania] DigiCerts and DigiID to Enterprise apps[Lithuania] DigiCerts and DigiID to Enterprise apps
[Lithuania] DigiCerts and DigiID to Enterprise apps
 
[Lithuania] Introduction to threat modeling
[Lithuania] Introduction to threat modeling[Lithuania] Introduction to threat modeling
[Lithuania] Introduction to threat modeling
 
[Hungary] I play Jack of Information Disclosure
[Hungary] I play Jack of Information Disclosure[Hungary] I play Jack of Information Disclosure
[Hungary] I play Jack of Information Disclosure
 
[Hungary] Survival is not mandatory. The air force one has departured are you...
[Hungary] Survival is not mandatory. The air force one has departured are you...[Hungary] Survival is not mandatory. The air force one has departured are you...
[Hungary] Survival is not mandatory. The air force one has departured are you...
 
[Hungary] Secure Software? Start appreciating your developers!
[Hungary] Secure Software? Start appreciating your developers![Hungary] Secure Software? Start appreciating your developers!
[Hungary] Secure Software? Start appreciating your developers!
 

Recently uploaded

Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
Trending Blogers
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
Toptal Tech
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
uehowe
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
ukwwuq
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
bseovas
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
davidjhones387
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
hackersuli
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
fovkoyb
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
bseovas
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
Laura Szabó
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
saathvikreddy2003
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
wolfsoftcompanyco
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
xjq03c34
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
uehowe
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
vmemo1
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
cuobya
 

Recently uploaded (20)

Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
Explore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories SecretlyExplore-Insanony: Watch Instagram Stories Secretly
Explore-Insanony: Watch Instagram Stories Secretly
 
Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!Ready to Unlock the Power of Blockchain!
Ready to Unlock the Power of Blockchain!
 
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
办理毕业证(NYU毕业证)纽约大学毕业证成绩单官方原版办理
 
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
制作原版1:1(Monash毕业证)莫纳什大学毕业证成绩单办理假
 
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
留学学历(UoA毕业证)奥克兰大学毕业证成绩单官方原版办理
 
Discover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to IndiaDiscover the benefits of outsourcing SEO to India
Discover the benefits of outsourcing SEO to India
 
[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024[HUN][hackersuli] Red Teaming alapok 2024
[HUN][hackersuli] Red Teaming alapok 2024
 
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
存档可查的(USC毕业证)南加利福尼亚大学毕业证成绩单制做办理
 
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
不能毕业如何获得(USYD毕业证)悉尼大学毕业证成绩单一比一原版制作
 
Gen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needsGen Z and the marketplaces - let's translate their needs
Gen Z and the marketplaces - let's translate their needs
 
Design Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptxDesign Thinking NETFLIX using all techniques.pptx
Design Thinking NETFLIX using all techniques.pptx
 
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalmanuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
manuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaal
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
办理新西兰奥克兰大学毕业证学位证书范本原版一模一样
 
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
办理毕业证(UPenn毕业证)宾夕法尼亚大学毕业证成绩单快速办理
 
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
重新申请毕业证书(RMIT毕业证)皇家墨尔本理工大学毕业证成绩单精仿办理
 
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
可查真实(Monash毕业证)西澳大学毕业证成绩单退学买
 

[Russia] Bugs -> max, time &lt;= T

  • 1. Bugs -> max Time <= T Omar Ganiev 11/10/2015
  • 2. Hi! • I’m Beched • I do application security assessment and penetration testing at IncSecurity • Also I compete as RDot.Org independent team member
  • 3. Contents • Intro • Technical view • Algorithmic view • Whitebox • Outro
  • 4. The problem Common situations where the problem of rapid testing of web application arises: • Pentesting a huge scope full of web apps. You have a couple of weeks to analyse and pwn them • The similar case – bug bounty. You want to collect (low) hanging fruits faster than others • Customer asks about the costs of your work. You want to estimate the cost by looking at web app for 5 minutes • Competition (Capture The Flag). You want to pwn the tasks quickly to focus on others and to get extra points
  • 5. The solution • Prioritizing • Parallelizing • Automation • Guessing • Heuristics • ??? • PROFIT • That’s it?
  • 6. Manual testing • Tons of articles and books are written about testing methodology (including OWASP Testing Guide) • Manual testing includes application logic analysis along with fuzzing • Manual testing is more careful (no or 1=1 in DROP-queries, etc)
  • 7. Manual testing • You can capture low hanging fruits in <= T time manually, but not in N applications • Generally automated scanning surely sucks • But anyway we’ll focus on improving tools rather than hands =)
  • 8. Semi-automated testing • NMap, Burp Suite, Recon-NG, CMSMap, RAFT, etc… • The tools are cool and save time, but still, you need to do a lot by hands, and the combination of such tools is poorly scalable
  • 9. Automated testing • Most of pentesters write their own specialized tools for automated pentesting • Generally It is rather complex task with a bit of rocket science • There’re a lot of problems like rich application crawling or natural language processing (your program actually needs to read human language to understand the application)
  • 10. Automated testing • There’re two main variables for measuring complexity (speed) of the testing methodology: time (depends on CPU & memory usage) and number of network requests • They correlate, and time can be decreased by technical measures • This is coverage vs requests count trade-of • Bugs -> max; time <= T; requests <= Q • We’ll mainly focus on the second parameter
  • 11. Automated testing • Let’s take a look at some tips’n’tricks useful for pentesting toolkit • We’ll observe technical and algorithmic ways to decrease testing time and number of network requests
  • 12. Contents • Intro • Technical view • Algorithmic view • Whitebox • Outro
  • 13. Technical view • Well-known things first • HTTP speed-up: Keep-Alive & HEAD • HEAD method can be used for directory listing and any other checks, which only need response headers (length- or time-based payloads, response splitting, etc) • Keep-Alive is always useful, decreases number of connections and hanshakes and hence the server load
  • 14. Technical view • Trivial paths first • Why crawling the whole site, if there’re sitemap.xml, robots.txt and Google dorks? • Why scanning the whole site, when you can detect a CMS and version and check for vulns in database? • Why fuzzing a login form a lot, when you can hit top passwords?
  • 15. Technical view • Scaling • Threading and horizontal scaling increase the speed very much, hence they can provide better covering (if we limit time, but not requests) • Recent example of distributed scanning platform is https://github.com/yahoo/gryffin/ written in Go
  • 16. Contents • Intro • Technical view • Algorithmic view • Whitebox • Outro
  • 17. Algorithmic view • Algorithmic view is quite interesting. How can we increase the number of fuzzed points and checked vulnerabilities without increasing requests count? • Let’s remember the problems we face while conducting (semi-)manual testing
  • 18. Algorithmic view • Ever seen such? • How do you process it manually? • URL patterns, similar pages
  • 19. Algorithmic view • Already mentiond Gryffin project by Yahoo uses quite a handy algorithm – Simhash • Take a look: http://www.wwwconference.org/www2007/papers/pape r215.pdf • If we build a Simhash-index of pages, we can skip duplicates, saving a lot of time • Possibly it’s better to take into account not only response body, but response status, headers, parameters, etc
  • 20. Algorithmic view • How to gather input points (GET, POST, Cookie, headers, …)? • Classical way: automate browser (PhantomJS) and crawl the website, process each request • Quick way: • Parse forms, parse links with query strings, parse XHR parameters from JS
  • 21. Algorithmic view • How to gather unknown input points? • Brute force • Quick: Iterative binary search • Collect a list of common parameter names, hit them all in query string at once and check page for changes, then perform dichotomy
  • 22. Algorithmic view • How to fuzz input points? • Long way: take a big list of fuzzing strings and fuzz each parameter • Quick way: construct polyglot payloads and check for a bunch of vulns at once • Take a look: http://www.slideshare.net/MathiasKarlsson2/p olyglot-payloads-in-practice-by-avlidienbrun n-at-hackpra
  • 23. Algorithmic view • Polyglot payloads can be constructed because of ignored contexts (such as comments) in diferent languages • Example of polyglot string: <tagxss> %0dresponse:splitting'"attributexss • Null-byte or backslash should be placed last • Time-based for (Postgre|My)SQL-injection: '/*! +sleep(10)*/+n1#(select 2 from (select pg_sleep(10))x)n+'
  • 24. Algorithmic view • Ok, what do we actually do, when we look at web app by eyes? • We estimate “hackableness” of app or page and then think how can we hack it • Why not automate thinking? %)
  • 25. Algorithmic view • The thinking flow is like this: “Hm… It’s enterprise .NET site with a single login form. Probably not that hackable … Hm… It’s default WordPress installation without plugins and custom themes. Probably not hackable … Hm… It’s shitty custom PHP engine with a lot of forms and input parameters. Instantly hackable! 8) “
  • 26. Algorithmic view • What makes us think one or another way? Let’s point out some of features: Platform (PHP, ASP, Ruby, …) Server (Apache, Nginx, IIS, …) Engine (WordPress, Django, RoR, …) Queries (count parameters in links on main page) Scripts (number of script tags on main page) Inputs (number of input tags on main page) SSL (if the site works with HTTPS or not)
  • 27. Algorithmic view • The simpliest vulnerable-vs-secure classifier ever: if PHP: vulnerable = True else: vulnerable = False • Ok, just kidding =)
  • 30. Algorithmic view • Today before the talk I scanned about a thousand sites and built this decision tree on obtained data • Actual classifier is a bit bigger than simpliest, but yet the common sense is preserved %) • If the main page is PHP-script, there’re at least 4 GET-parameters in the links on it, and there’s at least one script tag, then site is probably vulnerable =)
  • 31. Algorithmic view • Ok, this is about cost estimation, but how can this help us to scan the site? • Ever seen this?
  • 32. Algorithmic view • Let’s calculate more features for each page and build priority queue during scan • If you do it right, /favicon.ico will be scanned last, and /admin.php will be scanned first
  • 33. Algorithmic view • Which features can we calculate? • Dynamic/static page: detected platform (dynamic language vs none), content-type (html vs static), extension • Response status: OK vs Forbidden vs Redirect vs Not Found vs … • A bit of NLP: if the path contains important words like admin, password, login, etc
  • 35. Algorithmic view • Lower priority() – higher priority:
  • 36. Contents • Intro • Technical view • Algorithmic view • Whitebox • Outro
  • 37. Whitebox • Static code analysis is a lot more rocket science thing, than blackbox testing • Modern enterprise static code analysis systems are big and still not enough good (some of them still not better than grep) • They may have nice ads with samples, but ads- samples can probably be constructed by hand ;)
  • 38. Whitebox • Most pentesters have their own dirty hacks and regexps for finding the vulns • I also use a simple grep wrapper, which allows to spot out security bottlenecks and obvious bugs in no time • Especially useful during CTF, when the source code is not that big • If integrated with IDE, can be rather cool semi-manual analyser
  • 39. Whitebox • Collect a list of dangerous sinks for various languages • Take a pattern for variable (like $.* in PHP) • Take a list of securing functions • Generate regexps with negative lookahead, which will search for patterns like this: danger_func(…not_a_securing_func(…$var
  • 40. Whitebox • Get the result like this • Parse it into any IDE and analyse traces
  • 41. Contents • Intro • Technical view • Algorithmic view • Whitebox • Outro
  • 42. Summary • Application testing can be made faster in many ways • Some of ways are achievable during manual assessment, some of them are not • We can build fast and scalable web application scanner for this • It will traverse pwning paths graph in an efficient way and halt after hitting the requests limit
  • 43. Results • Some of reviewed techniques are already implemented in reps on my GitHub (libpywebhack repository not updated for years): https://github.com/beched • It will be updated as soon as I finish debugging PoC scripts