[New Rule] Manual Mount Discovery via /etc/exports#4662
Merged
shashank-elastic merged 3 commits intomainfrom May 6, 2025
Merged
[New Rule] Manual Mount Discovery via /etc/exports#4662shashank-elastic merged 3 commits intomainfrom
shashank-elastic merged 3 commits intomainfrom
Conversation
Contributor
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
|
⛔️ Test failed Results
|
…o discovery_manual_mount_discovery_via_exports_or_fstab.toml
|
⛔️ Test failed Results
|
| type = "eql" | ||
| query = ''' | ||
| process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "start", "ProcessRollup2") and | ||
| process.name in ("cat", "grep", "tail", "less", "more", "egrep", "fgrep") and process.command_line like ("/etc/exports", "/etc/fstab") |
Contributor
There was a problem hiding this comment.
Thoughts on adding some other file inspection commands --> awk, head, vi, etc.
I agree that this should be fine as a detection rule. My only thought would be random backend monitoring jobs done by admins, but that should just be a manual exception.
terrancedejesus
approved these changes
Apr 25, 2025
Samirbous
approved these changes
May 6, 2025
|
⛔️ Test failed Results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This rule detects manual mount discovery via the /etc/exports file on Linux systems. The /etc/exports file is used by NFS (Network File System) to define which directories are shared with remote hosts. Attackers may access this file to gather information about shared directories and potential targets for further exploitation.
Telemetry
In test stacks only TPs, in telemetry last 90d 0 hits.
BBR consideration
Given the fact that this activity is not very common, and having writeable shares or misconfigured shares with e.g. NO_ROOT_SQUASH enabled is a common attack vector, my opinion is this deserves to be a DR rather than BBR.