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

[Rule Tuning] Some Tunings of several 8.9 rules #2985

Merged
merged 22 commits into from
Aug 3, 2023

Conversation

Aegrah
Copy link
Contributor

@Aegrah Aegrah commented Jul 31, 2023

Summary

To ensure that all of the rules I pushed last release won't flood telemetry, I went through all of them and made some necessary changes. In two weeks I will take another look to see how they are doing.

rules/_deprecated/command_and_control_connection_attempt_by_non_ssh_root_session.toml is deprecated due to performance issues and its redundancy now that the reverse shell rules + suspicious network activity new_terms rule is out.

rules/linux/discovery_linux_modprobe_enumeration.toml Outdated Show resolved Hide resolved
rules/linux/discovery_linux_sysctl_enumeration.toml Outdated Show resolved Hide resolved
rules/linux/persistence_init_d_file_creation.toml Outdated Show resolved Hide resolved
rules/linux/persistence_rc_script_creation.toml Outdated Show resolved Hide resolved
rules/linux/persistence_shared_object_creation.toml Outdated Show resolved Hide resolved
Copy link
Contributor

@w0rk3r w0rk3r left a comment

Choose a reason for hiding this comment

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

Nice! LGTM

@@ -32,7 +32,7 @@ type = "new_terms"
query = '''
host.os.type:linux and event.action:(creation or file_create_event or file_rename_event or rename) and
file.path:(/dev/shm/* or /usr/lib/*) and file.extension:so and
process.name:(* and not (5 or dockerd or dpkg or rpm or snapd))
process.name: ( * and not ("5" or "dockerd" or "dpkg" or "rpm" or "snapd" or "exe" or "yum" or "vmis-launcher"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this *?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I was testing it, there were some cases where process.name didn't exist, therefore I added that back then - kept it there for now.

@Aegrah Aegrah merged commit a7ff449 into main Aug 3, 2023
@Aegrah Aegrah deleted the rule-tuning-linux-new-rules branch August 3, 2023 13:25
protectionsmachine pushed a commit that referenced this pull request Aug 3, 2023
* [Rule Tuning] Doing some quick tunings

* updated_date bump

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_sysctl_enumeration.toml

* Update rules/linux/persistence_init_d_file_creation.toml

* Update rules/linux/persistence_rc_script_creation.toml

* Update rules/linux/persistence_shared_object_creation.toml

* deprecate rule

* deprecate rule

* Update execution_abnormal_process_id_file_created.toml

* Update discovery_kernel_module_enumeration_via_proc.toml

* Update discovery_linux_modprobe_enumeration.toml

* Update execution_remote_code_execution_via_postgresql.toml

* Update discovery_potential_syn_port_scan_detected.toml

* Added 2 tunings, sorry I missed those..

* One more tune

* Update discovery_suspicious_proc_enumeration.toml

Removed changes from:
- rules/linux/command_and_control_suspicious_network_activity_from_unknown_executable.toml
- rules/linux/discovery_kernel_module_enumeration.toml
- rules/linux/execution_abnormal_process_id_file_created.toml
- rules/linux/persistence_cron_job_creation.toml
- rules/linux/persistence_init_d_file_creation.toml
- rules/linux/persistence_message_of_the_day_creation.toml
- rules/linux/persistence_rc_script_creation.toml
- rules/linux/persistence_shared_object_creation.toml
- rules/linux/persistence_systemd_scheduled_timer_created.toml
- rules/linux/persistence_systemd_service_creation.toml

(selectively cherry picked from commit a7ff449)
protectionsmachine pushed a commit that referenced this pull request Aug 3, 2023
* [Rule Tuning] Doing some quick tunings

* updated_date bump

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_sysctl_enumeration.toml

* Update rules/linux/persistence_init_d_file_creation.toml

* Update rules/linux/persistence_rc_script_creation.toml

* Update rules/linux/persistence_shared_object_creation.toml

* deprecate rule

* deprecate rule

* Update execution_abnormal_process_id_file_created.toml

* Update discovery_kernel_module_enumeration_via_proc.toml

* Update discovery_linux_modprobe_enumeration.toml

* Update execution_remote_code_execution_via_postgresql.toml

* Update discovery_potential_syn_port_scan_detected.toml

* Added 2 tunings, sorry I missed those..

* One more tune

* Update discovery_suspicious_proc_enumeration.toml

Removed changes from:
- rules/linux/command_and_control_suspicious_network_activity_from_unknown_executable.toml
- rules/linux/discovery_kernel_module_enumeration.toml
- rules/linux/execution_abnormal_process_id_file_created.toml
- rules/linux/persistence_cron_job_creation.toml
- rules/linux/persistence_init_d_file_creation.toml
- rules/linux/persistence_message_of_the_day_creation.toml
- rules/linux/persistence_rc_script_creation.toml
- rules/linux/persistence_shared_object_creation.toml
- rules/linux/persistence_systemd_scheduled_timer_created.toml
- rules/linux/persistence_systemd_service_creation.toml

(selectively cherry picked from commit a7ff449)
protectionsmachine pushed a commit that referenced this pull request Aug 3, 2023
* [Rule Tuning] Doing some quick tunings

* updated_date bump

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_sysctl_enumeration.toml

* Update rules/linux/persistence_init_d_file_creation.toml

* Update rules/linux/persistence_rc_script_creation.toml

* Update rules/linux/persistence_shared_object_creation.toml

* deprecate rule

* deprecate rule

* Update execution_abnormal_process_id_file_created.toml

* Update discovery_kernel_module_enumeration_via_proc.toml

* Update discovery_linux_modprobe_enumeration.toml

* Update execution_remote_code_execution_via_postgresql.toml

* Update discovery_potential_syn_port_scan_detected.toml

* Added 2 tunings, sorry I missed those..

* One more tune

* Update discovery_suspicious_proc_enumeration.toml

Removed changes from:
- rules/linux/command_and_control_suspicious_network_activity_from_unknown_executable.toml
- rules/linux/discovery_kernel_module_enumeration.toml
- rules/linux/execution_abnormal_process_id_file_created.toml
- rules/linux/persistence_cron_job_creation.toml
- rules/linux/persistence_init_d_file_creation.toml
- rules/linux/persistence_message_of_the_day_creation.toml
- rules/linux/persistence_rc_script_creation.toml
- rules/linux/persistence_shared_object_creation.toml
- rules/linux/persistence_systemd_scheduled_timer_created.toml
- rules/linux/persistence_systemd_service_creation.toml

(selectively cherry picked from commit a7ff449)
protectionsmachine pushed a commit that referenced this pull request Aug 3, 2023
* [Rule Tuning] Doing some quick tunings

* updated_date bump

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_sysctl_enumeration.toml

* Update rules/linux/persistence_init_d_file_creation.toml

* Update rules/linux/persistence_rc_script_creation.toml

* Update rules/linux/persistence_shared_object_creation.toml

* deprecate rule

* deprecate rule

* Update execution_abnormal_process_id_file_created.toml

* Update discovery_kernel_module_enumeration_via_proc.toml

* Update discovery_linux_modprobe_enumeration.toml

* Update execution_remote_code_execution_via_postgresql.toml

* Update discovery_potential_syn_port_scan_detected.toml

* Added 2 tunings, sorry I missed those..

* One more tune

* Update discovery_suspicious_proc_enumeration.toml

(cherry picked from commit a7ff449)
protectionsmachine pushed a commit that referenced this pull request Aug 3, 2023
* [Rule Tuning] Doing some quick tunings

* updated_date bump

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_sysctl_enumeration.toml

* Update rules/linux/persistence_init_d_file_creation.toml

* Update rules/linux/persistence_rc_script_creation.toml

* Update rules/linux/persistence_shared_object_creation.toml

* deprecate rule

* deprecate rule

* Update execution_abnormal_process_id_file_created.toml

* Update discovery_kernel_module_enumeration_via_proc.toml

* Update discovery_linux_modprobe_enumeration.toml

* Update execution_remote_code_execution_via_postgresql.toml

* Update discovery_potential_syn_port_scan_detected.toml

* Added 2 tunings, sorry I missed those..

* One more tune

* Update discovery_suspicious_proc_enumeration.toml

(cherry picked from commit a7ff449)
protectionsmachine pushed a commit that referenced this pull request Aug 3, 2023
* [Rule Tuning] Doing some quick tunings

* updated_date bump

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_sysctl_enumeration.toml

* Update rules/linux/persistence_init_d_file_creation.toml

* Update rules/linux/persistence_rc_script_creation.toml

* Update rules/linux/persistence_shared_object_creation.toml

* deprecate rule

* deprecate rule

* Update execution_abnormal_process_id_file_created.toml

* Update discovery_kernel_module_enumeration_via_proc.toml

* Update discovery_linux_modprobe_enumeration.toml

* Update execution_remote_code_execution_via_postgresql.toml

* Update discovery_potential_syn_port_scan_detected.toml

* Added 2 tunings, sorry I missed those..

* One more tune

* Update discovery_suspicious_proc_enumeration.toml

(cherry picked from commit a7ff449)
protectionsmachine pushed a commit that referenced this pull request Aug 3, 2023
* [Rule Tuning] Doing some quick tunings

* updated_date bump

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_modprobe_enumeration.toml

* Update rules/linux/discovery_linux_sysctl_enumeration.toml

* Update rules/linux/persistence_init_d_file_creation.toml

* Update rules/linux/persistence_rc_script_creation.toml

* Update rules/linux/persistence_shared_object_creation.toml

* deprecate rule

* deprecate rule

* Update execution_abnormal_process_id_file_created.toml

* Update discovery_kernel_module_enumeration_via_proc.toml

* Update discovery_linux_modprobe_enumeration.toml

* Update execution_remote_code_execution_via_postgresql.toml

* Update discovery_potential_syn_port_scan_detected.toml

* Added 2 tunings, sorry I missed those..

* One more tune

* Update discovery_suspicious_proc_enumeration.toml

(cherry picked from commit a7ff449)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants