This Burp Suite extension enables the generation of shareable links to specific requests which other Burp Suite users can import.
2 |
3 |
How To Use
4 |
5 |
Once this extension is installed a new tab titled "Burp Share Requests" will appear in Burp Suite which will contain all the currently generated links that are ready to be shared.
6 |
7 |
To create these links right click on a Request from either the Site Map, HTTP History, Intercept Tab, or Repeater tab and select the "create link" option within the context menu options.
8 | This will generate a new line within the "Burp Share Requests" showing the URL of the Request you generated a link for.
9 |
10 |
To share the Request with others, right click on the desired request within the "Burp Share Requests" tab and select "Get link" to generate a link suitable for pasting into a browser URL bar
11 | (i.e. http://burpsharedrequest/...) or select "Get HTML Link" to generate a link suitable for including in a report or blog post (i.e. http://burpsharedrequest/
12 |
--------------------------------------------------------------------------------
/BappManifest.bmf:
--------------------------------------------------------------------------------
1 | Uuid: 30ec677a0f134150985b273d8c1dea22
2 | ExtensionType: 1
3 | Name: Burp Share Requests
4 | RepoName: burp-share-requests
5 | ScreenVersion: 1.0
6 | SerialVersion: 1
7 | MinPlatformVersion: 0
8 | ProOnly: False
9 | Author: Static-Flow
10 | ShortDescription: Enables the generation of shareable links to specific requests which other Burp Suite users can import.
11 | EntryPoint: target/BurpSuiteShareRequests.jar
12 | BuildCommand: mvn package
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BurpSuiteShareRequests
2 | This Burp Suite extension enables the generation of shareable links to specific requests which other Burp Suite users can import. If this collaboration feature is useful, checkout my main extension https://github.com/Static-Flow/BurpSuite-Team-Extension which includes this functionality and more!
3 |
4 | # How To Use
5 | Once this extension is installed a new tab titled "Burp Share Requests" will appear in Burp Suite which will contain all the currently generated links that are ready to be shared.
6 |
7 | To create these links right click on a Request from either the Site Map, HTTP History, Intercept Tab, or Repeater tab and select the "create link" option within the context menu options. This will generate a new line within the "Burp Share Requests" showing the URL of the Request you generated a link for.
8 |
9 | To share the Request with others, right click on the desired request within the "Burp Share Requests" tab and select "Get link" to generate a link suitable for pasting into a browser URL bar (i.e. http://burpsharedrequest/...) or select "Get HTML Link" to generate a link suitable for including in a report or blog post (i.e. http://burpsharedrequest/
10 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 |
3 | repositories {
4 | mavenCentral()
5 | }
6 |
7 | dependencies {
8 | compile 'net.portswigger.burp.extender:burp-extender-api:1.7.22'
9 | }
10 |
11 | sourceSets {
12 | main {
13 | java {
14 | srcDir 'src'
15 | }
16 | resources {
17 | srcDir 'resources'
18 | }
19 | }
20 | }
21 |
22 | task fatJar(type: Jar) {
23 |
24 | baseName = project.name + '-all'
25 | from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
26 | with jar
27 | }
28 |
29 | compileJava {
30 | targetCompatibility '1.8'
31 | sourceCompatibility '1.8'
32 | }
33 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | StaticFlow
8 | BurpSuiteShareRequests
9 | 1.0-SNAPSHOT
10 |
11 |
12 |
13 |
14 | com.google.code.gson
15 | gson
16 | 2.8.6
17 |
18 |
19 |
20 | com.sun.xml.bind
21 | jaxb-core
22 | 2.3.0.1
23 |
24 |
25 | javax.xml.bind
26 | jaxb-api
27 | 2.3.1
28 |
29 |
30 | com.sun.xml.bind
31 | jaxb-impl
32 | 2.3.1
33 |
34 |
35 | net.portswigger.burp.extender
36 | burp-extender-api
37 | 2.1
38 |
39 |
40 |
41 |
42 | ${project.basedir}/src
43 | BurpSuiteShareRequests
44 |
45 |
46 |
47 |
48 | org.apache.maven.plugins
49 | maven-eclipse-plugin
50 | 2.9
51 |
52 | true
53 | false
54 |
55 |
56 |
57 |
58 |
59 | org.apache.maven.plugins
60 | maven-compiler-plugin
61 | 2.3.2
62 |
63 | 1.8
64 | 1.8
65 |
66 |
67 |
68 |
69 |
70 | org.apache.maven.plugins
71 | maven-assembly-plugin
72 | 2.4.1
73 |
74 |
75 | false
76 |
77 | jar-with-dependencies
78 |
79 |
80 |
81 |
82 |
83 | make-assembly
84 |
85 | package
86 |
87 | single
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/src/burp/BurpExtender.java:
--------------------------------------------------------------------------------
1 | package burp;
2 |
3 | import sharerequests.*;
4 |
5 | import java.awt.*;
6 | import java.io.IOException;
7 |
8 | public class BurpExtender
9 | implements IBurpExtender, ITab {
10 | private SharedValues sharedValues;
11 |
12 | public void registerExtenderCallbacks(IBurpExtenderCallbacks iBurpExtenderCallbacks) {
13 | iBurpExtenderCallbacks.setExtensionName("Burp Shared Requests");
14 | this.sharedValues = new SharedValues(iBurpExtenderCallbacks);
15 | iBurpExtenderCallbacks.addSuiteTab(this);
16 | iBurpExtenderCallbacks.registerContextMenuFactory(new ManualRequestSenderContextMenu(this.sharedValues));
17 | iBurpExtenderCallbacks.registerProxyListener(new ProxyListener(this.sharedValues));
18 | iBurpExtenderCallbacks.registerExtensionStateListener(new ExtensionStateListener(this.sharedValues));
19 | CustomURLServer innerServer;
20 | try {
21 | innerServer = new CustomURLServer(sharedValues);
22 | Thread innerServerThread = new Thread(innerServer);
23 | innerServerThread.start();
24 | sharedValues.setInnerServer(innerServer);
25 | } catch (IOException e) {
26 | iBurpExtenderCallbacks.printError(e.getMessage());
27 | }
28 | }
29 |
30 | public String getTabCaption() {
31 | return "Burp Share Requests";
32 | }
33 |
34 | public Component getUiComponent() {
35 | return new ExtensionPanel(this.sharedValues);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/sharerequests/CustomURLServer.java:
--------------------------------------------------------------------------------
1 | package sharerequests;
2 |
3 | import java.io.*;
4 | import java.net.ServerSocket;
5 | import java.net.Socket;
6 | import java.net.SocketException;
7 | import java.util.Base64;
8 | import java.util.Date;
9 | import java.util.StringTokenizer;
10 |
11 | public class CustomURLServer implements Runnable {
12 |
13 | private static final String NEW_LINE = "\r\n";
14 | private final SharedValues sharedValues;
15 |
16 | private ServerSocket socket;
17 | private boolean running;
18 |
19 | public CustomURLServer(SharedValues sharedValues) throws IOException {
20 | this.sharedValues = sharedValues;
21 | socket = new ServerSocket(0);
22 | }
23 |
24 | @Override
25 | public void run() {
26 | running = true;
27 | try {
28 | while (running) {
29 | handleConnection(socket.accept());
30 | }
31 | } catch (SocketException tr) {
32 | sharedValues.getCallbacks().printError("Inner Server Closed.");
33 | } catch (IOException io) {
34 | sharedValues.getCallbacks().printError("Exception in socket: " + io);
35 | }
36 |
37 | }
38 |
39 | private void handleConnection(Socket connection) {
40 | try {
41 | BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
42 | OutputStream out = new BufferedOutputStream(connection.getOutputStream());
43 | PrintStream pout = new PrintStream(out);
44 |
45 | // read first line of request
46 | String request = in.readLine();
47 | if (request != null) {
48 |
49 | StringTokenizer tokenizer = new StringTokenizer(request);
50 | String httpMethod = tokenizer.nextToken();
51 | String httpQueryString = tokenizer.nextToken();
52 | sharedValues.getCallbacks().printOutput(httpMethod + ":" + httpQueryString.substring(1));
53 | parseCustomMessage(httpQueryString);
54 | // we ignore the rest
55 | while (true) {
56 | String ignore = in.readLine();
57 | if (ignore == null || ignore.length() == 0) break;
58 | }
59 |
60 | if (!request.startsWith("GET ") ||
61 | !(request.endsWith(" HTTP/1.0") || request.endsWith(" HTTP/1.1"))) {
62 | // bad request
63 | pout.print("HTTP/1.0 400 Bad Request" + NEW_LINE + NEW_LINE);
64 | } else {
65 | String response = "Link Processed!";
66 |
67 | pout.print(
68 | "HTTP/1.0 200 OK" + NEW_LINE +
69 | "Content-Type: text/plain" + NEW_LINE +
70 | "Date: " + new Date() + NEW_LINE +
71 | "Content-length: " + response.length() + NEW_LINE + NEW_LINE +
72 | response
73 | );
74 | }
75 |
76 | pout.close();
77 | }
78 | } catch (Exception tri) {
79 | sharedValues.getCallbacks().printError(tri.getMessage());
80 | }
81 | }
82 |
83 | private void parseCustomMessage(String httpQueryString) {
84 | try {
85 | HttpRequestResponse httpRequestResponse = this.sharedValues.getGson().fromJson(
86 | new String(Base64.getDecoder().decode(httpQueryString.substring(1))),
87 | HttpRequestResponse.class);
88 | this.sharedValues.getCallbacks().sendToRepeater(
89 | httpRequestResponse.getHttpService().getHost(),
90 | httpRequestResponse.getHttpService().getPort(),
91 | httpRequestResponse.getHttpService().getProtocol()
92 | .equalsIgnoreCase("https"),
93 | httpRequestResponse.getRequest(),
94 | "Burp Shared Link Payload");
95 | } catch (Exception e) {
96 | sharedValues.getCallbacks().printError(e.getMessage());
97 | }
98 | }
99 |
100 | ServerSocket getSocket() {
101 | return socket;
102 | }
103 |
104 | void stopRunning() {
105 | running = false;
106 | try {
107 | this.socket.close();
108 | } catch (IOException e) {
109 | sharedValues.getCallbacks().printError("Error closing socket");
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/src/sharerequests/ExtensionPanel.java:
--------------------------------------------------------------------------------
1 | package sharerequests;
2 |
3 | import javax.swing.*;
4 | import javax.swing.event.PopupMenuEvent;
5 | import javax.swing.event.PopupMenuListener;
6 | import javax.swing.table.DefaultTableCellRenderer;
7 | import java.awt.*;
8 | import java.awt.datatransfer.Clipboard;
9 | import java.awt.datatransfer.StringSelection;
10 | import java.io.ByteArrayOutputStream;
11 | import java.io.IOException;
12 | import java.util.Base64;
13 | import java.util.zip.GZIPOutputStream;
14 |
15 | public class ExtensionPanel
16 | extends JPanel {
17 | private static final long serialVersionUID = 1L;
18 | private SharedValues sharedValues;
19 |
20 | public ExtensionPanel(SharedValues sharedValues) {
21 | this.sharedValues = sharedValues;
22 | this.initComponents();
23 | }
24 |
25 | private void initComponents() {
26 | GridBagLayout gridBagLayout = new GridBagLayout();
27 | gridBagLayout.columnWeights = new double[]{1.0, 1.0};
28 | gridBagLayout.rowWeights = new double[]{0.0, 1.0};
29 | setLayout(gridBagLayout);
30 |
31 | //info panel
32 | JPanel infoPanel = new JPanel(new BorderLayout());
33 | JLabel explainer = new JLabel();
34 | explainer.setHorizontalAlignment(SwingConstants.LEFT);
35 | infoPanel.add(explainer, BorderLayout.WEST);
36 | explainer.setText("This extension allows you to create shareable links to Burp Suite requests. " +
37 | "When others visit the generated links, in a browser proxied by Burp Suite with this extension installed, " +
38 | "the request as you shared it will be imported into their repeater tab. Links can be generated from" +
39 | " right click context menus on requests in the following places: