-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalize page header for SSTI, SAML, SSI
- Loading branch information
1 parent
1a3e605
commit a338b2f
Showing
13 changed files
with
105 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# SAML Injection | ||
|
||
> Security Assertion Markup Language (SAML) is an open standard that allows security credentials to be shared by multiple computers across a network. When using SAML-based Single Sign-On (SSO), three distinct parties are involved. There is a user (the so-called principal), an IDentity Provider (IDP), and a cloud application Service Provider (SP). - centrify | ||
> SAML (Security Assertion Markup Language) is an open standard for exchanging authentication and authorization data between parties, in particular, between an identity provider and a service provider. While SAML is widely used to facilitate single sign-on (SSO) and other federated authentication scenarios, improper implementation or misconfiguration can expose systems to various vulnerabilities. | ||
|
||
## Summary | ||
|
||
* [Tools](#tools) | ||
* [Authentication Bypass](#authentication-bypass) | ||
* [Methodology](#methodology) | ||
* [Invalid Signature](#invalid-signature) | ||
* [Signature Stripping](#signature-stripping) | ||
* [XML Signature Wrapping Attacks](#xml-signature-wrapping-attacks) | ||
|
@@ -21,14 +22,16 @@ | |
- [ZAP Addon/SAML Support](https://www.zaproxy.org/docs/desktop/addons/saml-support/) - Allows to detect, show, edit, and fuzz SAML requests. | ||
|
||
|
||
## Authentication Bypass | ||
## Methodology | ||
|
||
A SAML Response should contain the `<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"`. | ||
|
||
|
||
### Invalid Signature | ||
|
||
Signatures which are not signed by a real CA are prone to cloning. Ensure the signature is signed by a real CA. If the certificate is self-signed, you may be able to clone the certificate or create your own self-signed certificate to replace it. | ||
|
||
|
||
### Signature Stripping | ||
|
||
> [...]accepting unsigned SAML assertions is accepting a username without checking the password - @ilektrojohn | ||
|
@@ -66,6 +69,7 @@ Example of SAML assertion where `NameID=admin` without signature. | |
</saml2p:Response> | ||
``` | ||
|
||
|
||
### XML Signature Wrapping Attacks | ||
|
||
XML Signature Wrapping (XSW) attack, some implementations check for a valid signature and match it to a valid assertion, but do not check for multiple assertions, multiple signatures, or behave differently depending on the order of assertions. | ||
|
@@ -126,6 +130,7 @@ Researchers have noticed that if an attacker inserts a comment inside the userna | |
``` | ||
Where `[email protected]` is the first part of the username, and `.evil.com` is the second. | ||
|
||
|
||
### XML External Entity | ||
|
||
An alternative exploitation would use `XML entities` to bypass the signature verification, since the content will not change, except during XML parsing. | ||
|
@@ -187,6 +192,7 @@ Picture from [http://sso-attacks.org/XSLT_Attack](http://sso-attacks.org/XSLT_At | |
</ds:Signature> | ||
``` | ||
|
||
|
||
## References | ||
|
||
- [Attacking SSO: Common SAML Vulnerabilities and Ways to Find Them - Jem Jensen - March 7, 2017](https://blog.netspi.com/attacking-sso-common-saml-vulnerabilities-ways-find/) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.