-
Notifications
You must be signed in to change notification settings - Fork 567
[New Rule] Potential Suspicious DebugFS Root Device Access #2982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
brokensound77
approved these changes
Aug 2, 2023
Aegrah
commented
Aug 3, 2023
DefSecSentinel
approved these changes
Aug 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
protectionsmachine
pushed a commit
that referenced
this pull request
Aug 3, 2023
* [New Rule] Potential DebugFS Privilege Escalation * Changed rule name * Update rules/linux/privilege_escalation_sda_disk_mount_non_root.toml --------- Co-authored-by: Colson Wilhoit <[email protected]> (cherry picked from commit 4bcec33)
protectionsmachine
pushed a commit
that referenced
this pull request
Aug 3, 2023
* [New Rule] Potential DebugFS Privilege Escalation * Changed rule name * Update rules/linux/privilege_escalation_sda_disk_mount_non_root.toml --------- Co-authored-by: Colson Wilhoit <[email protected]> (cherry picked from commit 4bcec33)
protectionsmachine
pushed a commit
that referenced
this pull request
Aug 3, 2023
* [New Rule] Potential DebugFS Privilege Escalation * Changed rule name * Update rules/linux/privilege_escalation_sda_disk_mount_non_root.toml --------- Co-authored-by: Colson Wilhoit <[email protected]> (cherry picked from commit 4bcec33)
protectionsmachine
pushed a commit
that referenced
this pull request
Aug 3, 2023
* [New Rule] Potential DebugFS Privilege Escalation * Changed rule name * Update rules/linux/privilege_escalation_sda_disk_mount_non_root.toml --------- Co-authored-by: Colson Wilhoit <[email protected]> (cherry picked from commit 4bcec33)
protectionsmachine
pushed a commit
that referenced
this pull request
Aug 3, 2023
* [New Rule] Potential DebugFS Privilege Escalation * Changed rule name * Update rules/linux/privilege_escalation_sda_disk_mount_non_root.toml --------- Co-authored-by: Colson Wilhoit <[email protected]> (cherry picked from commit 4bcec33)
protectionsmachine
pushed a commit
that referenced
this pull request
Aug 3, 2023
* [New Rule] Potential DebugFS Privilege Escalation * Changed rule name * Update rules/linux/privilege_escalation_sda_disk_mount_non_root.toml --------- Co-authored-by: Colson Wilhoit <[email protected]> (cherry picked from commit 4bcec33)
protectionsmachine
pushed a commit
that referenced
this pull request
Aug 3, 2023
* [New Rule] Potential DebugFS Privilege Escalation * Changed rule name * Update rules/linux/privilege_escalation_sda_disk_mount_non_root.toml --------- Co-authored-by: Colson Wilhoit <[email protected]> (cherry picked from commit 4bcec33)
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 monitors for the usage of the built-in Linux DebugFS utility to access a disk device without root permissions. Linux users that are part of the "disk" group have sufficient privileges to access all data inside of the machine through DebugFS. Attackers may leverage DebugFS in conjunction with "disk" permissions to read sensitive files owned by root, such as the shadow file, root ssh private keys or other sensitive files that may allow them to further escalate privileges.
Detection
0 hits in RedSector last 365 days. The
disk
group might be leveraged by system administrators to create backups without granting the user root permissions. The DebugFS utility will most likely not be frequently used for this. By looking for this process and filtering onnot user.Ext.real.id : "0"
I think we can reduce most FPs, and final FPs could be eliminated by customer's themselves by adding specific actions to the exclusion list.