Extending Burp With Python
Extending Burp With Python
Python
Defeating web application idiosyncrasies
with common-sense, Python and minimal
knowledge of Java GUIs
What is Burp?
Purpose of this Talk
• Quick tour of Burp APIs with examples to
show what can be achieved
class BurpExtender(IBurpExtender):
# required
def registerExtenderCallbacks(self, callbacks):
class CustomDecoderTab(IMessageEditorTab):
def __init__(self, extender, controller, editable):
...
def getTabCaption(self):
return "Custom Decoder"
Solution: new decoder/encoder
2. Use setMessage to display decode
Source: https://github.com/faffi/WebSphere-Portlet-State-Decoder
2. Problem: Signed requests
Application requires signature thats generated
client side.
examples
1. Seen in thick client apps as anti-tamper mechanism
2. AWS API calls are signed for authentication
http://rajasaur.blogspot.co.nz/2009/10/hmac-sha-signatures-using-python-for.html
headers = requestInfo.getHeaders()
newHeaders = list(headers) #it's a Java arraylist; get a python list
Solution: automate request signing
3. Append signature as HTTP Header
class PassiveScanIssue(IScanIssue):
...
def getIssueName(self):
return "Encoded IP Address Discovered in F5 Cookie Value"
...
def getIssueDetail(self):
msg = "The URL <b>" + str(self.findingurl) + "</b> sets the F5 load
balancer cookie <b>"
F5-BigIP Cookie Checker
Internal IP address
retrieved from encoded
cookie
Source: http://blog.secureideas.com/2013/08/burp-extension-for-f5-cookie-detection.html
Summary
1. Decode custom encoding/serialization
Use IMessageEditorTab interface to display decoded content