Burp Suit Tips
Burp Suit Tips
http://www.irongeek.com/i.php?page=videos/web-application-pen-testing-tutorials-with-mutillidae
To do...
Overview
Data visualization
GUI navigation
Managing state
Common tasks
Intruder payloads
Mobile applications
Extensions
Macros
Overview
Data visualization
GUI navigation
Managing state
Common tasks
Intruder payloads
Mobile applications
Extensions
Macros
Data visualization
By default
Via extensions
Parameters
Parameters
XML
XML
AMF
AMF
ViewState
ViewState
Data visualization
By default
Via extensions
JSON
http://api.twitter.com/1/statuses/user_timeline.json
JSON
json.dumps(json.loads(msg), indent=4)
http://128nops.blogspot.com/2013/02/json-decoder.html
Javascript
Javascript
Both beautifier extensions use
libs from jsbeautifier.org
burp-suite-beautifier-extension
Uses Rhino to call Javascript from Java
http://code.google.com/p/burp-suite-beautifier-extension/
burp_jsbeautifier
Much cleaner, uses the Python library
https://github.com/Meatballs1/burp_jsbeautifier
Javascript
Protobuf
“Google Protocol Buffers”
https://code.google.com/p/protobuf/
Hotkeys
Personalized scans
Contextual buttons
RTFM
Restore defaults
Hotkeys
Hotkeys
Classic:
Ctrl+X|C|V for “Cut|Copy|Paste”
Decoding:
Ctrl+(Shift)+U|H|B for “URL|HTML|Base64 (de)code”
GUI navigation:
Ctrl+Shift+T|P|S|I|R for “Switching to ...”
Personal favorite:
Ctrl+G for "Issue Repeater request"
History auto-scroll
Custom payload lists
Some payload lists are shipped with Burp
Configurable from the Intruder menu
Magic combo:
Nikto
Burp
FuzzDB
DirBuster
Personalized scans
Define your own insertion points in Intruder
Then right-click and select “Actively scan ...”
Overview
Data visualization
GUI navigation
Managing state
Common tasks
Intruder payloads
Mobile applications
Extensions
Macros
Managing state
Automatic backups
https://github.com/faffi/curlit
Overview
Data visualization
GUI navigation
Managing state
Common tasks
Intruder payloads
Mobile applications
Extensions
Macros
Intruder payloads
HTTP Basic Authentication
Opaque data
Anti-CSRF tokens
Basic Auth
Basic Auth
Algorithm
Base64(username + “:” + password)
Blogs
My Sys Admin Cookbook: Use prefix/suffix
SecurityNinja: Use prefix/suffix
SecureState: Use prefix/suffix or precompiled lists
SANS: Use prefix/suffix or precompiled lists
Smeege Sec: Use an extension or precompiled lists
Basic Auth
Basic Auth
Use the “Custom Iterator” payload!
http://carnal0wnage.attackresearch.com/2009/08/using-burp-intruder-to-brute-force.html
http://www.smeegesec.com/2012/02/attacking-basic-authentication-with.html
http://sysadmincookbook.blogspot.fr/2013/01/test.html
http://www.securityninja.co.uk/hacking/burp-suite-tutorial-the-intruder-tool/
http://www.sans.org/reading_room/whitepapers/testing/fuzzing-approach-credentials-discovery-burp-intruder_33214
http://www.dailysecurity.net/2013/03/22/http-basic-authentication-dictionary-and-brute-force-attacks-with-burp-suite/
http://portswigger.net/burp/help/intruder_payloads_types.html#customiterator
Basic Auth
Howto
Opaque data
Anti-CSRF tokens
Opaque data
Opaque data
No cookie + long token + authenticated access?
Is the token
An anti-cache mechanism: OK
A session ID: not safe (logs, referrer)
Authentication data provided by the client
Checked server-side: OK
Not checked server-side: not safe
Opaque data
Anti-CSRF tokens
Anti CSRF tokens
Anti CSRF tokens
Anti CSRF tokens
Anti CSRF tokens
Recursive Grep to the rescue!
This payload type lets you extract each payload from the
response to the previous request in the attack.
The text that was extracted from the previous response in the
attack is used as the payload for the current request.
Anti CSRF tokens
Attack type: Pitchfork
Payload #1:
Location: Parameter “token”
Type: Recursive Grep
Initial value: A valid token
Regexp: name="token" value="(.*?)"/><br/>
Payload #2:
Location: Parameter “value”
Type: Numbers from 0 to 50
Anti CSRF tokens
Caveats
DEMOS?
Overview
Data visualization
GUI navigation
Managing state
Common tasks
Intruder payloads
Mobile applications
Extensions
Macros
Mobile applications
Traffic redirection
Burp CA certificate
http://www.agarri.fr/docs/JavaScriptInjector.py
As an user
As a developer
Resources
Repositories
http://www.burpextensions.com/Extensions/
https://github.com/Meatballs1/burp-extensions
Online documentation
http://portswigger.net/burp/help/extender.html
http://www.burpextensions.com/category/tutorials/
Forum
http://forum.portswigger.net/board/2/burp-extensions
Blog (+ samples)
http://blog.portswigger.net/search/label/burp%20extender
May be useful
Format specific
JSON, JS, Protobuf, AMF, Serialized Java, WSDL, WCF
External tools
Google hacks, nmap, sqlmap, w3af, curl
Misc
Custom Logger, Burp Notes, Proxy Color, Referrer Checker
My own
JavaScript Injector, HTTP Traceroute, DomXssRegexp
Detect reverse-proxies
Generate from WSDL
Take notes
Takes notes
As a developer
Choose your language
Quick reload
Debugging
Language
Java
Provides the best integration with Burp internals
Python
My personal choice
But Python != Jython
Ruby
Same drawbacks than Python
Python vs. Java API
Java API
ApplyMarkers(
IHttpRequestResponse httpRequestResponse,
java.util.List<int[]> requestMarkers,
java.util.List<int[]> responseMarkers)
Python code
markers = []
for n in non_overloapping:
markers.append(array.array('i', [offset + n[0], offset + n[1]]))
marked_message = self._callbacks.applyMarkers(message, None, markers)
Quick reload
Use Ctrl-Click to quickly reload an extension
Debugging
Custom Logger captures everything
http://blog.portswigger.net/2012/12/sample-burp-suite-extension-custom.html
Overview
Data visualization
GUI navigation
Managing state
Common tasks
Intruder payloads
Mobile applications
Extensions
Macros
Target & Goal
Target application requires authentication
Sessions are very short-lived
/logged.php
Display session info
Display & process the target form
Target value is between 1 and 100
Session lasts for 15 seconds
Debugging
Macros
DEMO?
Overview
Data visualization
GUI navigation
Managing state
Common tasks
Intruder payloads
Mobile applications
Extensions
Macros
That's all, folks!
@Agarri_FR
nicolas.gregoire@agarri.fr