GithubHelp home page GithubHelp logo

anon-exploiter / burpaddcustomheader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lorenzog/burpaddcustomheader

0.0 1.0 0.0 151 KB

A Burp Suite extension to add a custom header (e.g. JWT)

License: GNU General Public License v3.0

Java 92.67% Python 2.27% HTML 5.06%

burpaddcustomheader's Introduction

Add a custom HTTP header in Burp

Quickstart:

If you trust this JAR file:

  1. Open the Extender tab
  2. Select "Extensions"
  3. Select "Add" and pick the jar file from this repository

If you don't trust the jar file (and why should you), instructions on how to compile it are below.

Usage:

  1. After installed, select the "Add Custom Header" tab and pick a regular expression or a hard-coded value as shown below. Keep in mind the regular expression makes sense only when using a macro, so try a hard-coded value first. tab
  2. The defaults are OK for a JWT-like "Bearer" token
  3. Select Project Options -> Sessions
  4. Add a Session Handling rule
  5. Name it and select "Add", "Invoke a Burp Extension" extension
  6. Make sure the scope is correct! If you're just trying this out, select 'include all URLs' in the scope (not recommended for regular use).
  7. Select the "Add Bearer Token" option from the list in the following screen

You're now ready to go.

Testing with a mock server

Run this to start a Python webserver on 127.0.0.1:5000:

FLASK_DEBUG=1 FLASK_APP=server.py flask run

The mock webserver will issue a "bearer token" on /login and echo back the bearer token received on /stuff.

See the following screenshots for examples of how to interact with the mock server.

POST to /login:

login

Using the token when accessing /stuff:

token

Compilation from source

  1. Clone this repo

  2. Burp -> Extender -> APIs

  3. Select "Save interface files" from the bottom of the screen and select a temporary location (e.g. /tmp/foo)

  4. Copy all *.java files into the burp directory containing this repo source:

    cp /tmp/foo/burp/*.java burpAddCustomHeader/burp/
    
  5. Compile the source:

    cd burpAddCustomHeader
    mkdir build 
    javac -d build burp/BurpExtender.java burp/BurpTab.java
    
  6. Create a JAR file:

    cd build 
    jar cvf ../out.jar .
    
  7. Install the out.jar file into Burp

To design the GUI I've used Netbeans. The BurpTab.form file should be enough to recreate it.

LifeProTip: hold the CTRL key when selecting the checkbox in the "Extensions" tab in Burp if you want to re-load an extension.

burpaddcustomheader's People

Contributors

lorenzog avatar pajswigger avatar righettod avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.