LDAP, OIDC, and SAML Authentication Testing
An authorized engagement covers three business applications. One searches a corporate directory using Lightweight Directory Access Protocol, or LDAP. A modern web application authenticates users through OpenID Connect, or OIDC. A legacy software service uses Security Assertion Markup Language, or SAML, for single sign-on.
A login problem appears in each application, but the evidence isn’t the same. Which tool should you choose, and what would count as a valid finding? The answer can’t come from a memorized list of authentication tools. First, you need to identify the protocol, locate the trust boundary, predict the evidence that protocol should produce, and choose the least disruptive way to test that prediction.
This topic belongs to the authentication-attack objective in PenTest+ PT0-003. The objective joins three different authentication mechanisms with tools for password testing, web-traffic inspection, attack-path analysis, protocol interaction, and credential capture. The complete named inventory is preserved in the companion episode reference. Tool selection still begins with the artifact and decision you need to validate, not with whichever product name is most familiar.
The three protocols also present different kinds of evidence. In an LDAP injection case, the central concern is how an application constructs a directory query from input. The application might accept a username, department, or search value and use it while building a query for the directory. If untrusted input can alter the intended query logic, the weakness concerns input handling and query construction.
The trust boundary sits where user-controlled data crosses into application logic and then influences the directory request. A surprising login response may be an observation, but it doesn’t prove injection by itself. You need evidence connecting a controlled input to a meaningful change in the constructed query or its result.
OIDC is an identity layer built on OAuth 2.0. It uses claims in an ID Token to communicate information about an end user. The important trust relationship is between the component providing identity information and the application relying on that information. The application receives a token containing claims, then uses validated identity information to make an authentication decision.
Testing therefore focuses on the token, the claims the application consumes, and the configuration governing that trust. The question isn’t merely whether a token can be copied, decoded, or changed. It’s whether the relying application accepts identity evidence it shouldn’t accept, or interprets claims in a way that creates an unauthorized result.
SAML communicates authentication, attribute, and authorization information through XML-encoded assertions and related protocols. Here, the service receiving an assertion relies on identity information represented in XML. The meaningful evidence includes the assertion, how the receiving service processes it, and the configuration that defines the trusted relationship.
An assertion that contains a username or role isn’t automatically proof of a weakness. You’d need to determine whether the service accepted an assertion or attribute under conditions that violated the intended trust decision. That distinction keeps you focused on behavior rather than treating the mere presence of identity data as a vulnerability.
Now return to the enterprise with three applications. Before testing, restate the authorized outcome for each target. For the directory-backed application, perhaps the approved goal is to determine whether user-controlled input can change an authentication-related LDAP query.
For the OIDC application, it may be to assess whether the application correctly handles the ID Token and the claims it relies on. For the SAML integration, the goal may be to validate how the service processes an XML assertion from its configured identity relationship. These sound similar because all three affect authentication, but each goal points toward a different artifact and a different verification method.
Next, make a prediction before taking action. If the directory input is handled safely, controlled variations shouldn’t alter query meaning in an unauthorized way. If the OIDC trust decision is working as intended, the application shouldn’t grant an identity merely because token-shaped data contains attractive claims.
If the SAML relationship is correctly enforced, XML that resembles an assertion shouldn’t be enough to produce an unauthorized session. These predictions don’t declare that a specific implementation is secure. They give you a baseline against which you can compare observed behavior.
Then check the engagement constraints. Is the exact application in scope? Are its identity provider and directory dependencies also in scope, or may you only observe their interactions with the application?
Is testing allowed during production hours? Could repeated authentication attempts trigger account controls, service degradation, or an incident response? Does the authorization permit changing a test token or assertion, or only reviewing traffic generated by approved test accounts?
A technically interesting action outside the approved target, timing, or method is still the wrong action. If a trust boundary crosses into a system that isn’t covered, clarification is the next step. Silence isn’t permission to expand the test.
The least disruptive valid action usually begins with observation and comparison. Capture only the evidence allowed by the engagement. Establish what a normal transaction looks like for an approved test identity. Identify whether you’re examining a directory query, an OIDC ID Token and its claims, or an XML-based SAML assertion.
Compare expected behavior with the observed result. If passive evidence or a low-impact controlled variation can establish the condition, there’s no reason to jump immediately to aggressive authentication attempts. Escalate only when the stronger action is authorized, necessary to answer the question, and unlikely to create disproportionate operational impact.
Suppose the directory-backed application returns a broader set of directory results after a test value is submitted. That’s worth investigating, but it isn’t yet a complete finding. The variation could reflect normal search behavior, application-side filtering, a test-data difference, or unsafe query construction. Verify that you used the intended target and the same account context.
Compare a baseline request with the controlled variation. Determine whether the changed result follows the predicted effect of input influencing query logic. If you can’t connect the input to the directory behavior, report the observation and uncertainty rather than upgrading it into a confirmed injection flaw.
The OIDC application requires a different line of reasoning. Start with a legitimate authentication transaction using an approved test account. Identify the ID Token and the claims the application appears to use. Your evidence should help you distinguish the token carrying end-user information from unrelated request values or from some other application artifact.
A decoded token can tell you what claims are represented, but readable content alone doesn’t establish that the application will trust altered content. Likewise, seeing a privileged-looking claim doesn’t prove privilege was granted. The meaningful result is the application’s authentication behavior under a permitted, controlled test, supported by the corresponding token and claim evidence.
For the SAML service, identify the XML assertion involved in the approved test transaction and the receiving service’s response. Keep the assertion connected to the transaction that produced it. If you separate an XML fragment from its source, timing, target, and resulting application behavior, you may end up describing data without proving its security consequence. A useful validation compares normal behavior with one carefully bounded condition and records whether the service accepted or rejected the identity information. If the evidence conflicts, revisit the target, account, configuration, prerequisites, and data quality before deciding that the trust relationship has failed.
A tempting mistake is to place all three cases into one category called token attacks. That loses the mechanism. An OIDC ID Token carries claims in an authentication system built on OAuth 2.0. A SAML assertion is XML-encoded identity information used through SAML protocols.
An LDAP injection flaw concerns untrusted input affecting directory query construction. They may all influence who gets authenticated, but they’re not interchangeable formats or interchangeable weaknesses. Renaming an XML assertion as an ID Token won’t make an OIDC analysis apply to SAML, and finding a suspicious string in a directory input doesn’t establish either kind of identity-token problem.
You can expose that mistaken assumption by asking what artifact would confirm it. If someone claims an OIDC weakness, where is the ID Token, which claims matter to the observed decision, and what did the relying application do? If the claim concerns SAML, where is the XML assertion, what identity information did it communicate, and how did the receiving service respond? If the claim is LDAP injection, what input crossed the boundary, how did the directory-related result change, and what supports the conclusion that query construction was affected? If the available evidence can’t answer the protocol-specific question, the conclusion is premature.
Tool selection follows the same logic. First name the artifact or behavior you must validate. Then choose a tool that can collect or examine that evidence within the approved environment.
For a web-based authentication exchange, a permitted method of observing requests and responses may help preserve the relationship among the submitted data, identity artifact, and application result. For a directory-query concern, the useful capability is visibility into how controlled input affects the application’s directory interaction or returned behavior. For broader identity relationships, attack-path information may help place a validated issue in context, but it doesn’t replace proof of the underlying authentication flaw.
This is why the objective’s tool names shouldn’t be treated as a universal menu. Burp Suite, BloodHound, Hydra, Medusa, Responder, CME, hashcat, and John the Ripper appear within the wider authentication objective, but a scenario must still justify the selected capability. If your evidence question concerns the claims in an OIDC transaction, choosing a tool merely because it performs password guessing would fail to match the mechanism. If you need to understand how a validated identity weakness connects to privileges elsewhere, an attack-path view may add context, yet it can’t prove how a particular token or assertion was accepted. The tool must fit the question you’re actually authorized to answer.
Imagine that a tester runs an authentication tool against the modern web application and receives repeated failures. There are at least two broad interpretations. The application may be resisting the tested condition, or the tool may not be exercising the OIDC decision at all. Perhaps it’s aimed at a conventional credential form while the meaningful authentication exchange occurs through the external identity relationship.
More attempts won’t repair that mismatch. Check the target, protocol, configuration, account context, and expected artifact. A tool error, an empty result, or a rejection can reveal a problem with the testing method rather than a security property of the application.
The reverse mistake is treating a positive-looking output as a validated finding. A tool may decode a token, extract XML, display a directory response, or identify a possible relationship. Those outputs are observations.
Validation requires you to connect the output to the expected mechanism and the application’s security decision. Did an unauthorized identity result? Did a controlled input affect query meaning?
Did the receiving service accept identity information outside the intended trust? Could another configuration or data-quality issue explain the result? Confidence comes from corroboration, not from the severity label or visual emphasis a tool assigns.
Reporting should preserve that chain of reasoning. State the authorized target and the authentication mechanism. Describe the relevant trust boundary, such as user input reaching directory-query construction or identity information moving from a provider to a relying service.
Record the approved test condition, the expected result, the observed evidence, and the security consequence you actually verified. If the result remains uncertain, say so and name the missing evidence. Don’t collapse LDAP, OIDC, and SAML into a generic authentication issue when the remediation owner needs to know whether to address input handling, token and claim processing, assertion processing, or trust configuration.
Good reporting also separates the underlying weakness from any wider attack path. A validated authentication flaw may create access that connects to other privileges, systems, or business functions. That context can help explain impact and prioritize remediation.
It shouldn’t encourage you to continue beyond the approved objective. If proving the authentication failure is sufficient, further access may add operational risk without improving the finding. Document what the evidence establishes, preserve relevant artifacts safely, and follow the engagement’s cleanup and handling requirements rather than converting validation into unrestricted exploration.
Consider a final choice. You can either launch a broad set of authentication attempts because several tools appear in the objective, or first examine an approved transaction and identify whether it contains an LDAP-related input path, an OIDC ID Token, or a SAML XML assertion. The second choice is stronger because it matches evidence to mechanism and gives you a bounded next action. The first may create noise while answering the wrong question. Broader action would become reasonable only if the protocol were identified, the lower-impact evidence were insufficient, and the authorization explicitly allowed the stronger test.
That decision process produces more than a tool selection. It creates a defensible assessment record. You began with the requirement, predicted the expected behavior, chose an action proportional to the question, verified the result, and documented both the conclusion and its limits.
If another analyst reviews the evidence, they can see why the action fit the protocol and why the result supports the finding. If the evidence doesn’t support it, they can also see what remains unresolved. That’s the difference between collecting authentication output and performing a controlled authentication assessment.
L-D-A-P, O-I-D-C, and SAML can all participate in authentication, but they don’t present the same weakness or the same evidence. Directory input must be traced to query behavior. An OIDC assessment must connect an ID Token and its claims to the relying application’s decision. A SAML assessment must connect an XML assertion to the service that processes it.
Once you identify that mechanism, tool choice becomes much clearer. Select the capability that can validate the relevant artifact with the least necessary impact, then corroborate its output before calling it a finding. Authorization, evidence quality, and precise reporting aren’t separate from technical testing. They’re what make the result defensible.
Test your recall with this decision: Which tool should you choose, and what would count as a valid finding? The matching episode reference preserves exact terminology, named tools or standards, source-derived evidence checkpoints, and review material for LDAP Injection, OIDC, SAML, and Authentication Tools. This lesson was produced by Bare Metal Cyber dot com.