Skip to content

[New Rule] Potential Fileless Execution via Unusual memfd Create Call - #6748

Merged
Aegrah merged 6 commits into
mainfrom
new-rule-memfd-create-new-terms
Sep 15, 2026
Merged

Aegrah merged 6 commits into
mainfrom
new-rule-memfd-create-new-terms

Conversation

@Aegrah

@Aegrah Aegrah commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

This rule comes in favor of a deprecated diagnostic endpoint rule that was too noisy to promote.

@Aegrah Aegrah self-assigned this Sep 8, 2026
@Aegrah Aegrah added OS: Linux Rule: New Proposal for new rule Team: TRADE labels Sep 8, 2026
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Sep 8, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Fileless Execution via Unusual memfd Create Call (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@Aegrah
Aegrah marked this pull request as ready for review September 8, 2026 11:48
Copilot AI lite review requested due to automatic review settings September 8, 2026 11:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new rule’s description is incomplete/misaligned with the new-terms fields and the tags are missing a required tactic tag for the included Execution mapping.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds a new Linux Elastic Defend detection rule intended to replace a deprecated diagnostic endpoint rule by detecting potentially fileless execution activity via unusual memfd_create usage.

Changes:

  • Introduces a new Linux new_terms rule that alerts on newly observed combinations of host + process lineage when memfd_create activity is seen.
  • Adds rule metadata, MITRE ATT&CK mappings (Defense Evasion + Execution), and Elastic Defend setup guidance.
File summaries
File Description
rules/linux/defense_evasion_fileless_execution_via_unusual_memfd_create.toml New Elastic Defend new_terms rule for detecting potentially fileless execution via unusual memfd_create activity.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Aegrah and others added 2 commits September 8, 2026 14:59
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Sep 8, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Fileless Execution via Unusual memfd Create Call (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Sep 8, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Fileless Execution via Unusual memfd Create Call (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@bryans3c bryans3c left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some comments, otherwise LGTM!


[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-10d"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe decrease it to 5d for performance?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +61 to +66
host.os.type:"linux" and event.category:process and event.type:start and event.action:memfd_create and
process.executable:(
*memfd\:* or /tmp/* or /var/tmp/* or /dev/shm/* or ./* or /run/user/* or /var/run/user/* or
/boot/* or /sys/* or /lost+found/* or /proc/* or /var/mail/* or /root/* or *\(deleted\)* or
/proc/*/fd/*
) and process.parent.executable:*

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add exclusions for the rule? The deprecated rules contained some exclusions on it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I bumped up the new_terms to 10d to avoid the exclusions; if necessary I will only add common binary FPs. For initial push I think new_terms on 10d should suffice.

Added detailed investigation and response guidelines for detecting potential fileless execution via unusual memfd_create calls in Linux processes.
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Sep 11, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Fileless Execution via Unusual memfd Create Call (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Sep 14, 2026

Copy link
Copy Markdown

Test succeeded

Results

@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Sep 14, 2026

Copy link
Copy Markdown

⛔️ Test failed

Results
  • ❌ Potential Fileless Execution via Unusual memfd Create Call (kuery)
    • coverage_issue: no_rta
    • stack_validation_failed: no_rta

@shashank-elastic shashank-elastic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Overall query logic is clean

@Aegrah
Aegrah added this pull request to the merge queue Sep 15, 2026
Merged via the queue into main with commit 4315e2b Sep 15, 2026
10 checks passed
@Aegrah
Aegrah deleted the new-rule-memfd-create-new-terms branch September 15, 2026 13:10
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.

4 participants