Location Research Breakthrough Possible @S-Logix pro@slogix.in

Detecting SAML Response Manipulation Attacks Against Shibboleth Identity Provider Through Assertion Signature Validation and Authentication-Event Monitoring

Description

Organizations commonly use centralized Identity and Access Management systems to provide single sign-on (SSO) authentication across multiple enterprise applications. SAML (Security Assertion Markup Language) is widely used to exchange authentication and authorization information between an Identity Provider (IdP) and Service Provider (SP).

Shibboleth Identity Provider is an open-source identity federation platform that supports SAML-based authentication and authorization.

SAML authentication depends on trusted assertions issued by the Identity Provider. If a SAML response or assertion is modified and the Service Provider does not correctly validate its digital signature, an attacker may attempt to manipulate identity information such as the authenticated user or authorization attributes.

In this use case, a controlled enterprise-like SSO environment is created using Ubuntu virtual machines. Shibboleth Identity Provider is configured as the trusted Identity Provider, while a controlled SAML Service Provider represents the protected enterprise application. Kali Linux is used as the authorized security-testing environment.

A controlled SAML Response Manipulation attack simulation is performed using laboratory authentication responses. The objective is to determine whether the Service Provider correctly validates the SAML assertion signature and rejects modified authentication information.

No real enterprise identity, production SSO system, or unauthorized account is used.

The security architecture enforces SAML assertion signature validation and validates important identity attributes before establishing an authenticated session.

Authentication events are also monitored to identify abnormal or rejected SAML authentication activity.

The complete defensive workflow is: SAML Authentication → Signed SAML Response → Controlled Response Manipulation → Assertion Validation → Signature Verification → Manipulation Detection → Security Alert → Authentication Rejection → Identity Protection → Validation.

Existing Security Problem

Application: Shibboleth Identity Provider

Shibboleth Identity Provider provides centralized SAML-based identity authentication for applications participating in an identity federation.

During a normal SAML authentication flow, the Identity Provider generates a signed SAML response containing authentication information and identity attributes.

Existing Problem:

SAML authentication becomes vulnerable when a Service Provider accepts identity information without properly validating the associated digital signature and trust relationship. An attacker who obtains or manipulates a SAML response may attempt to modify identity-related information before submitting it to the protected Service Provider.

The security problem is therefore:

Legitimate SAML Authentication → Signed SAML Response → SAML Response Obtained → Response / Assertion Manipulation → Modified Identity Information → Service Provider Processes Response → Potential Unauthorized Authentication

The proposed solution introduces SAML digital-signature validation, trusted issuer validation, assertion validation, audience validation, timestamp validation, authentication-event monitoring, and automated security alerting.

Attack

Specific Attack: SAML Response Manipulation

The attack scenario simulates manipulation of a SAML authentication response within the controlled laboratory environment. A legitimate SAML authentication response is generated by the Shibboleth Identity Provider for a controlled test account. The response is then subjected to controlled modification to determine whether the protected Service Provider detects the integrity violation. The assessment focuses on whether the Service Provider validates the SAML signature and other security-critical assertion properties before establishing an authenticated session.

The assessment focuses on the integrity of the SAML response, digital-signature validation, trusted issuer, audience, recipient, destination, assertion timestamp, identity attributes, Service Provider authentication decision, authentication rejection, and security-event generation.

Attack Behavior:
Controlled User
Shibboleth Authentication
Signed SAML Response
Controlled Response Modification
Modified SAML Assertion
Service Provider Receives Response
SAML Signature Validation
Invalid Signature Detected
Authentication Rejected
Security Alert
Identity Protection

Security Concept

SAML Assertion Integrity and Trust Validation:

The primary security concept is SAML assertion integrity validation.

The Service Provider must not trust identity information simply because the SAML response has a valid XML structure. The response must be validated against the trusted Identity Provider and the expected security requirements. A SAML response must satisfy the configured trust and integrity requirements before the Service Provider establishes an authenticated identity.

The secure processing flow is:

SAML Response
XML Structure Validation
Signature Validation
Trusted Issuer Validation
Audience Validation
Recipient / Destination Validation
Timestamp Validation
Identity Attribute Validation
Authentication Decision
Security Monitoring

Defensive Mechanism

SAML Digital-Signature Validation

The Service Provider validates the digital signature associated with the SAML response or assertion.

Purpose

Ensure that the authentication response was issued by the trusted Identity Provider and has not been modified.

Trusted Certificate Validation

The Service Provider validates the signing certificate against the configured federation trust.

Purpose

Prevent responses signed by an untrusted entity from being accepted.

Issuer Validation

The Service Provider validates the SAML issuer.

Purpose

Ensure that the authentication assertion originates from the expected Identity Provider.

Audience Validation

The Service Provider validates the intended audience of the SAML assertion.

Purpose

Prevent an assertion intended for another application from being accepted.

Recipient and Destination Validation

The Service Provider validates the expected recipient and destination information.

Purpose

Ensure that the assertion is being delivered to the intended SAML endpoint.

Assertion Timestamp Validation

The Service Provider validates the SAML assertion's validity period.

Purpose

Prevent expired or prematurely valid assertions from being accepted.

Identity Attribute Validation

Required identity attributes are validated before the authenticated identity is established.

Purpose

Prevent incomplete or unexpected identity information from being trusted.

SAML Authentication Monitoring

SAML authentication events are monitored for abnormal or rejected authentication activity.

Purpose

Identify repeated or suspicious SAML authentication behavior.

Security Alerting

Security alerts are generated when SAML validation failures or suspicious authentication conditions are detected.

Purpose

Provide visibility into potential SAML manipulation attempts.

Authentication Rejection

Invalid or manipulated SAML responses are rejected before an authenticated application session is created.

Purpose

Prevent unauthorized authentication through modified assertions.

Identity Protection

The affected laboratory identity and SAML client configuration are reviewed after a suspicious event.

Purpose

Prevent repeated identity-security issues.

Post-Remediation Validation

Legitimate SAML authentication is tested after the security controls are applied.

Purpose

Confirm that valid SSO authentication remains functional.

Security Tools

Identity Provider: Shibboleth Identity Provider

Shibboleth Identity Provider provides the centralized SAML authentication service.

Purpose
  • Authenticate laboratory users.
  • Generate SAML authentication responses.
  • Sign SAML assertions.
  • Manage identity attributes.
  • Generate authentication events.

SAML Service Provider: Shibboleth Service Provider

Shibboleth Service Provider represents the protected enterprise application receiving SAML authentication responses.

Purpose
  • Receive SAML responses.
  • Validate SAML signatures.
  • Validate assertion conditions.
  • Establish authenticated application sessions.
  • Reject invalid authentication assertions.

SAML Testing Tool: SAML Raider

SAML Raider is used within the controlled laboratory to inspect and test SAML messages.

Purpose
  • Inspect SAML responses.
  • Analyze SAML assertions.
  • Support controlled SAML security testing.
  • Modify laboratory SAML messages for validation testing.
  • Verify whether manipulated responses are rejected.

XML Processing Tool: xmllint

xmllint is used to inspect and validate the XML structure of laboratory SAML responses.

Purpose
  • Parse SAML XML.
  • Validate XML structure.
  • Inspect assertion elements.
  • Identify modified XML fields.
  • Support investigation of SAML validation failures.

Identity Event Analysis: OpenSearch

OpenSearch is used as the centralized log-analysis platform for the laboratory.

Purpose
  • Collect identity-related security events.
  • Search SAML authentication activity.
  • Analyze rejected authentication attempts.
  • Correlate authentication events.
  • Support investigation and incident timelines.

Security Testing Platform: Kali Linux

Kali Linux provides the controlled security-testing environment.

Purpose
  • Execute authorized SAML security tests.
  • Run SAML Raider.
  • Analyze controlled authentication traffic.
  • Validate the SAML security controls.

Target Platform: Ubuntu Linux

Ubuntu hosts the laboratory Identity Provider and Service Provider components.

Purpose
  • Run Shibboleth services.
  • Maintain controlled laboratory identities.
  • Generate SAML authentication activity.
  • Apply SAML security configurations.

Virtualization Platform: VirtualBox

VirtualBox provides the isolated infrastructure.

Purpose
  • Host the Ubuntu SAML environment.
  • Host the Kali Linux testing environment.
  • Provide isolated networking.
  • Prevent testing activity from affecting production systems.

Process

STEP 01

Prepare the Virtualized SAML Security Environment

  • Create an isolated cybersecurity laboratory using VirtualBox.
  • Configure Ubuntu as the SAML Identity Provider and Service Provider environment.
  • Configure Kali Linux as the security-testing system.
  • Configure an isolated network between the virtual machines.
  • Verify communication between the systems.
  • Ensure that only laboratory identities and test data are used.
  • Confirm that the environment is separated from production systems.
Tools: VirtualBox + Ubuntu + Kali Linux
STEP 02

Deploy Shibboleth Identity Provider

  • Install the Shibboleth Identity Provider on Ubuntu.
  • Configure the laboratory identity-provider environment.
  • Configure the SAML federation settings.
  • Configure the trusted signing certificate.
  • Start the Shibboleth Identity Provider.
  • Verify that the Identity Provider is operational.
  • Confirm that SAML authentication endpoints are available.
Tools: Shibboleth Identity Provider + Ubuntu
STEP 03

Configure Controlled Identity Accounts

  • Create controlled laboratory user accounts.
  • Configure authentication credentials for the test identities.
  • Create a dedicated SAML test account.
  • Create a separate administrative laboratory account.
  • Configure the required identity attributes.
  • Verify successful authentication.
  • Ensure that no real enterprise identities are used.
Tools: Shibboleth Identity Provider
STEP 04

Deploy and Configure the SAML Service Provider

  • Install the Shibboleth Service Provider.
  • Configure the Service Provider to trust the laboratory Identity Provider.
  • Import the trusted Identity Provider metadata.
  • Configure the SAML signing certificate.
  • Configure the protected application endpoint.
  • Configure the expected audience and recipient values.
  • Verify successful SAML SSO.
Tools: Shibboleth Service Provider + Ubuntu
STEP 05

Establish the Normal SAML Authentication Baseline

  • Authenticate using the controlled laboratory account.
  • Initiate the normal SAML SSO workflow.
  • Capture the legitimate SAML response within the laboratory.
  • Verify that the Service Provider accepts the valid response.
  • Record the normal SAML issuer.
  • Record the expected audience and destination.
  • Review the resulting authentication event.
Tools: Shibboleth + SAML Service Provider
STEP 06

Configure SAML Assertion Validation

  • Enable SAML digital-signature validation.
  • Configure the trusted Identity Provider certificate.
  • Configure issuer validation.
  • Configure audience validation.
  • Configure recipient validation.
  • Configure destination validation.
  • Configure assertion timestamp validation.
  • Verify that legitimate SAML responses remain accepted.
Tools: Shibboleth Service Provider
STEP 07

Configure SAML Authentication Event Monitoring

  • Enable relevant authentication events.
  • Record successful SAML authentication.
  • Record rejected SAML authentication.
  • Record validation failures where supported.
  • Forward relevant events to OpenSearch.
  • Configure searchable event fields.
  • Ensure that sensitive authentication information is not unnecessarily stored.
Tools: Shibboleth + OpenSearch
STEP 08

Configure SAML Manipulation Detection

  • Define conditions representing suspicious SAML validation failures.
  • Monitor repeated SAML signature-validation failures.
  • Monitor unexpected issuer information.
  • Monitor audience or destination mismatches.
  • Monitor invalid assertion timestamps.
  • Correlate related authentication events.
  • Configure an appropriate security-alert threshold.
Tools: OpenSearch
STEP 09

Capture a Controlled SAML Response

  • Authenticate using the designated laboratory account.
  • Generate a legitimate SAML authentication response.
  • Capture the response within the isolated environment.
  • Preserve the original response for comparison.
  • Verify that the response is associated only with the laboratory identity.
  • Confirm that no production authentication data is involved.
  • Record the normal response structure.
Tools: SAML Raider + Kali Linux + Shibboleth
STEP 10

Perform Controlled SAML Response Manipulation

  • Select the controlled laboratory SAML response.
  • Modify a security-relevant assertion field within the laboratory response.
  • Preserve the test response structure for analysis.
  • Submit the modified response to the laboratory Service Provider.
  • Observe the Service Provider's authentication decision.
  • Record the resulting validation behavior.
  • Stop the simulation after the required test event is generated.
Tools: SAML Raider + Kali Linux
STEP 11

Validate Digital-Signature Protection

  • Review the modified SAML response.
  • Compare it with the original legitimate response.
  • Verify that the response content has changed.
  • Submit the modified response to the Service Provider.
  • Confirm that the digital signature no longer corresponds to the modified content.
  • Verify that the Service Provider rejects the response.
  • Record the signature-validation failure.
Tools: SAML Raider + Shibboleth Service Provider
STEP 12

Validate Assertion Security Controls

  • Review the assertion issuer.
  • Review the audience.
  • Review the recipient and destination.
  • Review the assertion validity period.
  • Verify that the Service Provider validates the configured SAML conditions.
  • Test controlled invalid assertion conditions.
  • Confirm that invalid assertions are rejected.
Tools: Shibboleth Service Provider + xmllint
STEP 13

Generate the Security Alert

  • Allow the SAML validation failure to reach OpenSearch.
  • Identify the affected Service Provider.
  • Identify the laboratory identity involved.
  • Identify the SAML validation failure.
  • Record the authentication timestamp.
  • Record the relevant issuer, audience, or signature-validation information.
  • Verify that the configured security alert is generated.
Tools: OpenSearch
STEP 14

Investigate the SAML Manipulation Activity

  • Open the generated security event.
  • Identify the affected laboratory identity.
  • Review the original legitimate authentication event.
  • Review the manipulated SAML authentication attempt.
  • Compare the original and modified assertion properties.
  • Review the signature-validation result.
  • Review issuer, audience, recipient, and timestamp information.
  • Determine whether the activity represents SAML Response Manipulation.
Tools: OpenSearch + SAML Raider + xmllint
STEP 15

Apply Identity Protection

  • Restrict the affected laboratory identity if required by the response policy.
  • Terminate the affected laboratory SSO session where supported.
  • Review the identity-provider account.
  • Review the SAML client configuration.
  • Verify the trusted signing certificate configuration.
  • Remove unnecessary identity attributes or permissions where applicable.
  • Confirm that the identity environment remains protected.
Tools: Shibboleth Identity Provider + Ubuntu
STEP 16

Validate Manipulated-Response Rejection

  • Repeat the controlled SAML manipulation test.
  • Submit the modified laboratory response.
  • Verify that the Service Provider rejects the manipulated response.
  • Confirm that no authenticated session is established.
  • Review the corresponding security event.
  • Confirm that the validation failure is recorded.
  • Verify that the protected application remains inaccessible through the manipulated response.
Tools: SAML Raider + Shibboleth Service Provider + OpenSearch
STEP 17

Validate Legitimate SAML Authentication

  • Authenticate again using the authorized laboratory account.
  • Generate a new legitimate SAML response.
  • Submit the valid response to the Service Provider.
  • Verify that the digital signature is accepted.
  • Verify issuer, audience, recipient, and timestamp validation.
  • Confirm that the legitimate SSO session is established successfully.
  • Review OpenSearch to confirm normal authentication behavior.
Tools: Shibboleth + OpenSearch
STEP 18

Perform Final SAML Response Manipulation Detection and Response Validation

  • Repeat the controlled SAML Response Manipulation assessment.
  • Verify that the manipulated response is detected.
  • Verify that digital-signature validation rejects the modified assertion.
  • Verify that invalid issuer, audience, recipient, or timestamp conditions are rejected.
  • Verify that the security event is generated.
  • Confirm that the configured identity-protection response is applied.
  • Verify that the manipulated response cannot establish an authenticated session.
  • Confirm that legitimate SAML authentication continues to function.
  • Review the complete authentication and security-event timeline.
  • Document the final detection, protection, and validation results.
Tools: Shibboleth Identity Provider + Shibboleth Service Provider + SAML Raider + OpenSearch + Kali Linux + Ubuntu

Outcome

  1. SAML Response Manipulation behavior is successfully simulated using controlled Shibboleth laboratory identities and authentication responses.
  2. Shibboleth Identity Provider provides centralized SAML-based authentication for the controlled IAM environment.
  3. SAML digital signatures are validated before authentication is accepted, preventing modified assertions from being trusted.
  4. Issuer, audience, recipient, destination, and assertion timestamp validation are enforced according to the configured SAML security policy.
  5. Manipulated SAML authentication responses are detected and rejected, preventing unauthorized authentication through modified identity information.
  6. SAML authentication and validation failures are centrally monitored through OpenSearch for investigation and security analysis.
  7. Security events identify the affected identity, Service Provider, validation condition, and authentication timeline, supporting investigation of suspected SAML manipulation.
  8. The affected laboratory identity or SSO session can be protected according to the configured response policy, reducing the possibility of continued unauthorized access.
  9. Legitimate SAML authentication continues to function after remediation, confirming that the security controls do not unnecessarily disrupt valid SSO access.
  10. The complete SAML Response Manipulation detection, assertion signature validation, trust verification, authentication-event monitoring, security alerting, identity protection, authentication rejection, recovery, and post-remediation validation workflow is successfully demonstrated.
← Previous Project
Project 5 of 5