Skip to content

[New Rule] Linux Local Account Brute Force #2965

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
merged 2 commits into from
Jul 27, 2023

Conversation

Aegrah
Copy link
Contributor

@Aegrah Aegrah commented Jul 26, 2023

Summary

Identifies multiple consecutive login attempts executed by one process targeting a local linux user account within a short time interval. Adversaries might brute force login attempts across different users with a default wordlist or a set of customly crafted passwords in an attempt to gain access to these accounts.

Detection

This behavior is common across different local account brute force scripts e.g. https://github.com/carlospolop/su-bruteforce or manual attempts of brute forcing a useraccount. As new process.entity_id's and process.parent.entity_id's are generated per authentication attempt, the only feasible way of detecting this is through the process.parent.executable. As the timespan is set to 1 second, this shouldn't be a big performance hit.

Red sector shows 0 hits for this query in the last year. 10 authentication attemps should not occur in 1 second unless a brute force is being executed.

sequence by host.id, process.parent.executable, user.name with maxspan=1s
[ process where host.os.type == "linux" and event.type == "start" and 
  event.action == "exec" and process.name == "su" ] with runs=10
image

Copy link
Contributor

@eric-forte-elastic eric-forte-elastic left a comment

Choose a reason for hiding this comment

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

👍 su 10 times in one second should never happen.

@Aegrah Aegrah merged commit 0666b59 into main Jul 27, 2023
@Aegrah Aegrah deleted the new-rule-local-user-brute-force-attempt branch July 27, 2023 07:43
protectionsmachine pushed a commit that referenced this pull request Jul 27, 2023
protectionsmachine pushed a commit that referenced this pull request Jul 27, 2023
protectionsmachine pushed a commit that referenced this pull request Jul 27, 2023
protectionsmachine pushed a commit that referenced this pull request Jul 27, 2023
protectionsmachine pushed a commit that referenced this pull request Jul 27, 2023
protectionsmachine pushed a commit that referenced this pull request Jul 27, 2023
protectionsmachine pushed a commit that referenced this pull request Jul 27, 2023
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.

3 participants