Detection rules › Splunk

Certificate Abuse - Windows (Windows Event Log)

Group by
_time, host
Source
github.com/anvilogic-forge/armory

Threat actors may use tools such as Certipy or Certify.exe to enumerate misconfigurations in certificate services, allowing them to gather information on potential vulnerabilities that could be exploited for privilege escalation or lateral movement within a network. This use case identifies potential abuse of Active Directory Certificate Services by monitoring Certificate Services events (4886 and 4887) or process creation events (event ID 4688) involving tools commonly used to exploit vulnerable configurations in AD CS such as certify.exe, accounting for instances where the binary has been renamed.

MITRE ATT&CK coverage

TacticTechniques
Credential AccessT1649 Steal or Forge Authentication Certificates

References

Event coverage

Rule body yaml

id: '38494.69236'
title: Certificate Abuse - Windows
description: Threat actors may use tools such as Certipy or Certify.exe to enumerate
  misconfigurations in certificate services, allowing them to gather information on
  potential vulnerabilities that could be exploited for privilege escalation or lateral
  movement within a network. This use case identifies potential abuse of Active Directory
  Certificate Services by monitoring Certificate Services events (4886 and 4887) or
  process creation events (event ID 4688) involving tools commonly used to exploit
  vulnerable configurations in AD CS such as certify.exe, accounting for instances
  where the binary has been renamed.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4886) OR
  "<EventID>4886<" OR TERM(EventCode=4887) OR "<EventID>4887<") OR ((TERM(EventCode=4688)
  OR "<EventID>4688<" OR Type=Process) ("certify.exe" OR "request " OR "/ca:" OR "/template:"
  OR "/altname:")) | where match(signature_id, "4886|4887") or (match(signature_id,
  "4688") and match(process, "(?i)request\s.+/ca:.+/(template|altname):")) | table
  _time, host, user user, process, process_*, parent_*, signature_id | bin span=1s
  | stats values(*) as * by _time, host '
techniques:
- credential-access:steal or forge authentication certificates
technique_id: 
- T1649
data_category:
- Windows event logs
references:
- https://github.com/ly4k/Certipy
- https://www.kali.org/tools/certipy-ad/
- https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/ad-certificates/domain-escalation

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4886) OR "<EventID>4886<" OR TERM(EventCode=4887) OR "<EventID>4887<") OR ((TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) ("certify.exe" OR "request " OR "/ca:" OR "/template:" OR "/altname:"))

Stage 2: where

| where match(signature_id, "4886|4887") or (match(signature_id, "4688") and match(process, "(?i)request\s.+/ca:.+/(template|altname):"))

Stage 3: table

| table _time, host, user user, process, process_*, parent_*, signature_id

Stage 4: bucket

| bin span=1s

Stage 5: stats

| stats values(*) as * by _time, host

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
EventCodeeq
  • 4688 corpus 313 (splunk 283, kusto 30)
  • 4886 corpus 2 (splunk 2)
  • 4887 corpus 3 (splunk 3)
processmatch
  • "(?i)request\s.+/ca:.+/(template|altname):" corpus 2 (splunk 2)
signature_idmatch
  • "4688" corpus 8 (splunk 8)
  • "4886|4887"

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>4886<"
1TERM
1"<EventID>4887<"
1TERM
1"<EventID>4688<"
1"certify.exe"
1"request "
1"/ca:"
1"/template:"
1"/altname:"