fix(smb/sccm): pass kdcHost/dc_ip to dploot Target so --sccm wmi doesn't hang over Kerberos#1318
Open
Goultarde wants to merge 1 commit into
Open
fix(smb/sccm): pass kdcHost/dc_ip to dploot Target so --sccm wmi doesn't hang over Kerberos#1318Goultarde wants to merge 1 commit into
Goultarde wants to merge 1 commit into
Conversation
…n't hang over Kerberos
Goultarde
requested review from
Marshall-Hallenbeck,
NeffIsBack,
mpgn and
zblurx
as code owners
July 17, 2026 00:59
Member
|
Thanks for the bug fix PR! I'll look into it soon. |
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.
Description
I found this while running
--sccm wmiagainst a hardened AD lab (Kerberos-only, no NTLM).--sccm wmihangs indefinitely after "Looting SCCM Credentials through wmi" when authenticating with Kerberos (-k/--use-kcache).Root cause:
smb.sccm()builds the dplootTargetwithoutdc_ip/kdcHost. dploot'sSCCMTriage.wmi_collect_sccm_secrets()opens a freshDCOMConnection(..., kdcHost=self.target.dc_ip). Withdc_ip=NoneanddoKerberos=True, impacket cannot locate the KDC for the DCOM service ticket and blocks. The SMB masterkey stage works fine because it reuses the already-authenticated nxc session (upgrade_to_dploot_connection), so only the fresh DCOM connection is affected. The user-supplied--kdcHostis stored inself.kdcHostbut was never propagated to the dplootTarget.Fix: pass
kdcHost=self.kdcHostanddc_ip=self.kdcHostinTarget.create()insidesccm()(dc_ipis the parameter actually read byDCOMConnection). I also addedkdcHost=self.kdcHostindpapi()for consistency, even though it doesn't open a DCOM connection.Only affects the Kerberos path. NTLM is unaffected (both parameters stay
None, no behavior change).I used Claude Code to help diagnose the root cause (tracing the freeze through dploot's
SCCMTriage/DCOMConnectioncode). I reviewed and validated the diff myself and reproduced/confirmed the fix against a real target.Type of change
Setup guide for the review
To reproduce the bug: target a domain-joined Windows host with SCCM/MECM client secrets present, authenticate with Kerberos (
-kor--use-kcache, optionally--kdcHost <dc_ip>), and run--sccm wmi. Without the fix, the command hangs indefinitely right after "Looting SCCM Credentials through wmi". With the fix applied, it completes and returns NAA/Task Sequence/Collection Variable secrets.Tested with:
main(commitff198407)Screenshots (if appropriate):
Before :

After :

Checklist:
poetry run ruff check ., use--fixto automatically fix what it can)tests/e2e_commands.txtfile if necessary (new modules or features are required to be added to the e2e tests)