Detection rules › Splunk
Potential SSH with System User
NIX System users, typically 1…999 are users that do not map to actual “human” users, but are used as security identities for system daemons, in order to implement privilege separation and run system daemons with minimal privileges. This use case looks for attempts to ssh into and user account with a "Default" user id for most NIX distributions.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth |
References
Telemetry coverage
| Platform | Record / event type |
|---|---|
| Linux | auditd USER_START record: User session start |
Rule body
id: '8620.11045'
title: Potential SSH with System User
description: 'NIX System users, typically 1…999 are users that do not map to actual
“human” users, but are used as security identities for system daemons, in order
to implement privilege separation and run system daemons with minimal privileges.
This use case looks for attempts to ssh into and user account with a "Default" user
id for most NIX distributions. '
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_unix` type=USER_START | regex auid=^\d+|
regex auid!="0|\d{4,}"| regex exe="(?i)ssh" | eval src_ip=addr, user=coalesce(acct,
id, ID) | table _time, host, user src_ip, process_*, user `group_events(host, 1)`
| lookup dnslookup clientip as src_ip OUTPUT clienthost as src_dns | iplocation
prefix="src_" src_ip | rename src_Country as src_country '
techniques:
- privilege-escalation:valid accounts:default accounts
- defense-evasion:valid accounts:default accounts
- persistence:valid accounts:default accounts
technique_id:
- T1078.001
data_category:
- Linux audit logs
references:
- https://systemd.io/UIDS-GIDS/
Stages and Predicates
Stage 1: search
search source="*" source IN ("*auditd*", "Syslog:Linux-Sysmon/Operational") type="USER_START"
Stage 2: regex
regex match(auid, "^\d+")
Stage 3: regex
regex NOT match(auid, "0|\d{4,}")
Stage 4: regex
regex match(exe, "(?i)ssh")
Stage 5: eval
eval src_ip=addr, user=coalesce(...)
Stage 6: table
table _time, host, process_*, src_ip, user
Stage 7: bucket
bucket _time
Stage 8: stats
stats BY host, _time
Stage 9: lookup
lookup <lookup> clienthost, clientip, src_dns, src_ip
Stage 10: search
search prefix="src_"
Stage 11: rename
rename
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
auid | regex_match | "0, \d{4,}" | excludes:auid |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
auid | regex_match |
| field:"auid" kind:regex_match |
exe | regex_match |
| field:"exe" kind:regex_match |
prefix | eq |
| field:"prefix" kind:eq |
type | eq |
| field:"type" kind:eq value:"USER_START" |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 10 | iplocation |
| 10 | src_ip |