Skip to content

This is a proposal for SUID Enumeration Using Find #5071

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

mlakri
Copy link

@mlakri mlakri commented Nov 4, 2024

The goal is to detect the execution of the find command in auditd logs (e.g., $find /usr/bin -type f -perm -4001) when searching for binaries or scripts that can be executed with elevated privileges, or when used for reconnaissance to discover details about file permissions or access conditions to sensitive data.

Changelog

type=EXECVE msg=audit(1731503214.337:71048): argc=6 a0="find" a1="/usr/bin" a2="-type" a3="f" a4="-perm" a5="-4001"

Fixed Issues

SigmaHQ Rule Creation Conventions

  • If your PR adds new rules, please consider following and applying these conventions

The idea is to detect in the auditd logs the execution of the find command (for example, $find -perm -u=ws ...) looking for binaries or scripts that can be executed with elevated privileges.
@github-actions github-actions bot added Rules Linux Pull request add/update linux related rules labels Nov 4, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @mlakri 👋

It looks like this is your first pull request on the Sigma rules repository!

Please make sure to read the SigmaHQ conventions document to make sure your contribution is adhering to best practices and has all the necessary elements in place for a successful approval.

Thanks again, and welcome to the Sigma community! 😃

@nasbench
Copy link
Member

nasbench commented Nov 7, 2024

Hey @mlakri and thanks for your contribution.

Can you please provide log data for your example. And also looking for specific permission isn't a direct sign of privilege escalation. It's just permission discovery, the outcome could be exfiltration, recon or privesc for privesc. So the metadata fro the rule (description and title) should reflect that.

Please take this into consideration and make the necessary changes.

@nasbench nasbench marked this pull request as draft November 7, 2024 17:52
@nasbench nasbench added Work In Progress Some changes are needed Author Input Required changes the require information from original author of the rules labels Nov 7, 2024
@mlakri mlakri changed the title This is a proposal for a PrivEsc detection rule This is a proposal for SUID Enumeration Using Find Nov 13, 2024
@mlakri
Copy link
Author

mlakri commented Nov 13, 2024

Hello @nasbench
I removed everything related to "PrivEsc," leaving its meaning to refer only to enumeration.
Additionally, I added an example of an EXECVE log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author Input Required changes the require information from original author of the rules Linux Pull request add/update linux related rules Rules Work In Progress Some changes are needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants