Commit Graph

2956 Commits

Author SHA1 Message Date
Eric Forte dde448ee6b [Bug] Rule Toml Write Formatting Wrongly Formats \\\\x (#4978)
* Fix rule and mitigate py toml

* Bump patch version

* Add reference to issue

* Add unit test for path issues

* Update comment

* Certain strings were not properly escaped

* Updated to use json instead of repr

* replace _old_dump_str with json.dumps

* Bump Version
2025-08-18 17:03:51 -04:00
github-actions[bot] fb76ec1b2d Lock versions for releases: 8.18,8.19,9.0,9.1 (#4991) 2025-08-18 22:36:37 +05:30
Samirbous 9dfc42aa1d [Tuning] Connection to Commonly Abused Web Services - alerts JetBrains to GH (#4973)
* Update command_and_control_common_webservices.toml

* Update command_and_control_common_webservices.toml

---------

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2025-08-18 17:21:04 +01:00
Jonhnathan 58f62fd138 [Rule Tuning] Suspicious Windows Powershell Arguments (#4961) 2025-08-18 09:02:04 -07:00
Jonhnathan 0507bcd150 [Rule Tuning] ES|QL PowerShell Rules (#4984) 2025-08-18 08:44:18 -07:00
Jonhnathan 273650d746 [Rule Tuning] Potential RemoteMonologue Attack (#4967)
* [Rule Tuning] Potential RemoteMonologue Attack

* Update defense_evasion_regmod_remotemonologue.toml
2025-08-18 08:22:53 -07:00
shashank-elastic c28b6d84b5 Investigation guides Update (#4990) 2025-08-18 20:36:46 +05:30
Samirbous 1557eae9d4 [New] Command Line Obfuscation via Whitespace Padding (#4860)
* Create defense_evasion_whitespace_padding_command_line.toml

* Update defense_evasion_whitespace_padding_command_line.toml

* Update defense_evasion_whitespace_padding_command_line.toml

* Update and rename defense_evasion_whitespace_padding_command_line.toml to defense_evasion_whitespace_padding_command_line.toml

* Update rules/cross-platform/defense_evasion_whitespace_padding_command_line.toml

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update rules/cross-platform/defense_evasion_whitespace_padding_command_line.toml

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>

* Update defense_evasion_whitespace_padding_command_line.toml

* Update defense_evasion_whitespace_padding_command_line.toml

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
2025-08-18 15:26:52 +01:00
Jonhnathan 5f7b821e12 [Rule Tuning] Suspicious PrintSpooler Service Executable File Creation (#4976)
Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
2025-08-18 06:29:28 -07:00
Samirbous 36b33e2c13 Update persistence_services_registry.toml (#4989) 2025-08-18 14:05:25 +01:00
Isai b7de4f5126 [Tuning] SDH - Investigating MFA Deactivation with no Re-Activation for Okta User Account (#4986)
* [Tuning] SDH - Investigating MFA Deactivation with no Re-Activation for Okta User Account

This tuning addresses SDH ticket by:
- replacing sequence by `okta.actor.id` with `okta.target.id` in query. This will ensure the deactivation and activation attempts are measured against the target entity. To account for instances where separate users (okta.actor.id) perform deactivation and activation actions against the same target account (okta.target.id)
- Adjusts the investigation guide to use correct target vs. actor fields

* add actor and target id fields to investigation guide

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2025-08-15 18:02:15 -04:00
Jonhnathan c8ee4c8ce3 [New Rule] Potential Web Shell ASPX File Creation (#4939)
* [New Rule] Potential Web Shell ASPX File Creation

* Update persistence_web_shell_aspx_write.toml

* Update persistence_web_shell_aspx_write.toml
2025-08-15 12:09:06 -03:00
Jonhnathan 532b68cc93 [Rule Tuning] PowerShell Script Block Logging Disabled (#4980) 2025-08-14 17:29:45 -03:00
Terrance DeJesus e3a7ee94fc [Rule Tuning] Microsoft Entra ID Suspicious Session Reuse to Graph Access (#4954)
* adjusted query

* add keep; lint

* Update rules/integrations/azure/initial_access_entra_graph_single_session_from_multiple_addresses.toml

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>

---------

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2025-08-13 17:41:58 -04:00
Jonhnathan 8f441a7191 [Rule Tuning] Creation or Modification of Root Certificate (#4970)
* [Rule Tuning] Creation or Modification of Root Certificate

* Update defense_evasion_create_mod_root_certificate.toml

* Update rules/windows/defense_evasion_create_mod_root_certificate.toml

---------

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
2025-08-13 09:41:57 -03:00
Jonhnathan 1dd1bb8f1e [Rule Tuning] Fixes FPs related to a process.args_count bug (#4971) 2025-08-13 08:46:46 -03:00
github-actions[bot] 154283f457 Lock versions for releases: 8.18,8.19,9.0,9.1 (#4963) 2025-08-06 08:58:16 +05:30
Terrance DeJesus b28338c680 [Rule Tuning] ESQL Query Field Dynamic Field Standardization (#4912)
* adjusted Potential Widespread Malware Infection Across Multiple Hosts

* adjusted Microsoft Azure or Mail Sign-in from a Suspicious Source

* adjusted AWS EC2 Multi-Region DescribeInstances API Calls

* adjusted AWS Discovery API Calls via CLI from a Single Resource

* adjusted AWS Service Quotas Multi-Region  Requests

* adjusted AWS EC2 EBS Snapshot Shared or Made Public

* adjusted AWS S3 Bucket Enumeration or Brute Force

* adjusted AWS EC2 EBS Snapshot Access Removed

* adjusted Potential AWS S3 Bucket Ransomware Note Uploaded

* adjusted AWS S3 Object Encryption Using External KMS Key

* adjusted AWS S3 Static Site JavaScript File Uploaded

* adjusted AWS Access Token Used from Multiple Addresses

* adjusted AWS Signin Single Factor Console Login with Federated User

* adjusted AWS IAM AdministratorAccess Policy Attached to Group

* adjusted AWS IAM AdministratorAccess Policy Attached to Role

* adjusted AWS IAM AdministratorAccess Policy Attached to User

* adjusted AWS Bedrock Invocations without Guardrails Detected by a Single User Over a Session

* adjusted AWS Bedrock Guardrails Detected Multiple Violations by a Single User Over a Session

* adjusted AWS Bedrock Guardrails Detected Multiple Policy Violations Within a Single Blocked Request

* adjusted Unusual High Confidence Content Filter Blocks Detected

* adjusted Potential Abuse of Resources by High Token Count and Large Response Sizes

* AWS Bedrock Detected Multiple Attempts to use Denied Models by a Single User

* Unusual High Denied Sensitive Information Policy Blocks Detected

* adjusted Unusual High Denied Topic Blocks Detected

* adjusted AWS Bedrock Detected Multiple Validation Exception Errors by a Single User

* adjusted Unusual High Word Policy Blocks Detected

* adjusted Microsoft Entra ID Concurrent Sign-Ins with Suspicious Properties

* adjusted Azure Entra MFA TOTP Brute Force Attempts

* adjusted Microsoft Entra ID Sign-In Brute Force Activity

* adjusted Microsoft Entra ID Exccessive Account Lockouts Detected

* adjusted Microsoft 365 Brute Force via Entra ID Sign-Ins

* deprecated Azure Entra Sign-in Brute Force Microsoft 365 Accounts by Repeat Source

* adjusted Microsoft Entra ID Session Reuse with Suspicious Graph Access

* adjusted Suspicious Microsoft OAuth Flow via Auth Broker to DRS

* adjusted Potential Denial of Azure OpenAI ML Service

* adjusted Azure OpenAI Insecure Output Handling

* adjusted Potential Azure OpenAI Model Theft

* adjusted M365 OneDrive Excessive File Downloads with OAuth Token

* adjusted Multiple Microsoft 365 User Account Lockouts in Short Time Window

* adjusted Potential Microsoft 365 User Account Brute Force

* adjusted Suspicious Microsoft 365 UserLoggedIn via OAuth Code

* adjusted Multiple Device Token Hashes for Single Okta Session

* adjusted Multiple Okta User Authentication Events with Client Address

* adjusted Multiple Okta User Authentication Events with Same Device Token Hash

* adjusted High Number of Okta Device Token Cookies Generated for Authentication

* adjusted Okta User Sessions Started from Different Geolocations

* adjusted High Number of Egress Network Connections from Unusual Executable

* adjusted Unusual Base64 Encoding/Decoding Activity

* adjusted Potential Port Scanning Activity from Compromised Host

* adjusted Potential Subnet Scanning Activity from Compromised Host

* adjusted Unusual File Transfer Utility Launched

* adjusted Potential Malware-Driven SSH Brute Force Attempt

* adjusted Unusual Process Spawned from Web Server Parent

* adjusted Unusual Command Execution from Web Server Parent

* adjusted  Rare Connection to WebDAV Target

* adjusted Potential PowerShell Obfuscation via Invalid Escape Sequences

* adjusted Potential PowerShell Obfuscation via Backtick-Escaped Variable Expansion

* adjusted Unusual File Creation by Web Server

* adjusted Potential PowerShell Obfuscation via High Special Character Proportion

* adjusted Potential Malicious PowerShell Based on Alert Correlation

* adjusted Potential PowerShell Obfuscation via Character Array Reconstruction

* adjusted Potential PowerShell Obfuscation via String Reordering

* adjusted Potential PowerShell Obfuscation via String Concatenation

* adjusted Potential PowerShell Obfuscation via Reverse Keywords

* adjusted PowerShell Obfuscation via Negative Index String Reversal

* adjusted Dynamic IEX Reconstruction via Method String Access

* adjusted Potential Dynamic IEX Reconstruction via Environment Variables

* adjusted Potential PowerShell Obfuscation via High Numeric Character Proportion

* adjusted Potential PowerShell Obfuscation via Concatenated Dynamic Command Invocation

* adjusted Rare Connection to WebDAV Target

* adjusted Potential PowerShell Obfuscation via Invalid Escape Sequences

* adjusted Potential PowerShell Obfuscation via Backtick-Escaped Variable Expansion

* adjusted Potential PowerShell Obfuscation via Character Array Reconstruction

* adjusted Potential PowerShell Obfuscation via High Special Character Proportion

* adjusted Potential PowerShell Obfuscation via Special Character Overuse

* adjusted Potential PowerShell Obfuscation via String Reordering

* adjusted Suspicious Microsoft 365 UserLoggedIn via OAuth Code

* adjusted fields that were inconsistent

* adjusted additional fields

* adjusted esql to Esql

* adjusted several rules for common field names

* updating rules

* updated dates

* updated dates

* updated ESQL fields

* lowercase all functions and logical operators

* adjusted dates for unit tests

* Update Esql_priv to Esql_temp as these don't hold PII

* PowerShell adjustments

* Make query comments consistent

* update comment

* reverted 2856446a-34e6-435b-9fb5-f8f040bfa7ed

* Update rules/windows/discovery_command_system_account.toml

* removed dot notation

---------

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2025-08-05 19:35:41 -04:00
Mika Ayenson, PhD 215cdf0f8f [Rule Tuning] Elastic Security External Alerts (#4962) 2025-08-05 15:48:10 -05:00
Eric Forte a726da5e83 [Bug] [DAC] Custom Rules Filter Discrepancy on Stacks Upgraded to 8.18 (#4945)
* Update Custom Rules KQL

* Bump Patch Version

* Update detection_rules/kbwrap.py

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>

* Use or instead of and

* Bump patch version

* Fix results len typo

---------

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
2025-08-05 09:42:25 -04:00
github-actions[bot] c210a88b1f Lock versions for releases: 8.18,8.19,9.0,9.1 (#4960) 2025-08-04 22:37:59 +05:30
Mika Ayenson, PhD 80e44d0fb8 [Rule Tuning] AI4DSOC External Promotion Alerts (#4959) 2025-08-04 11:27:00 -05:00
shashank-elastic 2c2b15368c Update latest integration manifests and schema and investigation guides (#4957) 2025-08-04 19:30:01 +05:30
Sergey Polzunov ff46a7ab4a fix: Allow different order of the metadata fields in ESQL queries (#4956)
* Initial commit

* Python project version bump
2025-08-02 02:26:39 +02:00
Jonhnathan 04ca2c8128 [New Rule] Unusual Web Config File Access (#4927)
* [New Rule] Unusual Web Config File Access

* Update credential_access_web_config_file_access.toml
2025-08-01 09:35:08 -03:00
Jonhnathan 3de9456197 [Rule Tuning] Script Execution via Microsoft HTML Application (#4950) 2025-08-01 07:55:14 -03:00
Eric Forte a9ad66935c [FR] [DAC] Add Arbitrary File location Support for Local Creation Date (#4915)
* Add support for local file contents

* Update Rule Params

* Update CLI docs

* Update to Pathlib

* Format updating

* Delete duplicate

* Update logic to handle just local_contents path

* Update to Glob Based Approach

* Updated to use RawRuleCollection

* Fix Logging Typo

* New utils functions no longer needed

* Update naming for convention
2025-07-31 14:35:00 -04:00
Eric Forte bf3071d3d1 [FR] Add white space checking for KQL parse (#3789)
* Add whitespace checking for KQL parse

* Add unit test for blank space check

* Bump patch version

* Add test cases for newline blank space

* Add additional unit tests

* Update to only walk tree once

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2025-07-31 14:23:53 -04:00
Mika Ayenson, PhD 1dc3926203 [New Rules] External Promotion Alerts (#4903) 2025-07-31 11:00:50 -05:00
Mika Ayenson, PhD f2fac1bc48 [FR] [DAC] Add existing mitre threat information on import (#4948) 2025-07-31 09:44:09 -05:00
Terrance DeJesus 0e78ce360b [Rule Tuning] Microsoft Azure or Mail Sign-in from a Suspicious Source (#4946)
* change indices in ESQL query

* adjusted rule name
2025-07-31 09:57:02 -04:00
Terrance DeJesus 756a7f49ba [Rule Tuning] Microsoft Entra ID MFA TOTP Brute Force Attempts (#4937)
* tuning rule 'Microsoft Entra ID MFA TOTP Brute Force Attempts'

* adjusted logic
2025-07-29 09:24:20 -04:00
github-actions[bot] f348e92f06 Lock versions for releases: 8.18,8.19,9.0,9.1 (#4926) 2025-07-22 21:19:44 +05:30
Eric Forte 0cb1e596b3 [Bug] [DAC] Kibana Export Rules Rule Name Filter Exports All Rules (#4917)
* Add check for not rule_id
2025-07-22 11:32:17 -04:00
shashank-elastic 64db33a50b [Rule Tuning] Azure Key Vault Secret Key Usage by Unusual Identity (#4925) 2025-07-22 20:22:31 +05:30
github-actions[bot] 3bec392e66 Lock versions for releases: 8.18,8.19,9.0,9.1 (#4924) 2025-07-22 18:10:32 +05:30
Mika Ayenson, PhD 3b9e927ca8 [Rule Tuning] OIDC Discovery URL Changed in Entra ID (#4923) 2025-07-22 17:31:45 +05:30
github-actions[bot] b3c681e475 Lock versions for releases: 8.18,8.19,9.0,9.1 (#4922) 2025-07-22 12:50:27 +05:30
shashank-elastic 2a73a572fb Investigation guides Update (#4920) 2025-07-22 07:52:48 +05:30
Ruben Groenewoud 5c901841a3 [New Rule] Potential Impersonation Attempt via Kubectl (#4833)
* [New Rule] Potential Impersonation Attempt via Kubectl

* ++

* Update defense_evasion_potential_kubectl_impersonation.toml
2025-07-21 10:03:03 +02:00
Isai 15d71a3e5c [Rule Tuning] AWS EC2 AMI Shared with Another Account (#4914) 2025-07-21 10:12:13 +05:30
Isai 7c45304672 [Rule Deprecated] Deprecated - AWS EC2 Snapshot Activity (#4913)
Completing Deprecation process for AWS EC2 Snapshot Activity

- It's been 2 rule releases since initial name change
- changed maturity to deprecation
- updated deprecation_date
- moved file to _deprecated folder
2025-07-18 19:35:35 -04:00
Isai b141ebcfa6 [Rule Tunings] Reduce Usage of Flattened Fields in AWS Rules (#4892)
* [Rule Tunings] Reduce Usage of Flattened Fields in AWS Rules

This PR is in part a response to the following issues regarding the future of flattened fields in AWS, which we use as an essential part of our ruleset. However, this is also in response to the ongoing ruleset audit. Some of the flattened fields used are not truly necessary for the alert to trigger or can be replaced by a different field. Those changes have been made here and our non_ecs file has been edited to remove the unnecessary fields. Additionally, flattened fields have been removed from highlighted fields, and from investigation guides.

* Update discovery_ec2_userdata_request_for_ec2_instance.toml

updated_date

* Update execution_ssm_sendcommand_by_rare_user.toml

updated_date

* Update non-ecs-schema.json

add necessary field for ModifyInstanceAttribute action

* Update persistence_ec2_security_group_configuration_change_detection.toml

added missing event.action AuthorizeSecurityGroupIngress, narrowed scope for ModifyInstanceAttribute action by adding a necessary flattened_field

* Update privilege_escalation_iam_customer_managed_policy_attached_to_role.toml

updated min_stack_version for new field target.entity.id

* Update privilege_escalation_iam_customer_managed_policy_attached_to_role.toml

* Update privilege_escalation_iam_update_assume_role_policy.toml

updating min_stack to account of target.entity.id field

* Update impact_s3_excessive_object_encryption_with_sse_c.toml

adding highlighted fields

* Update rules/integrations/aws/exfiltration_dynamodb_table_exported_to_s3.toml

* Apply suggestions from code review

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
2025-07-18 19:15:36 -04:00
Terrance DeJesus c2880afa06 [New Rule] OIDC Discovery URL Changed in Entra ID (#4908)
* new rule OIDC Discovery URL Changed in Entra ID

* added references

* removed indexes

* Update rules/integrations/azure/persistence_entra_id_oidc_discovery_url_change.toml

* adjusted for ESQL standardization
2025-07-18 10:26:02 -04:00
Terrance DeJesus a3a2fcdff5 [New Rule] Azure Key Vault Secret Key Usage by Unusual Identity (#4900)
* new rule Azure Key Vault Secret Key Usage by Unusual Identity

* added index

* added non-ecs field

* added azure.resource.name to new terms

* Update rules/integrations/azure/credential_access_azure_key_vault_retrieval_from_rare_identity.toml

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>

* Update rules/integrations/azure/credential_access_azure_key_vault_retrieval_from_rare_identity.toml

* adjusted new terms

* Update rules/integrations/azure/credential_access_azure_key_vault_retrieval_from_rare_identity.toml

---------

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
2025-07-18 10:01:45 -04:00
Terrance DeJesus 8e99bace44 [New Rule] External Authentication Method Addition or Modification in Entra ID (#4906)
* new rule External Authentication Method Addition or Modification in Entra ID

* added references

* adjusted to new terms
2025-07-18 09:45:33 -04:00
Terrance DeJesus 72afee06ca [New Rule] Excessive Secret or Key Retrieval from Azure Key Vault (#4898)
* new rule Excessive Secret or Key Retrieval from Azure Key Vault

* adjusted query for ESQL standardization

* adjusted from ESQL to Esql
2025-07-18 09:30:10 -04:00
Ruben Groenewoud 9f46d5b496 [New Rule] Kubernetes Unusual Decision by User Agent (#4829)
* [New Rule] Kubernetes Unusual Request Response by User Agent

* ++

* Update execution_unusual_request_response_by_user_agent.toml

* Update rules/integrations/kubernetes/execution_unusual_request_response_by_user_agent.toml

* Update execution_unusual_request_response_by_user_agent.toml

* Update rules/integrations/kubernetes/execution_unusual_request_response_by_user_agent.toml
2025-07-18 09:44:02 +02:00
Terrance DeJesus 0f8c53e4d2 [Rule Tuning] Azure Key Vault Modified (#4896)
* tuning rule Azure Key Vault Modified

* Update rules/integrations/azure/impact_azure_key_vault_modified.toml

* adjusted description

* Update rules/integrations/azure/impact_azure_key_vault_modified.toml

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
2025-07-17 09:31:58 -04:00
Ruben Groenewoud d510a965e9 [New Rule] Unusual Kill Signal (#4911)
* [New Rule] Unusual Kill Signal

* Update defense_evasion_unsual_kill_signal.toml

* Update defense_evasion_unsual_kill_signal.toml
2025-07-17 15:05:28 +02:00