SAML Security Test Cases
- Signature Exclusion Attack -Test whether or not the SP accepts an Assertion without a Signature
- Signature Spoofing attack-Test whether SP accepts fake signature or using previously generated/invalid signature
- Signature Wrapping Attack (8 Different Ways)-Test whether or not the SP is susceptible to Signature Wrapping
- XML Injection-Test if can inject malicious code into the SAML response from IDP, allowing them to execute arbitrary code on the SP server.
- XML Entity Expansion (XEE)/XXE-Test whether or not the SP is vulnerable to XML External Entities
- Replay attacks-Test if previously generated SAML response from IDP can be accepted by SP
- Certificate Faking/Self signed certificate-Test whether or not the SP verifies that the Assertion came from a trusted IDP/Test if SP accepts self-signed certificate
- XSLT Injection-Test whether or not the SP is vulnerable to XSLT
- Predictable signature-Test whether IDP generating guessable signature
- SAML message expiration-Test whether SP accepts time expired SAML response from IDP
- Unencrypted communication channel-Test if the secure communication protocol used by IDP and SP or not
- Session Creation-Testing how IDP and SP creates session, ex. Checking if same session id is getting generated during every login.
- Permissive session id creation-Testing if the application initially accepting any pre authentication session ID(SAML token) value set by the user as valid, creates a new session for it
- Session cookie security-Checking if all secure cookie attributes (path, secure, http-only and domain ) are set
- Session Fixation-Testing if pre and post authenticated session IDs (IDP and SP) are same
- Session Timeout-Testing if application has session timeout implemented for users after inactivity/idle time of 15 or 30 mins
- Session Logout-Testing if SP and IDP are invalidating sessions ids after log out. And not being reused
- Session Hijacking/Easily guessable Session IDs-Testing if session can be hijacked via brute forcing/Testing randomness of the session identifier( check for both IDP and SP)
- Assertion/Session invalidation after logout at SP and IDP level-Test if application creates session Id using previously created assertion Id/Session ID
- CSRF-Testing if application is vulnerable to CSRF attack leading to session hijacking
- Concurrent session IDs-Testing if multiple sessions are allowed for single user
- Insecure usage of persistent cookies-Testing if persistent cookies are used and how they are managed, ex checking cookie expiry time etc.
- Sensitive details in cookie-Checking if the cookie contains sensitive details such as USERID
- Force Session Logout On Web Browser Window Close Events-Invalidating the session after closing browser
- Invalidating the session after closing tab of the browser where application is running-Check if the application is Invalidating the session after closing tab of the browser where application is running.
- Force full Browsing/Direct URL Access-Testing if any post authenticated URLs accessible without session ids
- Session ID being Sent in URL of the request-Testing if the application session id is being sent in URL of the request leading to session hijacking
- Storing session id in browser's local storage and clearing after log out-Check if the application is storing session Id at browser's local storage even after authentication
- Manual Session expiration/Logout button-Testing if log out button is present for all the post authentication pages
Comments
Post a Comment