Skip to content

Commit a36c3c3

Browse files
authored
Merge pull request #89 from d0ge/libxml2
CVE-2025-23369
2 parents fc1d967 + 3acce56 commit a36c3c3

File tree

9 files changed

+481
-27
lines changed

9 files changed

+481
-27
lines changed

BappManifest.bmf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ Uuid: c61cfa893bb14db4b01775554f7b802e
22
ExtensionType: 1
33
Name: SAML Raider
44
RepoName: saml-raider
5-
ScreenVersion: 2.2.1
6-
SerialVersion: 20
5+
ScreenVersion: 2.3.0
6+
SerialVersion: 21
77
MinPlatformVersion: 0
88
ProOnly: False
99
Author: Roland Bischofberger / Emanuel Duss / Tobias Hort-Giess
1010
ShortDescription: Provides a SAML message editor and a certificate management tool to help with testing SAML infrastructures.
11-
EntryPoint: build/libs/saml-raider-2.2.1.jar
11+
EntryPoint: build/libs/saml-raider-2.3.0.jar
1212
BuildCommand: ./gradlew jar
1313
SupportedProducts: Pro, Community

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Don't forget to rate our extension with as many stars you like :smile:.
7979
### Manual Installation
8080

8181
First, download the latest SAML Raider version:
82-
[saml-raider-2.2.1.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.2.1/saml-raider-2.2.1.jar).
82+
[saml-raider-2.3.0.jar](https://github.com/SAMLRaider/SAMLRaider/releases/download/v2.3.0/saml-raider-2.3.0.jar).
8383
Then, start Burp Suite and click in the `Extensions` tab on `Add`. Choose the
8484
SAML Raider JAR file to install it and you are ready to go.
8585

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "java-library"
33
}
44

5-
version = "2.2.1"
5+
version = "2.3.0"
66

77
repositories {
88
mavenCentral()

src/main/java/application/SamlTabController.java

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,17 @@
1010
import burp.api.montoya.ui.Selection;
1111
import burp.api.montoya.ui.editor.RawEditor;
1212
import burp.api.montoya.ui.editor.extension.ExtensionProvidedHttpRequestEditor;
13+
import gui.CVEHelpWindow;
1314
import gui.SamlMain;
1415
import gui.SamlPanelInfo;
1516
import gui.SignatureHelpWindow;
1617
import gui.XSWHelpWindow;
18+
import helpers.CVE_2025_23369;
1719
import helpers.XMLHelpers;
1820
import helpers.XSWHelpers;
19-
import model.BurpCertificate;
20-
import org.w3c.dom.*;
21-
import org.xml.sax.SAXException;
22-
23-
import javax.xml.crypto.MarshalException;
24-
import javax.xml.crypto.dsig.XMLSignatureException;
25-
import javax.xml.parsers.ParserConfigurationException;
26-
import java.awt.*;
21+
import java.awt.Component;
22+
import java.awt.Desktop;
23+
import java.awt.Toolkit;
2724
import java.awt.datatransfer.Clipboard;
2825
import java.awt.datatransfer.StringSelection;
2926
import java.io.File;
@@ -41,6 +38,16 @@
4138
import java.util.List;
4239
import java.util.Observable;
4340
import java.util.Observer;
41+
import javax.xml.crypto.MarshalException;
42+
import javax.xml.crypto.dsig.XMLSignatureException;
43+
import javax.xml.parsers.ParserConfigurationException;
44+
import model.BurpCertificate;
45+
import org.w3c.dom.DOMException;
46+
import org.w3c.dom.Document;
47+
import org.w3c.dom.Element;
48+
import org.w3c.dom.Node;
49+
import org.w3c.dom.NodeList;
50+
import org.xml.sax.SAXException;
4451

4552
import static java.util.Objects.requireNonNull;
4653

@@ -473,6 +480,22 @@ public void showXSWPreview() {
473480
}
474481
}
475482

483+
public void applyCVE() {
484+
try {
485+
var cve = samlGUI.getActionPanel().getSelectedCVE();
486+
switch (cve) {
487+
case CVE_2025_23369.CVE:
488+
samlMessage = CVE_2025_23369.apply(orgSAMLMessage);
489+
textArea.setContents(ByteArray.byteArray(samlMessage));
490+
isEdited = true;
491+
setInfoMessageText("%s applied".formatted(cve));
492+
}
493+
} catch (Exception exc) {
494+
setInfoMessageText(exc.getMessage());
495+
BurpExtender.api.logging().logToError(exc);
496+
}
497+
}
498+
476499
public void applyXSW() {
477500
Document document;
478501
try {
@@ -562,6 +585,13 @@ public void setGUIEditable(boolean editable) {
562585
}
563586
}
564587

588+
public void showCVEHelp() {
589+
var cve = samlGUI.getActionPanel().getSelectedCVE();
590+
var window = new CVEHelpWindow(cve);
591+
window.setLocationRelativeTo(BurpExtender.api.userInterface().swingUtils().suiteFrame());
592+
window.setVisible(true);
593+
}
594+
565595
public void showSignatureHelp() {
566596
var window = new SignatureHelpWindow();
567597
window.setLocationRelativeTo(BurpExtender.api.userInterface().swingUtils().suiteFrame());

src/main/java/gui/CVEHelpWindow.java

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
package gui;
2+
3+
import helpers.CVE_2025_23369;
4+
import java.awt.BorderLayout;
5+
import java.io.Serial;
6+
import javax.swing.JFrame;
7+
import javax.swing.JScrollPane;
8+
import javax.swing.JTextPane;
9+
10+
public class CVEHelpWindow extends JFrame {
11+
12+
@Serial
13+
private static final long serialVersionUID = 1L;
14+
15+
public CVEHelpWindow(String cve) {
16+
String description;
17+
if (cve.equals(CVE_2025_23369.CVE)) {
18+
description = """
19+
<ol>
20+
<li>
21+
You need a SAMLResponse with Signed Message & Assertion that is valid and accepted by the server.
22+
</li>
23+
<li>
24+
Apply the CVE to the SAMLResponse without any prior changes. See whether the
25+
SAMLResponse is still accepted. If so, this is an indicator that the server is
26+
vulnerable.
27+
</li>
28+
<li>
29+
After the CVE has been applied you can try to change one of the fake assertions attribute
30+
to bypass authentication. The fake assertion ID is constructed by appending "ffff"
31+
to the original assertion ID. This modified assertion can be found at the end of the XML document.
32+
</li>
33+
</ol>
34+
""";
35+
} else {
36+
description = "no description";
37+
}
38+
39+
var text = """
40+
<h1>%s</h1>
41+
%s
42+
""";
43+
44+
text = text.formatted(cve, description);
45+
46+
var textPane = new JTextPane();
47+
textPane.setContentType("text/html");
48+
textPane.setEditable(false);
49+
textPane.setCaret(null);
50+
textPane.setText(text);
51+
52+
var scrollPane = new JScrollPane(textPane);
53+
54+
setTitle(cve + " Help");
55+
setSize(1200, 720);
56+
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
57+
setLayout(new BorderLayout());
58+
add(scrollPane, BorderLayout.CENTER);
59+
}
60+
}

src/main/java/gui/SamlPanelAction.java

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package gui;
22

33
import application.SamlTabController;
4+
import helpers.CVE_2025_23369;
45
import java.awt.BorderLayout;
56
import java.awt.Component;
67
import java.awt.GridBagConstraints;
@@ -11,7 +12,16 @@
1112
import java.util.HashMap;
1213
import java.util.List;
1314
import java.util.Optional;
14-
import javax.swing.*;
15+
import javax.swing.BorderFactory;
16+
import javax.swing.DefaultComboBoxModel;
17+
import javax.swing.JButton;
18+
import javax.swing.JComboBox;
19+
import javax.swing.JLabel;
20+
import javax.swing.JOptionPane;
21+
import javax.swing.JPanel;
22+
import javax.swing.JScrollPane;
23+
import javax.swing.JTextField;
24+
import javax.swing.SwingUtilities;
1525
import javax.swing.border.EmptyBorder;
1626
import model.BurpCertificate;
1727
import net.miginfocom.swing.MigLayout;
@@ -34,6 +44,10 @@ public class SamlPanelAction extends JPanel {
3444
private final JButton btnTestXXE = new JButton("Test XXE");
3545
private final JButton btnTestXSLT = new JButton("Test XSLT");
3646

47+
private final JComboBox<String> cmbboxCVE = new JComboBox<>();
48+
private final JButton btnCVEApply = new JButton("Apply CVE");
49+
private final JButton btnCVEHelp = new JButton("Help");
50+
3751
private final JButton btnSignatureHelp = new JButton("Help");
3852
private final JComboBox<BurpCertificate> cmbboxCertificate = new JComboBox<>();
3953
private final JButton btnSignatureRemove = new JButton("Remove Signatures");
@@ -92,6 +106,21 @@ private void initialize() {
92106
xmlAttacksPanel.add(btnTestXXE, "split 2");
93107
xmlAttacksPanel.add(btnTestXSLT, "wrap");
94108

109+
cmbboxCVE.setModel(new DefaultComboBoxModel<>(new String[]{
110+
CVE_2025_23369.CVE
111+
}));
112+
113+
btnCVEApply.addActionListener(event -> controller.applyCVE());
114+
115+
btnCVEHelp.addActionListener(event -> controller.showCVEHelp());
116+
117+
var cvePanel = new JPanel();
118+
cvePanel.setBorder(BorderFactory.createTitledBorder("CVEs"));
119+
cvePanel.setLayout(new MigLayout());
120+
cvePanel.add(cmbboxCVE);
121+
cvePanel.add(btnCVEApply);
122+
cvePanel.add(btnCVEHelp, "wrap");
123+
95124
btnSignatureHelp.addActionListener(event -> controller.showSignatureHelp());
96125

97126
btnSignatureRemove.addActionListener(event -> controller.removeSignature());
@@ -117,6 +146,7 @@ private void initialize() {
117146
actionPanels.setLayout(new MigLayout());
118147
actionPanels.add(samlMessagePanel, actionPanelConstraints);
119148
actionPanels.add(xswAttacksPanel, actionPanelConstraints);
149+
actionPanels.add(cvePanel, actionPanelConstraints);
120150
actionPanels.add(xmlAttacksPanel, actionPanelConstraints);
121151
actionPanels.add(signatureAttacksPanel, actionPanelConstraints);
122152

@@ -149,6 +179,10 @@ public String getSelectedXSW() {
149179
return (String) cmbboxXSW.getSelectedItem();
150180
}
151181

182+
public String getSelectedCVE() {
183+
return (String) cmbboxCVE.getSelectedItem();
184+
}
185+
152186
public void disableControls() {
153187
cmbboxCertificate.setEnabled(false);
154188
cmbboxXSW.setEnabled(false);
@@ -164,6 +198,8 @@ public void disableControls() {
164198
btnMatchAndReplace.setEnabled(false);
165199
btnTestXXE.setEnabled(false);
166200
btnTestXSLT.setEnabled(false);
201+
cmbboxCVE.setEnabled(false);
202+
btnCVEApply.setEnabled(false);
167203
this.revalidate();
168204
}
169205

@@ -182,6 +218,8 @@ public void enableControls() {
182218
btnMatchAndReplace.setEnabled(true);
183219
btnTestXXE.setEnabled(true);
184220
btnTestXSLT.setEnabled(true);
221+
cmbboxCVE.setEnabled(true);
222+
btnCVEApply.setEnabled(true);
185223
this.revalidate();
186224
}
187225

0 commit comments

Comments
 (0)