diff --git a/README.md b/README.md index c1ad853..2d1d513 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,9 @@ This magic header is stripped from the request before it's forwarded to the dest ## Configuration This extension is 'plug and play' and should speak for itself. You can hover with your mouse over each field in the 'Awesome TLS' tab for more information about each field. +To load your custom Client Hello, you can capture it in Wireshark, copy client hello record as hex stream and paste it into the field "Hex Client Hello". +![screenshot](./docs/wireshark_capture_client_hello.png) +
Advanced usage diff --git a/docs/settings.png b/docs/settings.png index 4c29db0..ecf80d5 100644 Binary files a/docs/settings.png and b/docs/settings.png differ diff --git a/src-go/server/cmd/main.go b/src-go/server/cmd/main.go index ff6174f..837fa1d 100644 --- a/src-go/server/cmd/main.go +++ b/src-go/server/cmd/main.go @@ -22,6 +22,7 @@ func main() { InterceptProxyAddr: server.DefaultInterceptProxyAddress, BurpAddr: server.DefaultBurpProxyAddress, Fingerprint: tls.DefaultFingerprint, + HexClientHello: "", UseInterceptedFingerprint: false, HttpTimeout: int(internal.DefaultHttpTimeout.Seconds()), HttpKeepAliveInterval: int(internal.DefaultHttpKeepAlive.Seconds()), diff --git a/src-go/server/internal/tls/factory.go b/src-go/server/internal/tls/factory.go index 84cb01b..4b4bd60 100644 --- a/src-go/server/internal/tls/factory.go +++ b/src-go/server/internal/tls/factory.go @@ -37,5 +37,11 @@ func (f *FactoryWithClientHelloId) NewUTLSConn(conn net.Conn, config *tls.Config clientHelloID, spec := f.GetClientHello(config.ServerName) + if spec != nil { + clientHelloID = &utls.HelloCustom + } else if clientHelloID == nil { + clientHelloID = DefaultClientHelloID + } + return &uconnAdapter{UConn: utls.UClient(conn, uConfig, *clientHelloID), spec: spec} } diff --git a/src-go/server/internal/transport.go b/src-go/server/internal/transport.go index 180f102..4f4e56f 100644 --- a/src-go/server/internal/transport.go +++ b/src-go/server/internal/transport.go @@ -3,6 +3,7 @@ package internal import ( "encoding/json" "errors" + "fmt" "net" "strings" "time" @@ -38,6 +39,9 @@ type TransportConfig struct { // The TLS fingerprint to use. Fingerprint internalTls.Fingerprint + // Hexadecimal Client Hello to use + HexClientHello internalTls.HexClientHello + // The maximum amount of time a dial will wait for a connect to complete. // Defaults to [DefaultHttpTimeout]. HttpTimeout int @@ -102,18 +106,28 @@ func NewTransport(getInterceptedFingerprint func(sni string) string) (*oohttp.St dialer.KeepAlive = time.Duration(config.HttpKeepAliveInterval) * time.Second } - var spec *utls.ClientHelloSpec - clientHelloID := config.Fingerprint.ToClientHelloId() + var clientHelloSpec *utls.ClientHelloSpec + var clientHelloID *utls.ClientHelloID + + if config.HexClientHello != "" { + spec, err := config.HexClientHello.ToClientHelloSpec() + if err != nil { + return nil, fmt.Errorf("create spec from client hello: %w", err) + } + clientHelloSpec = spec + } else if config.Fingerprint != "" { + clientHelloID = config.Fingerprint.ToClientHelloId() + } getClientHello := func(sni string) (*utls.ClientHelloID, *utls.ClientHelloSpec) { - if !config.UseInterceptedFingerprint { - return clientHelloID, spec + if !config.UseInterceptedFingerprint || config.HexClientHello != "" { + return clientHelloID, clientHelloSpec } interceptedFingerprint := getInterceptedFingerprint(sni) if interceptedFingerprint == "" { - return clientHelloID, spec + return clientHelloID, clientHelloSpec } interceptedSpec, err := internalTls.HexClientHello(interceptedFingerprint).ToClientHelloSpec() @@ -121,7 +135,7 @@ func NewTransport(getInterceptedFingerprint func(sni string) string) (*oohttp.St return &utls.HelloCustom, interceptedSpec } - return clientHelloID, spec + return clientHelloID, clientHelloSpec } tlsFactory := &internalTls.FactoryWithClientHelloId{GetClientHello: getClientHello} diff --git a/src/main/java/burp/BurpExtender.java b/src/main/java/burp/BurpExtender.java index c74ceb0..64757f5 100644 --- a/src/main/java/burp/BurpExtender.java +++ b/src/main/java/burp/BurpExtender.java @@ -46,6 +46,7 @@ public void registerExtenderCallbacks(IBurpExtenderCallbacks callbacks) var transportConfig = new TransportConfig(); transportConfig.Fingerprint = this.settings.getFingerprint(); + transportConfig.HexClientHello = this.settings.getHexClientHello(); transportConfig.HttpTimeout = this.settings.getHttpTimeout(); transportConfig.HttpKeepAliveInterval = this.settings.getHttpKeepAliveInterval(); transportConfig.IdleConnTimeout = this.settings.getIdleConnTimeout(); diff --git a/src/main/java/burp/Settings.java b/src/main/java/burp/Settings.java index b5a67f4..1a60345 100644 --- a/src/main/java/burp/Settings.java +++ b/src/main/java/burp/Settings.java @@ -9,6 +9,7 @@ public class Settings { private final String interceptProxyAddress = "InterceptProxyAddress"; private final String burpProxyAddress = "BurpProxyAddress"; private final String fingerprint = "Fingerprint"; + private final String hexClientHello = "HexClientHello"; private final String useInterceptedFingerprint = "UseInterceptedFingerprint"; private final String httpTimeout = "HttpTimeout"; private final String httpKeepAliveInterval = "HttpKeepAliveInterval"; @@ -124,6 +125,10 @@ public void setFingerprint(String fingerprint) { this.write(this.fingerprint, fingerprint); } + public String getHexClientHello() { return this.read(this.hexClientHello); } + + public void setHexClientHello(String hexClientHello) { this.write(this.hexClientHello, hexClientHello); } + public int getIdleConnTimeout() { return Integer.parseInt(this.read(this.idleConnTimeout)); } diff --git a/src/main/java/burp/SettingsTab.form b/src/main/java/burp/SettingsTab.form index 19cc1fa..1f9f6a8 100644 --- a/src/main/java/burp/SettingsTab.form +++ b/src/main/java/burp/SettingsTab.form @@ -17,7 +17,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -59,13 +59,13 @@ - + - + @@ -73,7 +73,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -105,7 +105,7 @@ - + @@ -113,7 +113,7 @@ - + @@ -121,29 +121,50 @@ - + - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/burp/SettingsTab.java b/src/main/java/burp/SettingsTab.java index 2224a6d..cb94d6b 100644 --- a/src/main/java/burp/SettingsTab.java +++ b/src/main/java/burp/SettingsTab.java @@ -35,6 +35,8 @@ public class SettingsTab implements ITab { private JPanel panelSettings; private JPanel panelAdvanced; private JButton buttonSaveAdvanced; + private JLabel labelHexClientHello; + private JTextField textFieldHexClientHello; private Gson gson; private PrintWriter stdout; @@ -58,6 +60,7 @@ public SettingsTab(Settings settings, IBurpExtenderCallbacks callbacks) { textFieldInterceptProxyAddress.setText(settings.getInterceptProxyAddress()); textFieldBurpProxyAddress.setText(settings.getBurpProxyAddress()); textFieldSpoofProxyAddress.setText(settings.getSpoofProxyAddress()); + textFieldHexClientHello.setText(settings.getHexClientHello()); spinnerHttpTimout.setValue(settings.getHttpTimeout()); spinnerKeepAlive.setValue(settings.getHttpKeepAliveInterval()); @@ -99,6 +102,7 @@ public void actionPerformed(ActionEvent e) { private String SaveSettings(Settings settings) { settings.setSpoofProxyAddress(textFieldSpoofProxyAddress.getText()); settings.setFingerprint((String) comboBoxFingerprint.getSelectedItem()); + settings.setHexClientHello(textFieldHexClientHello.getText()); settings.setHttpTimeout((int) spinnerHttpTimout.getValue()); settings.setIdleConnTimeout((int) spinnerIdleConnTimeout.getValue()); settings.setHttpKeepAliveInterval((int) spinnerKeepAlive.getValue()); @@ -111,6 +115,7 @@ private String SaveSettings(Settings settings) { transportConfig.InterceptProxyAddr = settings.getInterceptProxyAddress(); transportConfig.BurpAddr = settings.getBurpProxyAddress(); transportConfig.Fingerprint = settings.getFingerprint(); + transportConfig.HexClientHello = settings.getHexClientHello(); transportConfig.HttpTimeout = settings.getHttpTimeout(); transportConfig.HttpKeepAliveInterval = settings.getHttpKeepAliveInterval(); transportConfig.IdleConnTimeout = settings.getIdleConnTimeout(); @@ -139,88 +144,97 @@ private String SaveSettings(Settings settings) { */ private void $$$setupUI$$$() { panelMain = new JPanel(); - panelMain.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(3, 5, new Insets(0, 0, 0, 0), -1, -1)); + panelMain.setLayout(new GridLayoutManager(3, 5, new Insets(0, 0, 0, 0), -1, -1)); tabbedPaneTab = new JTabbedPane(); - panelMain.add(tabbedPaneTab, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false)); + panelMain.add(tabbedPaneTab, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false)); panelSettings = new JPanel(); - panelSettings.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(14, 1, new Insets(0, 0, 0, 0), -1, -1)); + panelSettings.setLayout(new GridLayoutManager(16, 1, new Insets(0, 0, 0, 0), -1, -1)); tabbedPaneTab.addTab("settings", panelSettings); labelSpoofProxyAddress = new JLabel(); labelSpoofProxyAddress.setRequestFocusEnabled(false); labelSpoofProxyAddress.setText("Listen address:"); labelSpoofProxyAddress.setToolTipText(""); - panelSettings.add(labelSpoofProxyAddress, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(labelSpoofProxyAddress, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); textFieldSpoofProxyAddress = new JTextField(); textFieldSpoofProxyAddress.setToolTipText("Local address the proxy server should listen on. Requires extension reload."); - panelSettings.add(textFieldSpoofProxyAddress, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + panelSettings.add(textFieldSpoofProxyAddress, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); labelFingerprint = new JLabel(); labelFingerprint.setEnabled(true); labelFingerprint.setHorizontalAlignment(10); labelFingerprint.setText("Fingerprint:"); labelFingerprint.setVerticalAlignment(0); labelFingerprint.setVerticalTextPosition(0); - panelSettings.add(labelFingerprint, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_NORTHWEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(labelFingerprint, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); comboBoxFingerprint = new JComboBox(); - panelSettings.add(comboBoxFingerprint, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_NORTHWEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(comboBoxFingerprint, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); labelTimeout = new JLabel(); labelTimeout.setText("Http connection timeout (seconds)"); - panelSettings.add(labelTimeout, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(labelTimeout, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); spinnerHttpTimout = new JSpinner(); spinnerHttpTimout.setToolTipText("The maximum amount of time a dial will wait for a connect to complete."); - panelSettings.add(spinnerHttpTimout, new com.intellij.uiDesigner.core.GridConstraints(5, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(spinnerHttpTimout, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); labelKeepAlive = new JLabel(); labelKeepAlive.setText("Http keep alive interval"); - panelSettings.add(labelKeepAlive, new com.intellij.uiDesigner.core.GridConstraints(6, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(labelKeepAlive, new GridConstraints(8, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); spinnerKeepAlive = new JSpinner(); spinnerKeepAlive.setToolTipText("Specifies the interval between keep-alive probes for an active network connection."); - panelSettings.add(spinnerKeepAlive, new com.intellij.uiDesigner.core.GridConstraints(7, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(spinnerKeepAlive, new GridConstraints(9, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); labelIdleConnTimeout = new JLabel(); labelIdleConnTimeout.setText("Idle connection timeout"); - panelSettings.add(labelIdleConnTimeout, new com.intellij.uiDesigner.core.GridConstraints(8, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(labelIdleConnTimeout, new GridConstraints(10, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); spinnerIdleConnTimeout = new JSpinner(); spinnerIdleConnTimeout.setToolTipText("The maximum amount of time an idle (keep-alive) connection will remain idle before closing itself."); - panelSettings.add(spinnerIdleConnTimeout, new com.intellij.uiDesigner.core.GridConstraints(9, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(spinnerIdleConnTimeout, new GridConstraints(11, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); labelTlsHandshakeTimeout = new JLabel(); labelTlsHandshakeTimeout.setText("TLS handshake timeout"); - panelSettings.add(labelTlsHandshakeTimeout, new com.intellij.uiDesigner.core.GridConstraints(10, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(labelTlsHandshakeTimeout, new GridConstraints(12, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); spinnerTlsHandshakeTimeout = new JSpinner(); spinnerTlsHandshakeTimeout.setToolTipText("The maximum amount of time to wait for a TLS handshake."); - panelSettings.add(spinnerTlsHandshakeTimeout, new com.intellij.uiDesigner.core.GridConstraints(11, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelSettings.add(spinnerTlsHandshakeTimeout, new GridConstraints(13, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + final JPanel panel1 = new JPanel(); + panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + panelSettings.add(panel1, new GridConstraints(15, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); + labelHexClientHello = new JLabel(); + labelHexClientHello.setRequestFocusEnabled(false); + labelHexClientHello.setText("Hex Client Hello:"); + labelHexClientHello.setToolTipText(""); + panelSettings.add(labelHexClientHello, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + textFieldHexClientHello = new JTextField(); + textFieldHexClientHello.setText(""); + textFieldHexClientHello.setToolTipText("Custom client hello as hex stream. Leave it empty if you want it to be automatically detected."); + panelSettings.add(textFieldHexClientHello, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); buttonSave = new JButton(); buttonSave.setText("Save all settings"); - panelSettings.add(buttonSave, new com.intellij.uiDesigner.core.GridConstraints(12, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - final JPanel panel1 = new JPanel(); - panel1.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - panelSettings.add(panel1, new com.intellij.uiDesigner.core.GridConstraints(13, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); + panelSettings.add(buttonSave, new GridConstraints(14, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); panelAdvanced = new JPanel(); - panelAdvanced.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(7, 1, new Insets(0, 0, 0, 0), -1, -1)); + panelAdvanced.setLayout(new GridLayoutManager(7, 1, new Insets(0, 0, 0, 0), -1, -1)); panelAdvanced.setToolTipText(""); tabbedPaneTab.addTab("advanced", panelAdvanced); labelInterceptProxyAddress = new JLabel(); labelInterceptProxyAddress.setEnabled(true); labelInterceptProxyAddress.setText("Intercept proxy address:"); - panelAdvanced.add(labelInterceptProxyAddress, new com.intellij.uiDesigner.core.GridConstraints(1, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelAdvanced.add(labelInterceptProxyAddress, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); textFieldInterceptProxyAddress = new JTextField(); textFieldInterceptProxyAddress.setToolTipText("Local address the intercept proxy server should listen on. Use it to configure proxy on your client. Requires extension reload."); - panelAdvanced.add(textFieldInterceptProxyAddress, new com.intellij.uiDesigner.core.GridConstraints(2, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelAdvanced.add(textFieldInterceptProxyAddress, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); labelBurpProxyAddress = new JLabel(); labelBurpProxyAddress.setText("Burp proxy address:"); - panelAdvanced.add(labelBurpProxyAddress, new com.intellij.uiDesigner.core.GridConstraints(3, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelAdvanced.add(labelBurpProxyAddress, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); textFieldBurpProxyAddress = new JTextField(); textFieldBurpProxyAddress.setText(""); - panelAdvanced.add(textFieldBurpProxyAddress, new com.intellij.uiDesigner.core.GridConstraints(4, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); + panelAdvanced.add(textFieldBurpProxyAddress, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false)); buttonSaveAdvanced = new JButton(); buttonSaveAdvanced.setHideActionText(false); buttonSaveAdvanced.setText("Save all settings"); - panelAdvanced.add(buttonSaveAdvanced, new com.intellij.uiDesigner.core.GridConstraints(5, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelAdvanced.add(buttonSaveAdvanced, new GridConstraints(5, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); final JPanel panel2 = new JPanel(); - panel2.setLayout(new com.intellij.uiDesigner.core.GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); - panelAdvanced.add(panel2, new com.intellij.uiDesigner.core.GridConstraints(6, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); - final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer(); - panel2.add(spacer1, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER, com.intellij.uiDesigner.core.GridConstraints.FILL_VERTICAL, 1, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); + panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); + panelAdvanced.add(panel2, new GridConstraints(6, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false)); + final Spacer spacer1 = new Spacer(); + panel2.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false)); checkBoxButtonUseInterceptedFingerprint = new JCheckBox(); checkBoxButtonUseInterceptedFingerprint.setText("Use intercepted tls fingerprint"); - panelAdvanced.add(checkBoxButtonUseInterceptedFingerprint, new com.intellij.uiDesigner.core.GridConstraints(0, 0, 1, 1, com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST, com.intellij.uiDesigner.core.GridConstraints.FILL_NONE, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW, com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); + panelAdvanced.add(checkBoxButtonUseInterceptedFingerprint, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); } /** @@ -229,5 +243,4 @@ private String SaveSettings(Settings settings) { public JComponent $$$getRootComponent$$$() { return panelMain; } - } diff --git a/src/main/java/burp/TransportConfig.java b/src/main/java/burp/TransportConfig.java index 60ca111..7fd68cb 100644 --- a/src/main/java/burp/TransportConfig.java +++ b/src/main/java/burp/TransportConfig.java @@ -20,6 +20,11 @@ public class TransportConfig { */ public String Fingerprint; + /* + * Hexadecimal Client Hello + */ + public String HexClientHello; + /* * Use intercepted fingerprint from request; */