Add SCCM AdminService Kerberos relay attack - #76
Open
marin-syn wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for relaying captured Kerberos tickets to the SCCM AdminService API (/AdminService/wmi/SMS_Admin) to promote an arbitrary domain account to Full SCCM Administrator.
The original technique was documented by SpecterOps in this blogpost and relied on NTLM relay. Starting with ConfigMgr 2509, Microsoft officially blocks NTLM authentication on the AdminService entirely. The endpoint still accepts Kerberos though, which Synacktiv showed can be abused via coercion + Kerberos reflection. This PR implements this.
What changed:
--adminserviceflag (plus--logonname,--displayname,--objectsid) options to trigger the attacklib/attacks/sccmadminserviceattack.py: attack class that handles the authenticated POST to SMS_Adminlib/clients/httprelayclient.py: skips the initial GET so the single-use Kerberos token isn't wasted before the actual attack requestlib/servers/smbrelayserver.py/httprelayserver.py: dropped SPN hostname matching since coerced connections in the case of self relay can arrive with Unicode-mangled hostnames that would never match the configured target anyway