XML signature wrapping attacks

75 views
Skip to first unread message

Ayush Agrawal

unread,
May 13, 2022, 5:18:00 AM5/13/22
to SimpleSAMLphp
Hi,

Basic Background:
  •  Implemented SimpleSamlPhp version 1.18.7  on Yii1 framework as a service provider.
  • While doing SSO I am able to successfully login into the system.
I want to validate SAML response return from IDP for XML Signature wrapping attack.
  • XSW1 – Applies to SAML Response messages. Add a cloned unsigned copy of the Response after the existing signature.

image_0.png

Tim van Dijen

unread,
May 16, 2022, 2:47:52 AM5/16/22
to SimpleSAMLphp
Hi Ayush,

You don't have to worry about that.. Our SAML-library is hardenened against signature wrapping attacks.

- Tim

Op vrijdag 13 mei 2022 om 11:18:00 UTC+2 schreef Ayush Agrawal:

Ayush Agrawal

unread,
May 16, 2022, 3:56:39 AM5/16/22
to SimpleSAMLphp
Hi,

Thanks you so much for your response, Actually I am successfully able to login after applying the XZW1 type assertion from the burp suit.
Which I had mentioned above. So I want to manually add the validation which check the SAML response for multiple assertion. 
Apart from the above it would be great If you help me out, How to decode into XML form from the encoded SAML response via PHP.


Tim van Dijen

unread,
May 16, 2022, 5:54:03 AM5/16/22
to SimpleSAMLphp

But are you able to impersonate someone else?
Op maandag 16 mei 2022 om 09:56:39 UTC+2 schreef Ayush Agrawal:

Ayush Agrawal

unread,
May 16, 2022, 6:00:41 AM5/16/22
to SimpleSAMLphp
While trying to impersonate someone else it won't let me logged in.

Tim van Dijen

unread,
May 16, 2022, 6:02:26 AM5/16/22
to SimpleSAMLphp
Good, then there is no vulnerability..

Op maandag 16 mei 2022 om 12:00:41 UTC+2 schreef Ayush Agrawal:

Ayush Agrawal

unread,
May 16, 2022, 6:03:12 AM5/16/22
to SimpleSAMLphp
I am manipulating the Red color Assertionvalue DOM in the below image. 
image_0.png

Ayush Agrawal

unread,
May 16, 2022, 6:04:54 AM5/16/22
to SimpleSAMLphp
Thank you for your such a quick response, So your suggesting that I am good to go no need to add additional validation for this multiple assertion.

Tim van Dijen

unread,
May 16, 2022, 6:09:05 AM5/16/22
to SimpleSAMLphp
> Thank you for your such a quick response
You are welcome, but you didn't really leave me a choice when discussing possible security vulnerabilities on a public mailing list ;-)

Any way, yes you are good to go and you don't have to perform additional validations!

Op maandag 16 mei 2022 om 12:04:54 UTC+2 schreef Ayush Agrawal:
Reply all
Reply to author
Forward
0 new messages