Detection rules › Splunk

Windows Computer Account With SPN

Status
production
Severity
medium
Group by
LogonId, dest, subject
Author
Michael Haag, Splunk
Source
github.com/splunk/security_content

The following analytic detects the addition of Service Principal Names (SPNs) HOST and RestrictedKrbHost to a computer account, indicative of KrbRelayUp behavior. This detection leverages Windows Security Event Logs, specifically EventCode 4741, to identify changes in SPNs. This activity is significant as it is commonly associated with Kerberos-based attacks, which can be used to escalate privileges or perform lateral movement within a network. If confirmed malicious, this behavior could allow an attacker to impersonate services, potentially leading to unauthorized access to sensitive resources.

Known false positives

  • It is possible third party applications may add these SPNs to Computer Accounts, filtering may be needed.

MITRE ATT&CK coverage

TacticTechniques
Credential Access

Telemetry coverage

Rule body

name: Windows Computer Account With SPN
id: 9a3e57e7-33f4-470e-b25d-165baa6e8357
version: 11
creation_date: '2022-04-28'
modification_date: '2026-05-13'
author: Michael Haag, Splunk
status: production
type: TTP
description: The following analytic detects the addition of Service Principal Names (SPNs) HOST and RestrictedKrbHost to a computer account, indicative of KrbRelayUp behavior. This detection leverages Windows Security Event Logs, specifically EventCode 4741, to identify changes in SPNs. This activity is significant as it is commonly associated with Kerberos-based attacks, which can be used to escalate privileges or perform lateral movement within a network. If confirmed malicious, this behavior could allow an attacker to impersonate services, potentially leading to unauthorized access to sensitive resources.
data_source:
    - Windows Event Log Security 4741
search: |-
    `wineventlog_security` EventCode=4741 NewUacValue="0x80" ServicePrincipalNames IN ("*HOST/*","*RestrictedKrbHost/*")
      | stats count min(_time) as firstTime max(_time) as lastTime values(EventCode),values(TargetDomainName),values(PrimaryGroupId), values(OldUacValue), values(NewUacValue),values(SamAccountName),values(DnsHostName),values(ServicePrincipalNames)
        BY dest Logon_ID subject
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `windows_computer_account_with_spn_filter`
how_to_implement: To successfully implement this search, you need to be ingesting Windows Security Event Logs with 4741 EventCode enabled. The Windows TA is also required.
known_false_positives: It is possible third party applications may add these SPNs to Computer Accounts, filtering may be needed.
references:
    - https://www.trustedsec.com/blog/an-attack-path-mapping-approach-to-cves-2021-42287-and-2021-42278
    - https://github.com/Dec0ne/KrbRelayUp
finding:
    title: A Computer Account was created with SPNs related to Kerberos on $dest$, possibly indicative of Kerberos relay attack.
    entity:
        field: dest
        type: system
        score: 50
analytic_story:
    - Local Privilege Escalation With KrbRelayUp
    - Active Directory Kerberos Attacks
    - Compromised Windows Host
asset_type: Endpoint
mitre_attack_id:
    - T1558
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`wineventlog_security` EventCode=4741 NewUacValue="0x80" ServicePrincipalNames IN ("*HOST/*","*RestrictedKrbHost/*")

Stage 2: stats

| stats count min(_time) as firstTime max(_time) as lastTime values(EventCode),values(TargetDomainName),values(PrimaryGroupId), values(OldUacValue), values(NewUacValue),values(SamAccountName),values(DnsHostName),values(ServicePrincipalNames)
    BY dest Logon_ID subject

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `windows_computer_account_with_spn_filter`

Indicators

These rows show field, operator, and value matches.