Burp Extension - Hello World¶
Lao Tzu once said "A journey of a thousand miles begins with a single step" and that single step to our journey in creating a Burp extension or any development endeavour will be the "Hello World"!
In this tutorial, we will create a Hello World using the Hello World Example from Portswigger.
Setting Up¶
We will start with environment set-up. In our set-up we will be using Eclipse as our IDE.
Install Burp¶
In our case, we will be using Burp Community and we will follow this Burp Suite's official guide to install Burp Community.
Install Eclipse¶
We then follow this guide to install eclipse but the version installed is 2023-09 (4.29.0).
Add external Jar¶
Following n3utr1n0's guide, we will need to add an external Burpsuite jar file, however there are some deviations from the guide like the use of BurpSuite Community and a newer version of Eclipse 2023-09 (4.29.0).
After creating a new project, we can configure build path burpsuite-community.jar
using the following :
Step 1: Right-click on the explorer
Step 2: Click on "Classpath" and select "Add External JARs"
Step 3 : Browse to the BurpSuite Folder and select burpsuite_community.jar
.
Creating Extension¶
After setting up we will now start creating the extension.
Create Package¶
Now, we go to right-click on "src", select "New" and the "Package" as shown below.
We will name the Name the same as the project name.
When package is created, we create a new Class as follows.
Exporting¶
Then we can just copy and paste the Hello World example and prepare to export as jar using the following steps:
Step 1 : Select Export
Step 2 : In the Export Wizard select "JAR file"
Step 3 : Select Destination
Step 4 : Uncheck "Export class files with compile warnings" then "finish"!
Misc. Issues faced¶
We might face an issue like below where the burp imports are "not accessible" even when we have already configured the build path to import burpsuite_community.jar
.
Based on the following eclipse forum response we simply need to delete the module-info.java
file and the error will be gone.
Delete the module-info.java file. It's only used if you're using Java's built-in module system.
Alternatively, when creating a project, we can uncheck create module-info.java
.
Loading Extension¶
Firstly navigate to the "Extensions" tab, then load the extension by clicking "Add".
Browse for the .jar
file that has been exported
As can be seen the extension has been loaded successfully.
Reference¶
- https://n3utr1n0.medium.com/steps-to-create-burp-extension-easily-eclipse-183ca3f3c891
- https://bishopfox.com/blog/power-pen-tests-with-montoya-api