Detection rules › Splunk

PetitPotam Network Share Access Request

Status
production
Severity
medium
Group by
AccessReason, access_mask, dest, share_name, src, user_sid
Author
Michael Haag, Mauricio Velazco, Splunk
Source
github.com/splunk/security_content

The following analytic detects network share access requests indicative of the PetitPotam attack (CVE-2021-36942). It leverages Windows Event Code 5145, which logs attempts to access network share objects. This detection is significant as PetitPotam can coerce authentication from domain controllers, potentially leading to unauthorized access. If confirmed malicious, this activity could allow attackers to escalate privileges or move laterally within the network, posing a severe security risk. Ensure Event Code 5145 is enabled via Group Policy to utilize this analytic effectively.

Known false positives

  • False positives have been limited when the Anonymous Logon is used for Account Name.

MITRE ATT&CK coverage

TacticTechniques
Credential Access

Telemetry coverage

Rule body

name: PetitPotam Network Share Access Request
id: 95b8061a-0a67-11ec-85ec-acde48001122
version: 10
creation_date: '2021-09-01'
modification_date: '2026-05-13'
author: Michael Haag, Mauricio Velazco, Splunk
status: production
type: TTP
description: The following analytic detects network share access requests indicative of the PetitPotam attack (CVE-2021-36942). It leverages Windows Event Code 5145, which logs attempts to access network share objects. This detection is significant as PetitPotam can coerce authentication from domain controllers, potentially leading to unauthorized access. If confirmed malicious, this activity could allow attackers to escalate privileges or move laterally within the network, posing a severe security risk. Ensure Event Code 5145 is enabled via Group Policy to utilize this analytic effectively.
data_source:
    - Windows Event Log Security 5145
search: |-
    `wineventlog_security` SubjectUserName="ANONYMOUS LOGON" EventCode=5145 RelativeTargetName=lsarpc
      | stats count min(_time) as firstTime max(_time) as lastTime
        BY dest, SubjectUserSid, ShareName,
           src, AccessMask, AccessReason
      | `security_content_ctime(firstTime)`
      | `security_content_ctime(lastTime)`
      | `petitpotam_network_share_access_request_filter`
how_to_implement: Windows Event Code 5145 is required to utilize this analytic and it may not be enabled in most environments.
known_false_positives: False positives have been limited when the Anonymous Logon is used for Account Name.
references:
    - https://attack.mitre.org/techniques/T1187/
    - https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventid=5145
    - https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-5145
finding:
    title: A remote host is enumerating a $dest$ to identify permissions. This is a precursor event to CVE-2021-36942, PetitPotam.
    entity:
        field: dest
        type: system
        score: 50
analytic_story:
    - PetitPotam NTLM Relay on Active Directory Certificate Services
asset_type: Endpoint
cve:
    - CVE-2021-36942
mitre_attack_id:
    - T1187
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: endpoint
security_domain: endpoint

Stages and Predicates

Stage 1: search

`wineventlog_security` SubjectUserName="ANONYMOUS LOGON" EventCode=5145 RelativeTargetName=lsarpc

Stage 2: stats

| stats count min(_time) as firstTime max(_time) as lastTime
    BY dest, SubjectUserSid, ShareName,
       src, AccessMask, AccessReason

Stage 3: search

| `security_content_ctime(firstTime)`

Stage 4: search

| `security_content_ctime(lastTime)`

Stage 5: search

| `petitpotam_network_share_access_request_filter`

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCodeeq
  • 5145 corpus 23 (splunk 16, elastic 5, kusto 2)
field:"EventID" kind:eq value:"5145"
RelativeTargetNameeq
  • lsarpc corpus 3 (sigma 2, splunk 1)
field:"RelativeTargetName" kind:eq value:"lsarpc"
SubjectUserNameeq
  • "ANONYMOUS LOGON" corpus 3 (splunk 2, sigma 1)
field:"SubjectUserName" kind:eq