Detection rules › Sigma
CrackMaxpExec share permission enumeration
Detects scenarios where an attacker would perform share permission enumeration using CrackMaxExec SMBmodule.
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 5145 | A network share object was checked to see whether client can be granted desired access. |
Rule body yaml
title: CrackMaxpExec share permission enumeration
description: Detects scenarios where an attacker would perform share permission enumeration using CrackMaxExec SMBmodule.
correlation: correlate TargetLogonId from ID 4624 with SubjectLogonId from ID 5145 to identify the source of the enumeration.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0005-Defense%20Evasion/T1222.001-File%20and%20Directory%20Permissions%20Modification
- https://hideandsec.sh/books/cheatsheets/page/crackmapexec
- https://www.infosecmatter.com/crackmapexec-module-library/
- https://mpgn.gitbook.io/crackmapexec/smb-protocol/enumeration/enumerate-shares-and-access
tags:
- attack.
- attack.t
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: security
detection: # full command: cme smb -u user -p password --shares
selection_baseline:
EventID: 5145
selection_pipes:
ShareName: '\\*\IPC$'
RelativeTargetName:
- srvsvc # May also be triggered by other tools like SharpHound, DonPapi, ...
- svcctl # May also be triggered by other tools like Tchopper
selection_admin_share:
ShareName: '\\*\ADMIN$'
RelativeTargetName: # RelativeNames with high entropy (eg: nESNaYmfIO, srnCKoBLQW...)
filter:
IpAddress: '%administration_hosts%' # List of IPs of your administration host to reduce false positive
condition: selection_baseline and not filter and (selection_pipes or selection_admin_share) | count(Computer) by IpAddress > 20
timeframe: 15m
falsepositives:
- Administrator activity, backup solutions, Windows Server Manager
level: medium
Stages and Predicates
Stage 0: condition
selection_baseline and not filter and (selection_pipes or selection_admin_share) | count(Computer) by IpAddress > 20Stage 1: selection_baseline
selection_baseline:
EventID: 5145
Stage 2: not filter
filter:
IpAddress: '%administration_hosts%'
Stage 3: selection_pipes
selection_pipes:
ShareName: '\\*\IPC$'
RelativeTargetName:
- srvsvc
- svcctl
Stage 4: selection_admin_share
selection_admin_share:
ShareName: '\\*\ADMIN$'
RelativeTargetName:
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
IpAddress | eq | %administration_hosts% |
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.
| Field | Kind | Values |
|---|---|---|
RelativeTargetName | eq |
|
RelativeTargetName | is_null | |
ShareName | wildcard |
|