SlideShare a Scribd company logo
1 of 62
Download to read offline
Security testing at (large) scale
Claudio Criscione - @paradoxengine
Hollywood mode off
@paradoxengine - Hollywood mode off
Who is this guy on stage?
Claudio Criscione
@paradoxengine
Security Automation @ Google Zurich
Fundamentally a “web security guy”
2
@paradoxengine - Hollywood mode off
3
This talk is the first-hand account of what I
learnt in the last few years building
automation for web security testing at
Google: what worked, what did not .
I don’t claim silver bullets. If you implement
any of this and it works for you, let me know!
@paradoxengine - Hollywood mode off
How do you “solve security” at a scale?
4
@paradoxengine - Hollywood mode off
5
The Hollywood hacker
@paradoxengine - Hollywood mode off
Scale kills the hacker stars.
Google’s 30,000+ engineers
generate more than 30k
CLs/day, on a single-repo
codebase with 2 billion lines
of code and over 86 TBs.
Any of those CLs might
introduce security bugs.
6
@paradoxengine - Hollywood mode off
Can’t I just hire the problem away?
7
Problem 1
You can’t keep hiring
security people, but you
will (hopefully) keep
growing!
Problem 2
Hiring (competent)
security people is really
hard!
@paradoxengine - Hollywood mode off
8
API & Framework hardening
The great automation drive
???
Security testing
@paradoxengine - Hollywood mode off
Enter security testing tools
9
@paradoxengine - Hollywood mode off
So what’s the problem with that?
10
Most security tools are
by security people
for security people.
Remember the scale
issue?
Target:
At least one of these options has to be provided to define the
target(s)
-d DIRECT Connection string for direct database connection
-u URL, --url=URL Target URL (e.g. "http://www.site.com/vuln.php?id=1")
-l LOGFILE Parse target(s) from Burp or WebScarab proxy log file
-x SITEMAPURL Parse target(s) from remote sitemap(.xml) file
-m BULKFILE Scan multiple targets given in a textual file
-r REQUESTFILE Load HTTP request from a file
-g GOOGLEDORK Process Google dork results as target URLs
-c CONFIGFILE Load options from a configuration INI file
Request:
These options can be used to specify how to connect to the target URL
--method=METHOD Force usage of given HTTP method (e.g. PUT)
--data=DATA Data string to be sent through POST
--param-del=PARA.. Character used for splitting parameter values
--cookie=COOKIE HTTP Cookie header value
--cookie-del=COO.. Character used for splitting cookie values
--load-cookies=L.. File containing cookies in Netscape/wget format
--drop-set-cookie Ignore Set-Cookie header from response
--user-agent=AGENT HTTP User-Agent header value
--random-agent Use randomly selected HTTP User-Agent header value
--host=HOST HTTP Host header value
--referer=REFERER HTTP Referer header value
--headers=HEADERS Extra headers (e.g. "Accept-Language: frnETag: 123")
--auth-type=AUTH.. HTTP authentication type (Basic, Digest, NTLM or PKI)
--auth-cred=AUTH.. HTTP authentication credentials (name:password)
--auth-private=A.. HTTP authentication PEM private key file
--ignore-401 Ignore HTTP Error 401 (Unauthorized)
--proxy=PROXY Use a proxy to connect to the target URL
--proxy-cred=PRO.. Proxy authentication credentials (name:password)
--proxy-file=PRO.. Load proxy list from a file
--ignore-proxy Ignore system default proxy settings
--tor Use Tor anonymity network
--tor-port=TORPORT Set Tor proxy port other than default
--tor-type=TORTYPE Set Tor proxy type (HTTP (default), SOCKS4 or SOCKS5)
--check-tor Check to see if Tor is used properly
--delay=DELAY Delay in seconds between each HTTP request
--timeout=TIMEOUT Seconds to wait before timeout connection (default 30)
--retries=RETRIES Retries when the connection timeouts (default 3)
--randomize=RPARAM Randomly change value for given parameter(s)
--safe-url=SAFURL URL address to visit frequently during testing
--safe-freq=SAFREQ Test requests between two visits to a given safe URL
--skip-urlencode Skip URL encoding of payload data
--csrf-token=CSR.. Parameter used to hold anti-CSRF token
--csrf-url=CSRFURL URL address to visit to extract anti-CSRF token
--force-ssl Force usage of SSL/HTTPS
--hpp Use HTTP parameter pollution method
--eval=EVALCODE Evaluate provided Python code before the request (e.g.
"import hashlib;id2=hashlib.md5(id).hexdigest()")
Optimization:
These options can be used to optimize the performance of sqlmap
-o Turn on all optimization switches
--predict-output Predict common queries output
--keep-alive Use persistent HTTP(s) connections
--null-connection Retrieve page length without actual HTTP response body
--threads=THREADS Max number of concurrent HTTP(s) requests (default 1)
Injection:
These options can be used to specify which parameters to test for,
provide custom injection payloads and optional tampering scripts
-p TESTPARAMETER Testable parameter(s)
--skip=SKIP Skip testing for given parameter(s)
--dbms=DBMS Force back-end DBMS to this value
--dbms-cred=DBMS.. DBMS authentication credentials (user:password)
--os=OS Force back-end DBMS operating system to this value
--invalid-bignum Use big numbers for invalidating values
--invalid-logical Use logical operations for invalidating values
--invalid-string Use random strings for invalidating values
--no-cast Turn off payload casting mechanism
--no-escape Turn off string escaping mechanism
--prefix=PREFIX Injection payload prefix string
--suffix=SUFFIX Injection payload suffix string
--tamper=TAMPER Use given script(s) for tampering injection data
Detection:
These options can be used to customize the detection phase
--level=LEVEL Level of tests to perform (1-5, default 1)
--risk=RISK Risk of tests to perform (0-3, default 1)
--string=STRING String to match when query is evaluated to True
--not-string=NOT.. String to match when query is evaluated to False
--regexp=REGEXP Regexp to match when query is evaluated to True
--code=CODE HTTP code to match when query is evaluated to True
--text-only Compare pages based only on the textual content
--titles Compare pages based only on their titles
Techniques:
These options can be used to tweak testing of specific SQL injection
techniques
--technique=TECH SQL injection techniques to use (default "BEUSTQ")
--time-sec=TIMESEC Seconds to delay the DBMS response (default 5)
--union-cols=UCOLS Range of columns to test for UNION query SQL injection
--union-char=UCHAR Character to use for bruteforcing number of columns
--union-from=UFROM Table to use in FROM part of UNION query SQL injection
--dns-domain=DNS.. Domain name used for DNS exfiltration attack
--second-order=S.. Resulting page URL searched for second-order response
Fingerprint:
Enumeration:
These options can be used to enumerate the back-end database
management system information, structure and data contained in the
tables. Moreover you can run your own SQL statements
-a, --all Retrieve everything
-b, --banner Retrieve DBMS banner
--current-user Retrieve DBMS current user
--current-db Retrieve DBMS current database
--hostname Retrieve DBMS server hostname
--is-dba Detect if the DBMS current user is DBA
--users Enumerate DBMS users
--passwords Enumerate DBMS users password hashes
--privileges Enumerate DBMS users privileges
--roles Enumerate DBMS users roles
--dbs Enumerate DBMS databases
--tables Enumerate DBMS database tables
--columns Enumerate DBMS database table columns
--schema Enumerate DBMS schema
--count Retrieve number of entries for table(s)
--dump Dump DBMS database table entries
--dump-all Dump all DBMS databases tables entries
--search Search column(s), table(s) and/or database name(s)
--comments Retrieve DBMS comments
-D DB DBMS database to enumerate
-T TBL DBMS database table(s) to enumerate
-C COL DBMS database table column(s) to enumerate
-X EXCLUDECOL DBMS database table column(s) to not enumerate
-U USER DBMS user to enumerate
--exclude-sysdbs Exclude DBMS system databases when enumerating tables
--where=DUMPWHERE Use WHERE condition while table dumping
--start=LIMITSTART First query output entry to retrieve
--stop=LIMITSTOP Last query output entry to retrieve
--first=FIRSTCHAR First query output word character to retrieve
--last=LASTCHAR Last query output word character to retrieve
--sql-query=QUERY SQL statement to be executed
--sql-shell Prompt for an interactive SQL shell
--sql-file=SQLFILE Execute SQL statements from given file(s)
Brute force:
These options can be used to run brute force checks
--common-tables Check existence of common tables
--common-columns Check existence of common columns
User-defined function injection:
These options can be used to create custom user-defined functions
--udf-inject Inject custom user-defined functions
--shared-lib=SHLIB Local path of the shared library
File system access:
These options can be used to access the back-end database management
A simple case study:
Hunting for
mixed content
12
@paradoxengine - Hollywood mode off
What is mixed content
13
@paradoxengine - Hollywood mode off
What is mixed content
14
<script src=”http://developers.google.com…”/>
@paradoxengine - Hollywood mode off
What is mixed content
15
<script src=”http://developers.google.com…”/>
@paradoxengine - Hollywood mode off
Why is it hard to find it?
16
“Static” HTML: easy
<script src=”http://badidea.go…”/>
@paradoxengine - Hollywood mode off
Why is it hard to find it?
17
“Static” HTML: easy
<script src=”http://badidea.go…”/>
Dynamic, on-load JS: still OK
<script>
…
a = document.createElement('script');
a.src = “htt” + “p://badidea.go…”;
@paradoxengine - Hollywood mode off
Why is it hard to find it?
18
“Static” HTML: easy
<script src=”http://badidea.go…”/>
Dynamic, on-load JS: still OK
<script>
…
a = document.createElement('script');
a.src = “htt” + “p://badidea.go…”;
Interaction based events: good luck!
onclick = “runScriptThatLoadsHTTP”
@paradoxengine - Hollywood mode off
19
@paradoxengine - Hollywood mode off
If only we had some
automated procedures lying
around to interact
with large portions of our
applications.
20
@paradoxengine - Hollywood mode off
Enter Selenium WebDriver
“Selenium is a portable software-testing
framework for web applications”
21
The coverage goals of end to end
testing are in line with what we need.
@paradoxengine - Hollywood mode off
We have quite a few of them...
22
Google runs more than 150 million tests
every day, and 13.000+ projects are
continuously integrated.
That’s a lot of webdriver-based tests too.
@paradoxengine - Hollywood mode off
Identifying mixed content via HTTP proxy
23
HTTP Requests
By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=25925698
HTTP Responses
@paradoxengine - Hollywood mode off
Identifying mixed content via HTTP proxy
24
HTTP Requests
By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=25925698
HTTP Responses
@paradoxengine - Hollywood mode off
Identifying mixed content via HTTP proxy
25
HTTP Requests
By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=25925698
HTTP Responses
@paradoxengine - Hollywood mode off
Instrumenting webdriver tests
1. Add a proxy to the tests during setUp
2. Run the tests
26
*Recent webdriver code is likely to have a
different syntax.
MangoProxy mangoProxy = mangoBuilder.startProxy();
[...]
profile.setProxyPreferences(proxy)*;
A more complex example:
hunting cross site request forgery
(XSRF)
27
@paradoxengine - Hollywood mode off
What is XSRF?
28
Using cross-site request forgery (XSRF), a malicious
website can cause the victim's browser to make an
authenticated request to a state-changing URL on
another application, without the user's knowledge or
consent.
If the target application doesn't take additional steps
to confirm that the request is a result of a conscious
user action, it’s bad news for the user.
@paradoxengine - Hollywood mode off
How does it look like?
29
б а г
VOTE VOTE VOTE
Best letter of the universe 2019
62% 36% 42%
@paradoxengine - Hollywood mode off
How does it look like?
30
б а г
VOTE VOTE VOTE
Best letter of the universe 2019
62% 36% 42%
POST bestletter.ru/vote?letter=б
@paradoxengine - Hollywood mode off
How does it look like?
31
б а г
VOTE VOTE VOTE
Best letter of the universe 2019
62% 36% 42%
Totally Unrelated Page
The internet’s most unrelated
page, ever!
POST bestletter.ru/vote?letter=й
@paradoxengine - Hollywood mode off
How does it look like?
32
б а г
VOTE VOTE VOTE
Best letter of the universe 2019
62% 36% 42%
POST bestletter.ru/vote?letter=б&token=123
Totally Unrelated Page
The internet’s most unrelated
page, ever!
POST bestletter.ru/vote?letter=й
@paradoxengine - Hollywood mode off
Can we identify XSRF passively?
33
Build a list of token names, and check
for their presence in all POST request.
Entropy analysis to guess for token
values, headers, cookies...
@paradoxengine - Hollywood mode off
Can we identify XSRF passively?
34
Many false negative conditions
e.g. client adds token, server does not
check
Build a list of token names, and check
for their presence in all POST request.
Entropy analysis to guess for token
values, headers, cookies...
@paradoxengine - Hollywood mode off
Can we identify XSRF passively?
35
Many false negative conditions
e.g. client adds token, server does not
check
Build a list of token names, and check
for their presence in all POST request.
Entropy analysis to guess for token
values, headers, cookies...
Execution after redirect
<?php
if (!$token) {
http_response_code(403);
}
doSomething()
@paradoxengine - Hollywood mode off
Can we identify XSRF passively?
36
Many false negative conditions
e.g. client adds token, server does not
check
Build a list of token names, and check
for their presence in all POST request.
Entropy analysis to guess for token
values, headers, cookies...
Even more false positives
e.g. miss token
@paradoxengine - Hollywood mode off
Can we identify XSRF passively?
37
Many false negative conditions
e.g. client adds token, server does not
check
Build a list of token names, and check
for their presence in all POST request.
Entropy analysis to guess for token
values, headers, cookies...
Even more false positives
e.g. miss token
What’s the deal with false positives?
Can’t you just report “potential bugs” and
sort them out later? It’s surely better than
not knowing!
@paradoxengine - Hollywood mode off
38
Actively damaging
Erode trust
Prevent automation
False positives
@paradoxengine - Hollywood mode off
39
Always focus on low false
positives, even at the cost of false
negatives.
In the XSRF case: liberally over-flag
tokens.
@paradoxengine - Hollywood mode off
40
POST /vote?letter=б&token=XA...
POST /vote?letter=б
Repeat requests dropping tokens
Still flags irrelevant changes (false
positives) and misses real bugs :-(
@paradoxengine - Hollywood mode off
Mutation testing to the rescue
41
POST /vote?letter=б&token=XA...
POST /vote?letter=б
1. X% chance of mutating seemingly
XSRF-Protected request, dropping XSRF token
2. Only mutate one request per test run
3. Flag cases where the mutated test still passes
42
How do you communicate bugs?
43
-
Out of band
Need to collect a wealth of
metadata (CL, test run etc)
to make the finding
reproducible.
@paradoxengine - Hollywood mode off
Failing tests when security issues are found
1. Add a proxy to the tests during setUp
2. Run the tests.
3. Query Mango as part of teardown.
4. Mark the test as failure and surface the failure as you would any other:
block release, fail the integration, turn on the red lights.
44
if (mangoProxy.foundBugs())
fail(“Security issues found: ” + trace);
@paradoxengine - Hollywood mode off
45
Promote existing tests
to find security bugs.
Produce actionable,
useful results.
Where’s the catch?
46
@paradoxengine - Hollywood mode off
Test vs Prod environment
Security tests have different
requirements than integration tests.
Subtle differences have a large impact.
Why would you have SSL certs in QA?
Why would you enable XSRF checks in QA?
47
@paradoxengine - Hollywood mode off
Test vs Prod environment
Security tests have different
requirements than integration tests.
Subtle differences have a large impact.
Why would you have SSL certs in QA?
Why would you enable XSRF checks in QA?
48
Consider (re)running instrumented integration tests
against prod (!!).
@paradoxengine - Hollywood mode off
Tests take horrible shortcuts
49
@paradoxengine - Hollywood mode off
Brittle tests
50
Can turn brittle tests into flaky
● Increases latency
● Reorders some requests
● Changes states on request replay
@paradoxengine - Hollywood mode off
A moving target
Even though the integration
is easy, our engineers seem
to like changing stuff!
Ever changing test
frameworks required work to
keep integration.
51
@paradoxengine - Hollywood mode off
Did passive* test instrumentation work?
Almost.
It found a few* bugs.
We realized the cake really is a lie,
and moved aggressively to “self service”.
52
@paradoxengine - Hollywood mode off
53
Don’t scale the
security team, scale
the security
capabilities of others.
@paradoxengine - Hollywood mode off
54
Self service challenges
Simplicity Integration
@paradoxengine - Hollywood mode off
55
Self service challenges
Simplicity Integration
Simplicity
Setup time needs to be under the attention threshold.
drive usage
Results need to be self explanatory.
drive remediation
@paradoxengine - Hollywood mode off
56
Self service challenges
Simplicity Integration
Integration
Tools should be part of the testing pipeline.
security_scan(
name = "test scan",
targets = [“http://site-daily.qa.site”],
max_qps = 50
)
@paradoxengine - Hollywood mode off
Did all of this work?
We identified more than 1500 security
issues with our self-service approach.
For reference, our Vulnerability Reward
Program awarded 1000+ rewards in 2016.
Since we like a good challenge, we are now
competing in the VRP ladder.
We’ll see how we do in 2017!
57
Things I learnt
Wake up now!
58
@paradoxengine - Hollywood mode off
59
Involve and empower teams
Unless you can clone security engineers
@paradoxengine - Hollywood mode off
60
Focus on
achievable targets
Go deep, not wide
@paradoxengine - Hollywood mode off
61
Security is not
the grinch
We just find
different types
of bugs
Thank you!
Questions?
Security testing at scale
Claudio Criscione - @paradoxengine
62

More Related Content

What's hot

9 password security
9   password security9   password security
9 password securitydrewz lin
 
Intrigue Core: Scaling Assessment Automation
Intrigue Core: Scaling Assessment AutomationIntrigue Core: Scaling Assessment Automation
Intrigue Core: Scaling Assessment AutomationJonathan Cran
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Jen Andre
 
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ..."Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...PROIDEA
 
Ricon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak PipeRicon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak PipeSusan Potter
 
Think Like a Hacker - Database Attack Vectors
Think Like a Hacker - Database Attack VectorsThink Like a Hacker - Database Attack Vectors
Think Like a Hacker - Database Attack VectorsMark Ginnebaugh
 
Preventing Data Breaches: How to Tighten Your Security Stance
Preventing Data Breaches: How to Tighten Your Security StancePreventing Data Breaches: How to Tighten Your Security Stance
Preventing Data Breaches: How to Tighten Your Security StanceSara Goodison
 
21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. Flink21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. FlinkComsysto Reply GmbH
 
Базы данных. ZooKeeper
Базы данных. ZooKeeperБазы данных. ZooKeeper
Базы данных. ZooKeeperVadim Tsesko
 
Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...
Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...
Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...RootedCON
 
The Anatomy of an Exploit
The Anatomy of an ExploitThe Anatomy of an Exploit
The Anatomy of an ExploitPatricia Aas
 
HTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC EditionHTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC EditionXavier Mertens
 
Attacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit FrameworkAttacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit FrameworkChris Gates
 
JWT: jku x5u
JWT: jku x5uJWT: jku x5u
JWT: jku x5usnyff
 
The Anatomy of an Exploit (NDC TechTown 2019))
The Anatomy of an Exploit (NDC TechTown 2019))The Anatomy of an Exploit (NDC TechTown 2019))
The Anatomy of an Exploit (NDC TechTown 2019))Patricia Aas
 
Secure password - CYBER SECURITY
Secure password - CYBER SECURITYSecure password - CYBER SECURITY
Secure password - CYBER SECURITYSupanShah2
 
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)Ontico
 

What's hot (20)

9 password security
9   password security9   password security
9 password security
 
Intrigue Core: Scaling Assessment Automation
Intrigue Core: Scaling Assessment AutomationIntrigue Core: Scaling Assessment Automation
Intrigue Core: Scaling Assessment Automation
 
Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'Codetainer: a Docker-based browser code 'sandbox'
Codetainer: a Docker-based browser code 'sandbox'
 
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ..."Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
"Revenge of The Script Kiddies: Current Day Uses of Automated Scripts by Top ...
 
Python Cryptography & Security
Python Cryptography & SecurityPython Cryptography & Security
Python Cryptography & Security
 
Ricon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak PipeRicon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak Pipe
 
Think Like a Hacker - Database Attack Vectors
Think Like a Hacker - Database Attack VectorsThink Like a Hacker - Database Attack Vectors
Think Like a Hacker - Database Attack Vectors
 
Preventing Data Breaches: How to Tighten Your Security Stance
Preventing Data Breaches: How to Tighten Your Security StancePreventing Data Breaches: How to Tighten Your Security Stance
Preventing Data Breaches: How to Tighten Your Security Stance
 
21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. Flink21.04.2016 Meetup: Spark vs. Flink
21.04.2016 Meetup: Spark vs. Flink
 
Базы данных. ZooKeeper
Базы данных. ZooKeeperБазы данных. ZooKeeper
Базы данных. ZooKeeper
 
Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...
Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...
Daniel Kachakil - Android's Download Provider: Discovering and exploiting thr...
 
The Anatomy of an Exploit
The Anatomy of an ExploitThe Anatomy of an Exploit
The Anatomy of an Exploit
 
HTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC EditionHTTP For the Good or the Bad - FSEC Edition
HTTP For the Good or the Bad - FSEC Edition
 
Attacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit FrameworkAttacking Oracle with the Metasploit Framework
Attacking Oracle with the Metasploit Framework
 
JWT: jku x5u
JWT: jku x5uJWT: jku x5u
JWT: jku x5u
 
Pycon - Python for ethical hackers
Pycon - Python for ethical hackers Pycon - Python for ethical hackers
Pycon - Python for ethical hackers
 
Python build your security tools.pdf
Python build your security tools.pdfPython build your security tools.pdf
Python build your security tools.pdf
 
The Anatomy of an Exploit (NDC TechTown 2019))
The Anatomy of an Exploit (NDC TechTown 2019))The Anatomy of an Exploit (NDC TechTown 2019))
The Anatomy of an Exploit (NDC TechTown 2019))
 
Secure password - CYBER SECURITY
Secure password - CYBER SECURITYSecure password - CYBER SECURITY
Secure password - CYBER SECURITY
 
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
Внедрение SDLC в боевых условиях / Егор Карбутов (Digital Security)
 

Similar to Hollywood mode off: security testing at scale

SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads UpMindfire Solutions
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Matt Fuller
 
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014Amazon Web Services
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules RestructuredDoiT International
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructuredAmi Mahloof
 
Python (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network AutomationPython (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network AutomationRick Sherman
 
Percona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialPercona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialAntonios Giannopoulos
 
Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4Ilya Haykinson
 
IR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdfIR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdfRahulRoy130127
 
Elastic101tutorial Percona Live Europe 2018
Elastic101tutorial Percona Live Europe 2018Elastic101tutorial Percona Live Europe 2018
Elastic101tutorial Percona Live Europe 2018Alex Cercel
 
Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018 Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018 Antonios Giannopoulos
 
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by ScyllaScylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by ScyllaScyllaDB
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake TutorialFu Haiping
 

Similar to Hollywood mode off: security testing at scale (20)

Advanced Sqoop
Advanced Sqoop Advanced Sqoop
Advanced Sqoop
 
SQLMAP Tool Usage - A Heads Up
SQLMAP Tool Usage - A  Heads UpSQLMAP Tool Usage - A  Heads Up
SQLMAP Tool Usage - A Heads Up
 
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
Presto Testing Tools: Benchto & Tempto (Presto Boston Meetup 10062015)
 
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
(SDD402) Amazon ElastiCache Deep Dive | AWS re:Invent 2014
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 
Sqlmap
SqlmapSqlmap
Sqlmap
 
Suricata
SuricataSuricata
Suricata
 
Hibernate java and_oracle
Hibernate java and_oracleHibernate java and_oracle
Hibernate java and_oracle
 
Python (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network AutomationPython (Jinja2) Templates for Network Automation
Python (Jinja2) Templates for Network Automation
 
Percona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorialPercona Live 2017 ­- Sharded cluster tutorial
Percona Live 2017 ­- Sharded cluster tutorial
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
Perl Programming - 04 Programming Database
Perl Programming - 04 Programming DatabasePerl Programming - 04 Programming Database
Perl Programming - 04 Programming Database
 
Deploying Machine Learning Models to Production
Deploying Machine Learning Models to ProductionDeploying Machine Learning Models to Production
Deploying Machine Learning Models to Production
 
Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4Why and How Powershell will rule the Command Line - Barcamp LA 4
Why and How Powershell will rule the Command Line - Barcamp LA 4
 
IR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdfIR Journal (itscholar.codegency.co.in).pdf
IR Journal (itscholar.codegency.co.in).pdf
 
Elastic101tutorial Percona Live Europe 2018
Elastic101tutorial Percona Live Europe 2018Elastic101tutorial Percona Live Europe 2018
Elastic101tutorial Percona Live Europe 2018
 
Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018 Elastic 101 tutorial - Percona Europe 2018
Elastic 101 tutorial - Percona Europe 2018
 
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by ScyllaScylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
 

More from Claudio Criscione

HackInBo2018 - Security @ Hyperscale
HackInBo2018 - Security @ HyperscaleHackInBo2018 - Security @ Hyperscale
HackInBo2018 - Security @ HyperscaleClaudio Criscione
 
Virtually Pwned: Hacking VMware [ITA - SMAU10]
Virtually Pwned: Hacking VMware [ITA - SMAU10]Virtually Pwned: Hacking VMware [ITA - SMAU10]
Virtually Pwned: Hacking VMware [ITA - SMAU10]Claudio Criscione
 
Sicurezza della virtualizzazione - SMAU 2009
Sicurezza della virtualizzazione - SMAU 2009Sicurezza della virtualizzazione - SMAU 2009
Sicurezza della virtualizzazione - SMAU 2009Claudio Criscione
 
The Good The Bad The Virtual
The Good The Bad The VirtualThe Good The Bad The Virtual
The Good The Bad The VirtualClaudio Criscione
 
Introduzione alla computer forensic - acquisizione
Introduzione alla computer forensic - acquisizioneIntroduzione alla computer forensic - acquisizione
Introduzione alla computer forensic - acquisizioneClaudio Criscione
 
[Confidence0902] The Glass Cage - Virtualization Security
[Confidence0902] The Glass Cage - Virtualization Security[Confidence0902] The Glass Cage - Virtualization Security
[Confidence0902] The Glass Cage - Virtualization SecurityClaudio Criscione
 

More from Claudio Criscione (8)

HackInBo2018 - Security @ Hyperscale
HackInBo2018 - Security @ HyperscaleHackInBo2018 - Security @ Hyperscale
HackInBo2018 - Security @ Hyperscale
 
Virtually Pwned: Hacking VMware [ITA - SMAU10]
Virtually Pwned: Hacking VMware [ITA - SMAU10]Virtually Pwned: Hacking VMware [ITA - SMAU10]
Virtually Pwned: Hacking VMware [ITA - SMAU10]
 
Virtually Pwned
Virtually PwnedVirtually Pwned
Virtually Pwned
 
Standing on the clouds
Standing on the cloudsStanding on the clouds
Standing on the clouds
 
Sicurezza della virtualizzazione - SMAU 2009
Sicurezza della virtualizzazione - SMAU 2009Sicurezza della virtualizzazione - SMAU 2009
Sicurezza della virtualizzazione - SMAU 2009
 
The Good The Bad The Virtual
The Good The Bad The VirtualThe Good The Bad The Virtual
The Good The Bad The Virtual
 
Introduzione alla computer forensic - acquisizione
Introduzione alla computer forensic - acquisizioneIntroduzione alla computer forensic - acquisizione
Introduzione alla computer forensic - acquisizione
 
[Confidence0902] The Glass Cage - Virtualization Security
[Confidence0902] The Glass Cage - Virtualization Security[Confidence0902] The Glass Cage - Virtualization Security
[Confidence0902] The Glass Cage - Virtualization Security
 

Recently uploaded

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 

Recently uploaded (20)

Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 

Hollywood mode off: security testing at scale

  • 1. Security testing at (large) scale Claudio Criscione - @paradoxengine Hollywood mode off
  • 2. @paradoxengine - Hollywood mode off Who is this guy on stage? Claudio Criscione @paradoxengine Security Automation @ Google Zurich Fundamentally a “web security guy” 2
  • 3. @paradoxengine - Hollywood mode off 3 This talk is the first-hand account of what I learnt in the last few years building automation for web security testing at Google: what worked, what did not . I don’t claim silver bullets. If you implement any of this and it works for you, let me know!
  • 4. @paradoxengine - Hollywood mode off How do you “solve security” at a scale? 4
  • 5. @paradoxengine - Hollywood mode off 5 The Hollywood hacker
  • 6. @paradoxengine - Hollywood mode off Scale kills the hacker stars. Google’s 30,000+ engineers generate more than 30k CLs/day, on a single-repo codebase with 2 billion lines of code and over 86 TBs. Any of those CLs might introduce security bugs. 6
  • 7. @paradoxengine - Hollywood mode off Can’t I just hire the problem away? 7 Problem 1 You can’t keep hiring security people, but you will (hopefully) keep growing! Problem 2 Hiring (competent) security people is really hard!
  • 8. @paradoxengine - Hollywood mode off 8 API & Framework hardening The great automation drive ??? Security testing
  • 9. @paradoxengine - Hollywood mode off Enter security testing tools 9
  • 10. @paradoxengine - Hollywood mode off So what’s the problem with that? 10 Most security tools are by security people for security people. Remember the scale issue?
  • 11. Target: At least one of these options has to be provided to define the target(s) -d DIRECT Connection string for direct database connection -u URL, --url=URL Target URL (e.g. "http://www.site.com/vuln.php?id=1") -l LOGFILE Parse target(s) from Burp or WebScarab proxy log file -x SITEMAPURL Parse target(s) from remote sitemap(.xml) file -m BULKFILE Scan multiple targets given in a textual file -r REQUESTFILE Load HTTP request from a file -g GOOGLEDORK Process Google dork results as target URLs -c CONFIGFILE Load options from a configuration INI file Request: These options can be used to specify how to connect to the target URL --method=METHOD Force usage of given HTTP method (e.g. PUT) --data=DATA Data string to be sent through POST --param-del=PARA.. Character used for splitting parameter values --cookie=COOKIE HTTP Cookie header value --cookie-del=COO.. Character used for splitting cookie values --load-cookies=L.. File containing cookies in Netscape/wget format --drop-set-cookie Ignore Set-Cookie header from response --user-agent=AGENT HTTP User-Agent header value --random-agent Use randomly selected HTTP User-Agent header value --host=HOST HTTP Host header value --referer=REFERER HTTP Referer header value --headers=HEADERS Extra headers (e.g. "Accept-Language: frnETag: 123") --auth-type=AUTH.. HTTP authentication type (Basic, Digest, NTLM or PKI) --auth-cred=AUTH.. HTTP authentication credentials (name:password) --auth-private=A.. HTTP authentication PEM private key file --ignore-401 Ignore HTTP Error 401 (Unauthorized) --proxy=PROXY Use a proxy to connect to the target URL --proxy-cred=PRO.. Proxy authentication credentials (name:password) --proxy-file=PRO.. Load proxy list from a file --ignore-proxy Ignore system default proxy settings --tor Use Tor anonymity network --tor-port=TORPORT Set Tor proxy port other than default --tor-type=TORTYPE Set Tor proxy type (HTTP (default), SOCKS4 or SOCKS5) --check-tor Check to see if Tor is used properly --delay=DELAY Delay in seconds between each HTTP request --timeout=TIMEOUT Seconds to wait before timeout connection (default 30) --retries=RETRIES Retries when the connection timeouts (default 3) --randomize=RPARAM Randomly change value for given parameter(s) --safe-url=SAFURL URL address to visit frequently during testing --safe-freq=SAFREQ Test requests between two visits to a given safe URL --skip-urlencode Skip URL encoding of payload data --csrf-token=CSR.. Parameter used to hold anti-CSRF token --csrf-url=CSRFURL URL address to visit to extract anti-CSRF token --force-ssl Force usage of SSL/HTTPS --hpp Use HTTP parameter pollution method --eval=EVALCODE Evaluate provided Python code before the request (e.g. "import hashlib;id2=hashlib.md5(id).hexdigest()") Optimization: These options can be used to optimize the performance of sqlmap -o Turn on all optimization switches --predict-output Predict common queries output --keep-alive Use persistent HTTP(s) connections --null-connection Retrieve page length without actual HTTP response body --threads=THREADS Max number of concurrent HTTP(s) requests (default 1) Injection: These options can be used to specify which parameters to test for, provide custom injection payloads and optional tampering scripts -p TESTPARAMETER Testable parameter(s) --skip=SKIP Skip testing for given parameter(s) --dbms=DBMS Force back-end DBMS to this value --dbms-cred=DBMS.. DBMS authentication credentials (user:password) --os=OS Force back-end DBMS operating system to this value --invalid-bignum Use big numbers for invalidating values --invalid-logical Use logical operations for invalidating values --invalid-string Use random strings for invalidating values --no-cast Turn off payload casting mechanism --no-escape Turn off string escaping mechanism --prefix=PREFIX Injection payload prefix string --suffix=SUFFIX Injection payload suffix string --tamper=TAMPER Use given script(s) for tampering injection data Detection: These options can be used to customize the detection phase --level=LEVEL Level of tests to perform (1-5, default 1) --risk=RISK Risk of tests to perform (0-3, default 1) --string=STRING String to match when query is evaluated to True --not-string=NOT.. String to match when query is evaluated to False --regexp=REGEXP Regexp to match when query is evaluated to True --code=CODE HTTP code to match when query is evaluated to True --text-only Compare pages based only on the textual content --titles Compare pages based only on their titles Techniques: These options can be used to tweak testing of specific SQL injection techniques --technique=TECH SQL injection techniques to use (default "BEUSTQ") --time-sec=TIMESEC Seconds to delay the DBMS response (default 5) --union-cols=UCOLS Range of columns to test for UNION query SQL injection --union-char=UCHAR Character to use for bruteforcing number of columns --union-from=UFROM Table to use in FROM part of UNION query SQL injection --dns-domain=DNS.. Domain name used for DNS exfiltration attack --second-order=S.. Resulting page URL searched for second-order response Fingerprint: Enumeration: These options can be used to enumerate the back-end database management system information, structure and data contained in the tables. Moreover you can run your own SQL statements -a, --all Retrieve everything -b, --banner Retrieve DBMS banner --current-user Retrieve DBMS current user --current-db Retrieve DBMS current database --hostname Retrieve DBMS server hostname --is-dba Detect if the DBMS current user is DBA --users Enumerate DBMS users --passwords Enumerate DBMS users password hashes --privileges Enumerate DBMS users privileges --roles Enumerate DBMS users roles --dbs Enumerate DBMS databases --tables Enumerate DBMS database tables --columns Enumerate DBMS database table columns --schema Enumerate DBMS schema --count Retrieve number of entries for table(s) --dump Dump DBMS database table entries --dump-all Dump all DBMS databases tables entries --search Search column(s), table(s) and/or database name(s) --comments Retrieve DBMS comments -D DB DBMS database to enumerate -T TBL DBMS database table(s) to enumerate -C COL DBMS database table column(s) to enumerate -X EXCLUDECOL DBMS database table column(s) to not enumerate -U USER DBMS user to enumerate --exclude-sysdbs Exclude DBMS system databases when enumerating tables --where=DUMPWHERE Use WHERE condition while table dumping --start=LIMITSTART First query output entry to retrieve --stop=LIMITSTOP Last query output entry to retrieve --first=FIRSTCHAR First query output word character to retrieve --last=LASTCHAR Last query output word character to retrieve --sql-query=QUERY SQL statement to be executed --sql-shell Prompt for an interactive SQL shell --sql-file=SQLFILE Execute SQL statements from given file(s) Brute force: These options can be used to run brute force checks --common-tables Check existence of common tables --common-columns Check existence of common columns User-defined function injection: These options can be used to create custom user-defined functions --udf-inject Inject custom user-defined functions --shared-lib=SHLIB Local path of the shared library File system access: These options can be used to access the back-end database management
  • 12. A simple case study: Hunting for mixed content 12
  • 13. @paradoxengine - Hollywood mode off What is mixed content 13
  • 14. @paradoxengine - Hollywood mode off What is mixed content 14 <script src=”http://developers.google.com…”/>
  • 15. @paradoxengine - Hollywood mode off What is mixed content 15 <script src=”http://developers.google.com…”/>
  • 16. @paradoxengine - Hollywood mode off Why is it hard to find it? 16 “Static” HTML: easy <script src=”http://badidea.go…”/>
  • 17. @paradoxengine - Hollywood mode off Why is it hard to find it? 17 “Static” HTML: easy <script src=”http://badidea.go…”/> Dynamic, on-load JS: still OK <script> … a = document.createElement('script'); a.src = “htt” + “p://badidea.go…”;
  • 18. @paradoxengine - Hollywood mode off Why is it hard to find it? 18 “Static” HTML: easy <script src=”http://badidea.go…”/> Dynamic, on-load JS: still OK <script> … a = document.createElement('script'); a.src = “htt” + “p://badidea.go…”; Interaction based events: good luck! onclick = “runScriptThatLoadsHTTP”
  • 20. @paradoxengine - Hollywood mode off If only we had some automated procedures lying around to interact with large portions of our applications. 20
  • 21. @paradoxengine - Hollywood mode off Enter Selenium WebDriver “Selenium is a portable software-testing framework for web applications” 21 The coverage goals of end to end testing are in line with what we need.
  • 22. @paradoxengine - Hollywood mode off We have quite a few of them... 22 Google runs more than 150 million tests every day, and 13.000+ projects are continuously integrated. That’s a lot of webdriver-based tests too.
  • 23. @paradoxengine - Hollywood mode off Identifying mixed content via HTTP proxy 23 HTTP Requests By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=25925698 HTTP Responses
  • 24. @paradoxengine - Hollywood mode off Identifying mixed content via HTTP proxy 24 HTTP Requests By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=25925698 HTTP Responses
  • 25. @paradoxengine - Hollywood mode off Identifying mixed content via HTTP proxy 25 HTTP Requests By Source, Fair use, https://en.wikipedia.org/w/index.php?curid=25925698 HTTP Responses
  • 26. @paradoxengine - Hollywood mode off Instrumenting webdriver tests 1. Add a proxy to the tests during setUp 2. Run the tests 26 *Recent webdriver code is likely to have a different syntax. MangoProxy mangoProxy = mangoBuilder.startProxy(); [...] profile.setProxyPreferences(proxy)*;
  • 27. A more complex example: hunting cross site request forgery (XSRF) 27
  • 28. @paradoxengine - Hollywood mode off What is XSRF? 28 Using cross-site request forgery (XSRF), a malicious website can cause the victim's browser to make an authenticated request to a state-changing URL on another application, without the user's knowledge or consent. If the target application doesn't take additional steps to confirm that the request is a result of a conscious user action, it’s bad news for the user.
  • 29. @paradoxengine - Hollywood mode off How does it look like? 29 б а г VOTE VOTE VOTE Best letter of the universe 2019 62% 36% 42%
  • 30. @paradoxengine - Hollywood mode off How does it look like? 30 б а г VOTE VOTE VOTE Best letter of the universe 2019 62% 36% 42% POST bestletter.ru/vote?letter=б
  • 31. @paradoxengine - Hollywood mode off How does it look like? 31 б а г VOTE VOTE VOTE Best letter of the universe 2019 62% 36% 42% Totally Unrelated Page The internet’s most unrelated page, ever! POST bestletter.ru/vote?letter=й
  • 32. @paradoxengine - Hollywood mode off How does it look like? 32 б а г VOTE VOTE VOTE Best letter of the universe 2019 62% 36% 42% POST bestletter.ru/vote?letter=б&token=123 Totally Unrelated Page The internet’s most unrelated page, ever! POST bestletter.ru/vote?letter=й
  • 33. @paradoxengine - Hollywood mode off Can we identify XSRF passively? 33 Build a list of token names, and check for their presence in all POST request. Entropy analysis to guess for token values, headers, cookies...
  • 34. @paradoxengine - Hollywood mode off Can we identify XSRF passively? 34 Many false negative conditions e.g. client adds token, server does not check Build a list of token names, and check for their presence in all POST request. Entropy analysis to guess for token values, headers, cookies...
  • 35. @paradoxengine - Hollywood mode off Can we identify XSRF passively? 35 Many false negative conditions e.g. client adds token, server does not check Build a list of token names, and check for their presence in all POST request. Entropy analysis to guess for token values, headers, cookies... Execution after redirect <?php if (!$token) { http_response_code(403); } doSomething()
  • 36. @paradoxengine - Hollywood mode off Can we identify XSRF passively? 36 Many false negative conditions e.g. client adds token, server does not check Build a list of token names, and check for their presence in all POST request. Entropy analysis to guess for token values, headers, cookies... Even more false positives e.g. miss token
  • 37. @paradoxengine - Hollywood mode off Can we identify XSRF passively? 37 Many false negative conditions e.g. client adds token, server does not check Build a list of token names, and check for their presence in all POST request. Entropy analysis to guess for token values, headers, cookies... Even more false positives e.g. miss token What’s the deal with false positives? Can’t you just report “potential bugs” and sort them out later? It’s surely better than not knowing!
  • 38. @paradoxengine - Hollywood mode off 38 Actively damaging Erode trust Prevent automation False positives
  • 39. @paradoxengine - Hollywood mode off 39 Always focus on low false positives, even at the cost of false negatives. In the XSRF case: liberally over-flag tokens.
  • 40. @paradoxengine - Hollywood mode off 40 POST /vote?letter=б&token=XA... POST /vote?letter=б Repeat requests dropping tokens Still flags irrelevant changes (false positives) and misses real bugs :-(
  • 41. @paradoxengine - Hollywood mode off Mutation testing to the rescue 41 POST /vote?letter=б&token=XA... POST /vote?letter=б 1. X% chance of mutating seemingly XSRF-Protected request, dropping XSRF token 2. Only mutate one request per test run 3. Flag cases where the mutated test still passes
  • 42. 42 How do you communicate bugs?
  • 43. 43 - Out of band Need to collect a wealth of metadata (CL, test run etc) to make the finding reproducible.
  • 44. @paradoxengine - Hollywood mode off Failing tests when security issues are found 1. Add a proxy to the tests during setUp 2. Run the tests. 3. Query Mango as part of teardown. 4. Mark the test as failure and surface the failure as you would any other: block release, fail the integration, turn on the red lights. 44 if (mangoProxy.foundBugs()) fail(“Security issues found: ” + trace);
  • 45. @paradoxengine - Hollywood mode off 45 Promote existing tests to find security bugs. Produce actionable, useful results.
  • 47. @paradoxengine - Hollywood mode off Test vs Prod environment Security tests have different requirements than integration tests. Subtle differences have a large impact. Why would you have SSL certs in QA? Why would you enable XSRF checks in QA? 47
  • 48. @paradoxengine - Hollywood mode off Test vs Prod environment Security tests have different requirements than integration tests. Subtle differences have a large impact. Why would you have SSL certs in QA? Why would you enable XSRF checks in QA? 48 Consider (re)running instrumented integration tests against prod (!!).
  • 49. @paradoxengine - Hollywood mode off Tests take horrible shortcuts 49
  • 50. @paradoxengine - Hollywood mode off Brittle tests 50 Can turn brittle tests into flaky ● Increases latency ● Reorders some requests ● Changes states on request replay
  • 51. @paradoxengine - Hollywood mode off A moving target Even though the integration is easy, our engineers seem to like changing stuff! Ever changing test frameworks required work to keep integration. 51
  • 52. @paradoxengine - Hollywood mode off Did passive* test instrumentation work? Almost. It found a few* bugs. We realized the cake really is a lie, and moved aggressively to “self service”. 52
  • 53. @paradoxengine - Hollywood mode off 53 Don’t scale the security team, scale the security capabilities of others.
  • 54. @paradoxengine - Hollywood mode off 54 Self service challenges Simplicity Integration
  • 55. @paradoxengine - Hollywood mode off 55 Self service challenges Simplicity Integration Simplicity Setup time needs to be under the attention threshold. drive usage Results need to be self explanatory. drive remediation
  • 56. @paradoxengine - Hollywood mode off 56 Self service challenges Simplicity Integration Integration Tools should be part of the testing pipeline. security_scan( name = "test scan", targets = [“http://site-daily.qa.site”], max_qps = 50 )
  • 57. @paradoxengine - Hollywood mode off Did all of this work? We identified more than 1500 security issues with our self-service approach. For reference, our Vulnerability Reward Program awarded 1000+ rewards in 2016. Since we like a good challenge, we are now competing in the VRP ladder. We’ll see how we do in 2017! 57
  • 58. Things I learnt Wake up now! 58
  • 59. @paradoxengine - Hollywood mode off 59 Involve and empower teams Unless you can clone security engineers
  • 60. @paradoxengine - Hollywood mode off 60 Focus on achievable targets Go deep, not wide
  • 61. @paradoxengine - Hollywood mode off 61 Security is not the grinch We just find different types of bugs
  • 62. Thank you! Questions? Security testing at scale Claudio Criscione - @paradoxengine 62