Description
This module performs an NTLM relay-to-self privilege escalation attack. It starts an HTTP-to-LDAP relay server on the compromised host, then triggers the WebClient service via an ETW event (allowing a low-privilege user to start it), and coerces the local machine account to authenticate via OpenEncryptedFileRaw to the relay listener over WebDAV.
The coerced machine account NTLM authentication is relayed to a Domain Controller's LDAP service, where the module writes Shadow Credentials (msDS-KeyCredentialLink) to its own AD object and obtains a Kerberos TGT via PKINIT. The module then performs S4U2Proxy to obtain an impersonating service ticket for Administrator, enabling psexec back to itself for SYSTEM access.
RUN_GET_TICKET and RUN_PSEXEC are independent toggles. An operator can obtain a ticket without running psexec, run psexec with a previously obtained ticket, or run both sequentially. RUN_PSEXEC defaults to false so the module does not automatically attempt lateral movement.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/windows/local/ntlm/relay_2_selfmsf undefined(relay_2_self) > show actions ...actions...msf undefined(relay_2_self) > set ACTION < action-name >msf undefined(relay_2_self) > show options ...show and set options...msf undefined(relay_2_self) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub