Skip to content

Commit

Permalink
Merge pull request #83 from CompassSecurity/tobiashort/ui-improvements
Browse files Browse the repository at this point in the history
Tobiashort/UI improvements
  • Loading branch information
emanuelduss authored Jan 1, 2025
2 parents a481a6c + 2c26b1b commit bb55cb1
Show file tree
Hide file tree
Showing 10 changed files with 471 additions and 850 deletions.
6 changes: 3 additions & 3 deletions BappManifest.bmf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Uuid: c61cfa893bb14db4b01775554f7b802e
ExtensionType: 1
Name: SAML Raider
RepoName: saml-raider
ScreenVersion: 2.0.4
SerialVersion: 17
ScreenVersion: 2.1.0
SerialVersion: 18
MinPlatformVersion: 0
ProOnly: False
Author: Roland Bischofberger / Emanuel Duss / Tobias Hort-Giess
ShortDescription: Provides a SAML message editor and a certificate management tool to help with testing SAML infrastructures.
EntryPoint: build/libs/saml-raider-2.0.4.jar
EntryPoint: build/libs/saml-raider-2.1.0.jar
BuildCommand: ./gradlew jar
SupportedProducts: Pro, Community
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Don't forget to rate our extension with as many stars you like :smile:.
### Manual Installation

First, download the latest SAML Raider version:
[saml-raider-2.0.4.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.0.4/saml-raider-2.0.4.jar).
[saml-raider-2.1.0.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.1.0/saml-raider-2.1.0.jar).
Then, start Burp Suite and click in the `Extensions` tab on `Add`. Choose the
SAML Raider JAR file to install it and you are ready to go.

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id "java-library"
}

version = "2.0.4"
version = "2.1.0"

repositories {
mavenCentral()
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/application/SamlTabController.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,7 @@ public void removeSignature() {
}

public void resetMessage() {
if (isRawMode) {
samlMessage = orgSAMLMessage;
}
samlMessage = orgSAMLMessage;
textArea.setContents(ByteArray.byteArray(samlMessage));
isEdited = false;
}
Expand Down Expand Up @@ -428,15 +426,15 @@ public void resignMessage() {
}

private void setInfoMessageText(String infoMessage) {
samlGUI.getActionPanel().getInfoMessageLabel().setText(infoMessage);
samlGUI.getActionPanel().getStatusMessageLabel().setText(infoMessage);
}

public String getInfoMessageText() {
return samlGUI.getActionPanel().getInfoMessageLabel().getText();
return samlGUI.getActionPanel().getStatusMessageLabel().getText();
}

private void resetInfoMessageText() {
samlGUI.getActionPanel().getInfoMessageLabel().setText("");
samlGUI.getActionPanel().getStatusMessageLabel().setText("");
}

private void updateCertificateList() {
Expand Down Expand Up @@ -594,12 +592,14 @@ public void setGUIEditable(boolean editable) {
}

public void showSignatureHelp() {
SignatureHelpWindow window = new SignatureHelpWindow();
var window = new SignatureHelpWindow();
window.setLocationRelativeTo(BurpExtender.api.userInterface().swingUtils().suiteFrame());
window.setVisible(true);
}

public void showXSWHelp() {
XSWHelpWindow window = new XSWHelpWindow();
window.setLocationRelativeTo(BurpExtender.api.userInterface().swingUtils().suiteFrame());
window.setVisible(true);
}

Expand Down
52 changes: 0 additions & 52 deletions src/main/java/gui/ImagePanel.java

This file was deleted.

68 changes: 39 additions & 29 deletions src/main/java/gui/SamlMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import burp.BurpExtender;
import burp.api.montoya.core.ByteArray;
import burp.api.montoya.ui.editor.RawEditor;
import java.awt.BorderLayout;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;

import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;

import static java.util.Objects.requireNonNull;

Expand All @@ -26,52 +26,62 @@ public SamlMain(SamlTabController controller) {
}

private void initializeUI() {
setLayout(new BorderLayout(0, 0));

JSplitPane splitPaneAction = new JSplitPane();
splitPaneAction.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPaneAction.setDividerSize(5);
add(splitPaneAction, BorderLayout.CENTER);
panelAction = new SamlPanelAction(controller);

JPanel panelActionTop = new JPanel();
splitPaneAction.setLeftComponent(panelActionTop);
panelActionTop.setLayout(new BorderLayout(0, 0));
panelAction = new SamlPanelAction(controller);
panelActionTop.setLayout(new BorderLayout());
panelActionTop.setPreferredSize(new Dimension(0, 460));
panelActionTop.add(panelAction);

JPanel panelActionBottom = new JPanel();
splitPaneAction.setRightComponent(panelActionBottom);
panelActionBottom.setLayout(new BorderLayout(0, 0));
textEditorAction = BurpExtender.api.userInterface().createRawEditor();
textEditorAction.setContents(ByteArray.byteArray("<SAMLRaiderFailureInInitialization></SAMLRaiderFailureInInitialization>"));
textEditorAction.setEditable(false);

JPanel panelActionBottom = new JPanel();
panelActionBottom.setLayout(new BorderLayout());
panelActionBottom.setPreferredSize(new Dimension(0, 100));
panelActionBottom.add(textEditorAction.uiComponent(), BorderLayout.CENTER);

JSplitPane splitPaneInformation = new JSplitPane();
splitPaneInformation.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPaneAction.setDividerSize(5);
add(splitPaneInformation, BorderLayout.CENTER);
JSplitPane splitPaneAction = new JSplitPane();
splitPaneAction.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPaneAction.setLeftComponent(panelActionTop);
splitPaneAction.setRightComponent(panelActionBottom);
splitPaneAction.resetToPreferredSizes();

JPanel panelInformationTop = new JPanel();
splitPaneInformation.setLeftComponent((panelInformationTop));
panelInformationTop.setLayout(new BorderLayout(0, 0));
panelInformation = new SamlPanelInfo();

JPanel panelInformationTop = new JPanel();
panelInformationTop.setLayout(new BorderLayout());
panelInformationTop.setPreferredSize(new Dimension(0, 375));
panelInformationTop.add(panelInformation);

JPanel panelInformationBottom = new JPanel();
splitPaneInformation.setRightComponent(panelInformationBottom);
panelInformationBottom.setLayout(new BorderLayout(0, 0));
textEditorInformation = BurpExtender.api.userInterface().createRawEditor();
textEditorInformation.setContents(ByteArray.byteArray(""));

var panelInformationBottomLabel = new JLabel("Parsed & Prettified");
panelInformationBottomLabel.setBorder(new EmptyBorder(5, 5, 5, 5));

JPanel panelInformationBottom = new JPanel();
panelInformationBottom.setLayout(new BorderLayout());
panelInformationBottom.setPreferredSize(new Dimension(0, 100));
panelInformationBottom.add(panelInformationBottomLabel, BorderLayout.NORTH);
panelInformationBottom.add(textEditorInformation.uiComponent(), BorderLayout.CENTER);

JSplitPane splitPaneInformation = new JSplitPane();
splitPaneInformation.setOrientation(JSplitPane.VERTICAL_SPLIT);
splitPaneInformation.setLeftComponent((panelInformationTop));
splitPaneInformation.setRightComponent(panelInformationBottom);
splitPaneInformation.resetToPreferredSizes();

JTabbedPane tabbedPane = new JTabbedPane();
add(tabbedPane);
tabbedPane.addTab("SAML Attacks", null, splitPaneAction, "SAML Attacks");
tabbedPane.addTab("SAML Message Info", null, splitPaneInformation, "SAML Message Info");

this.invalidate();
this.updateUI();
setLayout(new BorderLayout());
add(tabbedPane);

invalidate();
updateUI();
}

public RawEditor getTextEditorAction() {
Expand Down
Loading

0 comments on commit bb55cb1

Please sign in to comment.