Skip to content

Commit

Permalink
Merge pull request #73 from CompassSecurity/thort/v2.0.1
Browse files Browse the repository at this point in the history
Thort/v2.0.1
  • Loading branch information
emanuelduss authored Sep 11, 2024
2 parents 317fcba + 34f74be commit fcec0fc
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 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.0
ScreenVersion: 2.0.1
SerialVersion: 15
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.0.jar
EntryPoint: build/libs/saml-raider-2.0.1.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.0.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.0.0/saml-raider-2.0.0.jar).
[saml-raider-2.0.1.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.0.1/saml-raider-2.0.1.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
4 changes: 2 additions & 2 deletions 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.0"
version = "2.0.1"

repositories {
mavenCentral()
Expand Down Expand Up @@ -46,4 +46,4 @@ jar {

test {
useJUnitPlatform()
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
com-google-guava = "33.2.1-jre"
com-miglayout = "3.7.4"
com-sun-xml-security-xml-security-impl = "1.0"
net-portswigger-burp-extensions-montoya-api = "2023.12.1"
net-portswigger-burp-extensions-montoya-api = "2024.7"
org-apache-santuario-xmlsec = "2.1.7"
org-bouncycastle-bcpkix-jdk15on = "1.52"
org-junit-jupiter = "5.10.2"
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/application/SamlTabController.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,13 @@ public void setRequestResponse(HttpRequestResponse requestResponse) {
}

private void setInformationDisplay() {
samlGUI.getTextEditorInformation().setContents(ByteArray.byteArray(""));
SamlPanelInfo infoPanel = samlGUI.getInfoPanel();
infoPanel.clearAll();

try {
Document document = xmlHelpers.getXMLDocumentOfSAMLMessage(samlMessage);
textEditorInformation.setContents(ByteArray.byteArray(xmlHelpers.getStringOfDocument(xmlHelpers.getXMLDocumentOfSAMLMessage(samlMessage), 2, true).getBytes()));
NodeList assertions = xmlHelpers.getAssertions(document);
if (assertions.getLength() > 0) {
Node assertion = assertions.item(0);
Expand All @@ -292,7 +294,6 @@ private void setInformationDisplay() {
infoPanel.setSubjectConfNotAfter(xmlHelpers.getSubjectConfNotAfter(assertion));
infoPanel.setSignatureAlgorithm(xmlHelpers.getSignatureAlgorithm(assertion));
infoPanel.setDigestAlgorithm(xmlHelpers.getDigestAlgorithm(assertion));
textEditorInformation.setContents(ByteArray.byteArray(xmlHelpers.getStringOfDocument(xmlHelpers.getXMLDocumentOfSAMLMessage(samlMessage), 2, true).getBytes()));
} else {
assertions = xmlHelpers.getEncryptedAssertions(document);
Node assertion = assertions.item(0);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gui/SamlMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ private void initializeUI() {
panelActionBottom.setLayout(new BorderLayout(0, 0));
textEditorAction = BurpExtender.api.userInterface().createRawEditor();
textEditorAction.setContents(ByteArray.byteArray("<SAMLRaiderFailureInInitialization></SAMLRaiderFailureInInitialization>"));
textEditorAction.setEditable(false);
panelActionBottom.add(textEditorAction.uiComponent(), BorderLayout.CENTER);

JSplitPane splitPaneInformation = new JSplitPane();
Expand All @@ -62,7 +63,6 @@ private void initializeUI() {
panelInformationBottom.setLayout(new BorderLayout(0, 0));
textEditorInformation = BurpExtender.api.userInterface().createRawEditor();
textEditorInformation.setContents(ByteArray.byteArray(""));
textEditorAction.setEditable(false);
panelInformationBottom.add(textEditorInformation.uiComponent(), BorderLayout.CENTER);

JTabbedPane tabbedPane = new JTabbedPane();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,10 @@ public void signatureValueIsCorrect() throws IOException, ParseException, Certif
@Test
public void exportedCertificateHashIsCorrect(@TempDir Path tempDir) throws IOException, KeyStoreException, NoSuchAlgorithmException, CertificateException {
String outputFile = tempDir.resolve("exported.pem").toString();

this.certificateTabController.exportCertificate(this.certificate, outputFile);
String outputExpected = "-----BEGIN CERTIFICATE-----MIIGJjCCBQ6gAwIBAgIUTWsBgOGCuRA3PeIxfJJ1lHAuiTUwDQYJKoZIhvcNAQEFBQAwazELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHzAdBgNVBAsTFnd3dy5xdW92YWRpc2dsb2JhbC5jb20xIDAeBgNVBAMTF1F1b1ZhZGlzIEdsb2JhbCBTU0wgSUNBMB4XDTEyMDgxNTEwNTY0OVoXDTE1MDgxNTEwNTY0OVowgYExCzAJBgNVBAYTAkNIMRMwEQYDVQQIEwpTdC4gR2FsbGVuMRMwEQYDVQQHEwpSYXBwZXJzd2lsMR4wHAYDVQQKExVIb2Noc2NodWxlIFJhcHBlcnN3aWwxEzARBgNVBAsTCklULVN5c3RlbXMxEzARBgNVBAMTCnd3dy5oc3IuY2gwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCZOGior5F+1mhwqlBiIn3IAdURR1XxLYjr1vqwj+o+hrDG6RIbECaA/RG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shAgRUIvifjA7BgNVHR8ENDAyMDCgLqAshipodHRwOi8vY3JsLnF1b3ZhZGlzZ2xvYmFsLmNvbS9xdnNzbGljYS5jcmwwHQYDVR0OBBYEFHjRxyuQCYIPx1gmApOod9ESOMCrMA0GCSqGSIb3DQEBBQUAA4IBAQB07i+XiQxFzCH8BCy7Ri2bR9bnZ4LWXfHScAoxip8s0r396J2DuGSxC1umprjDFOJALDq5cAh/C7h3/EiNGH0xyRk+tHsTv6zRsPuajR1H4oSGTpsQ2tRXUPU22QP+sbdEdV/Wc66j6o0k4vTJltp4Rhk7ger0xZZKPsRYbOag3cO12H8xFGBVvtsqpSb0dQsApDGEo4tldwEb3DDoZb9Xb4fIMFrYKbOGuL0UG3Nb3urnNDeM6199F1n/tiEcXtzMiQR0fJ32IvGtCMthyfH5Qhz1lLTv1B3vHsb1ggI1ggh//jNgmZOLVsx1hw2KEtlcIKZ9I03MsuwQiLHejIy+-----END CERTIFICATE-----";

byte[] outputData = Files.readAllBytes(Paths.get(outputFile));
String outputString = CertificateHelper.byteArrayToString(outputData).replaceAll("\r", "").replace("\n", "");

assertEquals(outputExpected, outputString);
}

Expand Down

0 comments on commit fcec0fc

Please sign in to comment.