Skip to content
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

[New Rule] Potential Buffer Overflow Attack Detected #3312

Merged
merged 10 commits into from
Jan 22, 2024

Conversation

Aegrah
Copy link
Contributor

@Aegrah Aegrah commented Dec 11, 2023

Summary

Detects potential buffer overflow attacks by querying the "Segfault Detected" pre-built rule signal index, through a
threshold rule, with a minimum number of 100 segfault alerts in a short timespan. A large amount of segfaults in a short
time interval could indicate application exploitation attempts.

Detection

This rule leverages the alert data from the "Segfault Detected" pre-built rule (https://github.com/elastic/detection-rules/blob/main/rules_building_block/execution_linux_segfault.toml).

kibana.alert.rule.rule_id:5c81fc9d-1eae-437f-ba07-268472967013 and event.kind:signal

[rule.threshold]
field = ["event.kind"]
value = 100
image

reference = "https://attack.mitre.org/tactics/TA0001/"

[rule.threshold]
field = ["event.kind"]
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to limit this somehow, by host.id maybe? If not, this would be triggered by unrelated activities in different systems on the same env

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@w0rk3r I added the host.id field to the threshold, making it match on similar event.kind and host.id values.

@Aegrah Aegrah requested a review from w0rk3r January 5, 2024 13:40
For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
- Click "Save and Continue".
- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
Copy link
Contributor

Choose a reason for hiding this comment

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

May require a few line additions post review from @approksiu
https://docs.google.com/document/d/1J4ClwoAkhcP4BDTw94Bwb3nC_6kXsl5pu99Um8Ddt58/edit?pli=1

We need to mention the dependent Detection rule that needs to be enabled for this threshold rule to fire.

@Aegrah Aegrah requested a review from approksiu January 22, 2024 13:41
@Aegrah
Copy link
Contributor Author

Aegrah commented Jan 22, 2024

@approksiu would you mind giving this setup guide a double check?

@Aegrah Aegrah merged commit 48d8b65 into main Jan 22, 2024
13 checks passed
@Aegrah Aegrah deleted the new-rule-potential-bufferoverflow-detected branch January 22, 2024 15:28
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
protectionsmachine pushed a commit that referenced this pull request Jan 22, 2024
* [New Rule] Potential Buffer Overflow Attack

* Added timestamp_override

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

* Update rules/linux/privilege_escalation_potential_bufferoverflow_attack.toml

---------

Co-authored-by: shashank-elastic <[email protected]>

(cherry picked from commit 48d8b65)
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