Skip to content

ADCS certihound collection intermittently fails with ASN1 error under Kerberos auth #1175

Open

Description

@0x0Trace

Describe the bug
When using Kerberos authentication with BloodHound collection (--bloodhound --collection All), the ADCS collection portion can intermittently fail with ASN1 parsing errors. The suspected root cause is in Impacket's LDAP recv_raw() method — the GSSAPI frame reassembly loop condition reads excessive data when initial receives contain more bytes than the first frame's length, resulting in corrupted decrypted data that fails ASN1 validation.

To Reproduce
Steps to reproduce the behavior:
Command: KRB5CCNAME=<ccache> nxc ldap <dc> --use-kcache --bloodhound --collection All --dns-server <dns>
Resulted in:

ADCS collection failed: <TagSet object, tags 64:0:21> not in asn1Spec: <LDAPMessage schema object...>

Similar ASN1 tag errors may also appear as 192:0:8 or other variations.

Note: This issue has proven difficult to consistently reproduce. It was initially observed during Kerberos-authenticated ADCS enumeration but could not be reliably triggered on subsequent attempts against the same and different environments. The failure may depend on LDAP response size, timing, or other network conditions.

Expected behavior
ADCS certificate template and enterprise CA enumeration should complete successfully when using Kerberos authentication, the same as it does with NTLM/password authentication.

Screenshots

Image

NetExec info

  • OS: Kali
  • Version of nxc: latest from GitHub (main branch)
  • Installed from: github
  • Target: Windows Server 2022 (Build 20348) — observed on HTB Ghost machine
  • Auth method: Kerberos (GSSAPI)

Additional context

Activity

  1. added theissue type on Mar 27, 2026
  2. NeffIsBack commented on Mar 27, 2026

    @NeffIsBack
    Member

    Thanks for the bug report!

    We'll need someone to run into this problem again so we can properly troubleshoot and fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions