Skip to content

Add Linux Auditd Enumeration Script Activity detection - #4380

Open
vahidmalekk wants to merge 2 commits into
splunk:developfrom
vahidmalekk:detection/linux-auditd-enumeration
Open

vahidmalekk wants to merge 2 commits into
splunk:developfrom
vahidmalekk:detection/linux-auditd-enumeration

Conversation

@vahidmalekk

Copy link
Copy Markdown

Summary

Adds a new anomaly analytic, Linux Auditd Enumeration Script Activity, that detects the behavior of automated Linux enumeration / privilege-escalation scripts (LinEnum, LinPEAS, linux-smart-enumeration, linuxprivchecker) rather than individual discovery commands.

Existing Linux Auditd ... discovery analytics each key on a single technique/command. Those are valuable, but one command at a time whoami, id, uname, find, crontab -l, ss -tlpn is everyday admin activity and generates noise. This analytic instead keys on the rapid fan-out of many distinct discovery utilities together in a short window on one host, which is the signature of an enumeration script and simultaneously covers T1082/T1083/T1057/T1518. It fires only when a 2-minute window per host crosses all three thresholds: high execution volume, high distinct-binary count, and a high number of distinct recon/discovery tools.

Data source

Linux Auditd Execve uses execve_command and argc, consistent with the current auditd detections (e.g. linux_auditd_file_and_directory_discovery).

Testing

MITRE ATT&CK

T1082, T1083, T1057, T1518

Notes: thresholds are documented as starting points in how_to_implement; happy to adjust threshold values, the recon-utility list, or the grouping to match STRT conventions.

Behavioral/threshold analytic that detects the rapid fan-out of many
distinct discovery utilities characteristic of automated enumeration
scripts (LinEnum/LinPEAS/LSE) using Linux Auditd Execve, rather than
single discovery commands. Maps to T1082/T1083/T1057/T1518.
@nasbench

nasbench commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T10:24:18.494912Z 42e196e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42e196e3c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

| eval base_cmd=mvindex(split(base_cmd,"/"),-1)
| eval is_recon=if(base_cmd IN ("whoami","id","uname","hostname","hostnamectl","lsb_release","sudo","find","getcap","crontab","ps","netstat","ss","lsof","last","lastlog","w","who","arp","ip","ifconfig","route","mount","lsblk","df","dpkg","dpkg-query","rpm","getent","lsmod","modinfo","dmesg","env","uptime","aa-status","sestatus","capsh"),1,0)
| bin _time span=2m
| stats count as exec_count dc(base_cmd) as distinct_commands sum(is_recon) as recon_executions dc(eval(if(is_recon=1,base_cmd,null()))) as distinct_recon_commands values(base_cmd) as commands min(_time) as firstTime max(_time) as lastTime BY _time dest

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve allowlist fields before applying the filter

When this fires on a CI or configuration-management host and an operator follows the documented service-account/parent-process allowlisting guidance, the filter cannot implement that tuning: this stats emits only _time, dest, aggregate counts, and commands, so user/uid, parent identity, and even the renamed process fields have been discarded before linux_auditd_enumeration_script_activity_filter runs. Preserve and collect those dimensions or apply the allowlist before aggregation; otherwise the only reliable mitigation offered here is suppressing the entire host.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The window now carries the allowlist dimensions: values(auid) as auid, values(uid) as uid, values(process) as process, and values(ppid) as parent_pids (plus dc(ppid) as distinct_parents). So the filter macro can allowlist a specific service account or parent process - e.g. a CI/config-management account - instead of being forced to suppress the whole host. Updated how_to_implement, known_false_positives, and the entity message to reference these. Pushed in 2b2abc4.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants