repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
ad-adfs-federation-services.mdMarkdown143 lines7.1 KiBsource raw download

title: "Active Directory - Federation Services" section: "Active Directory" sectionSlug: "active-directory" sourcePath: "docs/active-directory/ad-adfs-federation-services.md" sourceUrl: "https://github.com/swisskyrepo/InternalAllTheThings/blob/203bb0c0b290/docs/active-directory/ad-adfs-federation-services.md" sha: "203bb0c0b290" isIndex: false#

Active Directory - Federation Services#

Active Directory Federation Services (AD FS) is a software component developed by Microsoft that provides users with single sign-on (SSO) access to systems and applications located across organizational boundaries. It uses a claims-based access control authorization model to maintain application security and to provide seamless access to web-based applications that are hosted inside or outside the corporate network.

ADFS - DKM Master Key#

$key=(Get-ADObject -filter 'ObjectClass -eq "Contact" -and name -ne "CryptoPolicy"' -SearchBase "CN=ADFS,CN=Microsoft,CN=Program Data,DC=domain,DC=local" -Properties thumbnailPhoto).thumbnailPhoto
[System.BitConverter]::ToString($key)

ADFS - Trust Relationship#

Gets the relying party trusts of the Federation Service.

ADFS - Golden SAML#

Golden SAML is a type of attack where an attacker creates a forged SAML (Security Assertion Markup Language) authentication response to impersonate a legitimate user and gain unauthorized access to a service provider. This attack leverages the trust established between the identity provider (IdP) and service provider (SP) in a SAML-based single sign-on (SSO) system.

Requirements:

Exploitation:

Manual Exploitation:

NOTE: There might be multiple master keys in the container, remember to try them all.

Golden SAML Examples

NOTE: Sync the time between the attacker's machine generating the Golden SAML and the ADFS server.

Other interesting tools to exploit AD FS:

References#