9
Mocking HTTP APIs With Burp 2019-11-08 Shea Polansky https://polansky.co @0x5ca1e5 Shea Polansky

Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Mocking HTTP APIs With Burp

2019-11-08Shea Polanskyhttps://polansky.co@0x5ca1e5

Shea Polansky

Page 2: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Motivation

• Simple HTTP Response Mocking– "isAdmin": false → "isAdmin": true

• Complex Application Manipulation– When built-in regex rules won’t cut it

Page 3: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Example Use Case: DRM BypassGET /api/license?uid=<…>

{"license":

base64

"signatures":

,

{"cert": "…","CA": "…","signature":

}

base64

{"uid": <…>, "user": "…", "expiration": "…", …

}

base64

, …<pkcs7 signature data>base64

}

Page 4: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Example Use Case: DRM Bypass

• This protocol is wack• App requires response in <2s• Want other calls to go through as normal• Normally would have to write a custom Burp

plugin• With this, just need a quick python script!

Page 5: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Burp HTTP Mock Extension

• Originally by Michal Dardas• I added dynamic mocking• Matches requests by regex, either lets

through or transparently redirects to static/dynamic mock

Page 6: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Demo!

Page 7: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Demo!

Page 8: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Installation

• In the BApp Store– Search “HTTP Mock”

• From my GitHub– Slightly faster updates– https://github.com/ise-spolansky/BurpHttpMock

Page 9: Mocking HTTP APIs With Burp - Shea Polansky · Burp Intruder Repeater Window Help Repeater Options URL Burp Suite Community Edition v1.7.35 - Temporary Project Alerts it H u b—

Questions?

GitHub PortSwigger BApp Store

Thank you!2019-11-08Shea Polanskyhttps://polansky.co@0x5ca1e5