From 34504ef94200a268df73e060c53fd562128830dc Mon Sep 17 00:00:00 2001 From: bort_millipede Date: Sun, 18 Dec 2016 00:46:10 -0600 Subject: [PATCH] Version 0.2 Added functionality to copy selected property value to clipboard. Updated description and usage instructions --- README.md | 11 ++++++----- burp/BurpExtender.java | 32 ++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index fcc7719..aa2b6dc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Burp-JVM-Property-Editor -Small Burp Suite Extension that allows users to view, add, modify or remove JVM System Properties (https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html) during runtime. May be helpful for the purpose of viewing preset property values or setting options for other extensions during runtime rather than on the command line. Can be used with both the Free and Professional versions of Burp Suite. +# Burp JVM Property Editor +Small Burp Suite (Free or Professional) Extension to allow the user to view, add, modify, delete or copy the value of JVM System Properties (https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html) during Burp usage. May be helpful to some for the purpose of viewing preset property values or setting options for other extensions during runtime rather than on the command line. # Usage 1. Load the burp-jvm-property-editor-[VERSION].jar file in the Burp Suite "Extensions" tab. @@ -13,10 +13,11 @@ Small Burp Suite Extension that allows users to view, add, modify or remove JVM 1. Double click the cell in the "Property Value" column and type the new value for the property. 2. To commit the changed value to the JVM press enter. To cancel, press esc. 3. If the current installed SecurityManager allows the user to edit the selected property, the property value will be changed. Otherwise an error message will be printed below the "Add Property" button. -5. To remove an existing property: - 1. Select the property that will be deleted and press the "Delete Property" button. - 2. A confirm prompt will appear: select "Yes" to delete the property and "No" to cancel. +5. To remove an existing property (or properties): + 1. Select the property (or properties) that will be deleted and press the "Delete Selected Property" button. + 2. A confirm prompt will appear (for each selected property): select "Yes" to delete the property and "No" to cancel. 3. If "Yes" was clicked and the current installed SecurityManager allows the user to remove the selected property, the property value will be changed. Otherwise an error message will be printed below the "Add Property" button. +6. To copy the value of an existing property, select the property from the list and click "Copy Selected Property Value". The value of the property will be copied to the clipboard and a message will be printed below the "Add Property" button confirming this. # Building Requires Java Development Kit 7 or higher and Burp Suite jar file (Free or Professional) diff --git a/burp/BurpExtender.java b/burp/BurpExtender.java index 18642c9..5e30f17 100644 --- a/burp/BurpExtender.java +++ b/burp/BurpExtender.java @@ -1,11 +1,10 @@ /* BurpExtender.java - v0.1 + v0.2 - Small Burp Suite Extension to allow the user to view/add/modify/remove JVM System Properties during runtime. May be helpful to some for the purpose - of viewing preset property values or setting options for other extensions during runtime rather than on the command line. This extension can be used - with both the Free and Professional versions of Burp Suite. + Small Burp Suite (Free or Professional) Extension to allow the user to view/add/modify/delete JVM System Properties during Burp usage. May be helpful to some + for the purpose of viewing preset property values or setting options for other extensions during runtime rather than on the command line. */ package burp; @@ -15,6 +14,9 @@ import java.util.Arrays; import java.awt.Component; import java.awt.GridLayout; +import java.awt.Toolkit; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.StringSelection; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JPanel; @@ -35,7 +37,7 @@ public class BurpExtender implements IBurpExtender,ITab { private DefaultTableModel dtm; private JLabel statusBar; - private static final String version = "v0.1"; + private static final String version = "v0.2"; public void registerExtenderCallbacks(IBurpExtenderCallbacks cb) { callbacks = cb; @@ -44,16 +46,17 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks cb) { component = new JPanel(); - JPanel buttonPanel = new JPanel(new GridLayout(4,1)); + JPanel buttonPanel = new JPanel(new GridLayout(5,1)); JButton refButton = new JButton("Refresh Properties"); - JButton delButton = new JButton("Delete Property"); + JButton delButton = new JButton("Delete Selected Property"); + JButton copyButton = new JButton("Copy Selected Property Value"); JButton addButton = new JButton("Add Property"); statusBar = new JLabel(""); ActionListener buttonAL = new ActionListener() { public void actionPerformed(ActionEvent ae) { JButton b = (JButton) ae.getSource(); switch(b.getText()) { - case "Delete Property": + case "Delete Selected Property": int[] selected = table.getSelectedRows(); for(int i=selected.length-1;i>-1;i--) { String val = (String) table.getValueAt(selected[i],0); @@ -80,6 +83,17 @@ public void actionPerformed(ActionEvent ae) { } } break; + case "Copy Selected Property Value": + if(table.getSelectedRowCount() == 1) { + String val = (String) table.getValueAt(table.getSelectedRow(),0); + if(!val.isEmpty()) { + Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard(); + StringSelection ss = new StringSelection((String) table.getValueAt(table.getSelectedRow(),1)); + cb.setContents(ss,ss); + statusBar.setText("Property "+val+" value copied to clipboard."); + } + } + break; case "Add Property": statusBar.setText(""); int rowIndex = dtm.getRowCount()-1; @@ -109,9 +123,11 @@ public void actionPerformed(ActionEvent ae) { }; refButton.addActionListener(buttonAL); delButton.addActionListener(buttonAL); + copyButton.addActionListener(buttonAL); addButton.addActionListener(buttonAL); buttonPanel.add(refButton); buttonPanel.add(delButton); + buttonPanel.add(copyButton); buttonPanel.add(addButton); buttonPanel.add(statusBar);