Commit Graph

577 Commits

Author SHA1 Message Date
Terrance DeJesus 6a083ec984 [New Rule] Unusual ROPC Login Attempt by User Principal (#4871)
* new rule Unusual ROPC Login Attempt by User Principal

* linted
2025-07-03 14:43:19 -04:00
Ruben Groenewoud 8b3b1e516f [New Rule] Kubernetes Events Deleted (#4853)
* [New Rule] Kubernetes Events Deleted

* Update defense_evasion_events_deleted.toml
2025-07-03 10:22:03 +02:00
Terrance DeJesus 016cdf2cbb [New Rule] Microsoft Entra ID Suspicious Cloud Device Registration (#4802)
* new rule Microsoft Entra ID Suspicious Cloud Device Registration

* adjusted backticks in non-ecs and rule

* linted

* adjusted uuid; bumped patch version
2025-07-02 10:03:08 -04:00
Terrance DeJesus 10d95baa2b [Rule Tuning] Microsoft Entra ID Exccessive Account Lockouts Detected (#4851)
* adjusting Microsoft Entra ID Exccessive Account Lockouts Detected

* removing unit test

* added newline

* adjusted dates
2025-07-01 08:18:18 -04:00
Ruben Groenewoud 2c4157066f [New Rule] Kubernetes Forbidden Creation Request (#4843) 2025-06-30 10:20:33 +02:00
Isai bf1dc2547f [Rule Tunings] AWS SSM Command Document Created by Rare User (#4848)
* [Rule Tunings] AWS SSM Command Document Created by Rare User

## AWS SSM Command Document Created by Rare User
Rule executes as expected and has very few alerts in telemetry. However, it is one of the rules timing out occasionally.
- reduced execution window
- reduced new terms history window
- replaced wildcards with the flattened field in the query, which should improve performance
- replaced `aws.cloudtrail.user_identity.arn` with combination of `cloud.account.id` and `user.name` to account for Assumed Roles. This will only evaluate the role instead of each individual role session, which will improve performance.
- added investigation fields
- corrected tags
- added mitre technique

## AWS SSM `SendCommand` Execution by Rare User"
- added investigation fields
- added tag

* update pyproject.toml

update pyproject.toml version
2025-06-27 13:24:27 -04:00
Terrance DeJesus 3bd9ab8d1d [New Rule] Excessive Microsoft 365 Mailbox Items Accessed (#4825)
* new rule Excessive Microsoft 365 Mailbox Items Accessed

* bumping patch version
2025-06-26 12:51:11 -04:00
Terrance DeJesus fb03295bbf tuning Suspicious Microsoft 365 UserLoggedIn via OAuth Code (#4847) 2025-06-26 10:43:57 -04:00
Terrance DeJesus ba429070e3 [New Rule] Entra ID RT to PRT Transition from Same User and Device (#4845) 2025-06-25 14:52:50 -04:00
Isai fe327a7560 [Rule Tunings] AWS Role Assumption By Service / User (#4827)
AWS Role Assumption By Service
The newest versions of this rule seem fine in telemetry and the rule executes as expected
- removed MD from description
- adjusted execution window for 1 m look back
- fixed inaccuracies in Investigation Guide
- added Lateral Movement tag
- adjusted highlighted fields
- reduced history window from 14 to 10 days

AWS Role Assumption By User
This rule seem fine in telemetry and the rule executes as expected
- removed MD from description
- fixed inaccuracies in Investigation Guide
- added Lateral Movement tag
- adjusted highlighted fields
- added `cloud.account.id` to new_terms field to account for duplicate user.names across cloud accounts
- replaced new terms flattened field for `aws.cloudtrail.resources.arn`, which gives the same result and remains consistent with the other rule.
2025-06-24 18:07:18 -04:00
Isai 1ed322f8d9 [Rule Tuning] AWS SSM SendCommand Execution by Rare User (#4828)
Rule is triggering as expected, very low instances of alerts in telemetry
- adjusted execution window
- slight edits to IG for accuracy
- removed exclusion `and not aws.cloudtrail.user_identity.arn: *AWSServiceRoleForAmazonSSM/StateManagerService*` from the query. This is a service-linked role meant to be used by AWS internal services. Therefore, the existing exclusion `and not source.address: "ssm.amazonaws.com"` already excludes the use of this role by the SSM service. I show this in the screenshot below. This will remove the use of wildcards in the query and improve performance.
- changed the new terms fields to use combination of `cloud.account.id` and `user.name` so that only roles (and not individual role sessions) are being evaluated. adding `cloud.account.id` accounts for duplicate user.names across multiple accounts.
2025-06-24 17:22:20 -04:00
Terrance DeJesus c986138333 [Rule Tuning] Suspicious Microsoft 365 Mail Access by Unusual ClientAppId (#4806)
* tuning rule Suspicious Microsoft 365 Mail Access by Unusual ClientAppId

* adjusted tactic tag

* updating patch version

* updating patch version

* bumping patch version
2025-06-24 14:20:33 -04:00
Ruben Groenewoud d59addb710 [Rule Tuning] Sharpening Kubernetes Rules Indices (#4822)
* [Rule Tuning] Sharpening Kubernetes Rules Indices

* ++
2025-06-24 14:11:31 +02:00
Ruben Groenewoud b9c6517666 [New Rule] Forbidden Request from Unusual User Agent in Kubernetes (#4818)
* [New Rule] Forbidden Request from Unusual User Agent in Kubernetes

* Update rules/integrations/kubernetes/execution_forbidden_request_from_unsual_user_agent.toml
2025-06-19 09:43:28 +02:00
Terrance DeJesus 0aefedd6f1 [New Rule] Suspicious ADRS Token Request by Microsoft Auth Broker (#4801)
* new rule Suspicious ADRS Token Request by Microsoft Auth Broker

* bumping patch version

* updating patch version
2025-06-18 14:41:04 -04:00
Terrance DeJesus 0c68fcb7d9 [New Rule] Entra ID User Signed In from Unusual Device (#4804)
* new rule Entra ID User Signed In from Unusual Device

* adjusted patch version

* adjusted patch version

* updating patch version
2025-06-18 14:13:42 -04:00
Terrance DeJesus 7b1139b219 [Rule Tuning] Expand Scope of Entra ID Brute Force Sign-In Attempts (#4777)
* tuning rule to not be M365 specific

* adjusted rules

* linted

* linted; adjusted descriptions

* tuned rule logic

* adjusted time logic

* adjusted query logic

* removed 50053 from inclusion

* adjusted query
2025-06-18 10:59:50 -04:00
Terrance DeJesus 4fb8483f2d [Rule Tuning] Suspicious Activity via Auth Broker On-Behalf-of Principal User (#4793)
* rule tuning Suspicious Activity via Auth Broker On-Behalf-of Principal User

* adjusted investigation guide

* adjusted time
2025-06-17 19:10:55 -04:00
Isai 133a0799cd [Rule Tuning] AWS IAM Assume Role Policy Update (#4799)
* [Rule Tuning] AWS IAM Assume Role Policy Update

- changed time window to have only 1 minute lookback
- changed the new terms field to look at combination of cloud.account.id, user.name, and roleName. This is to account for the problem with using user_identity.arn for AssumedRoles. Roles are identities in AWS that are granted a set of permissions and can then be assumed by various users across many different sessions. Each of these sessions is designated a session name which is attached to the `user_identity.arn`. This means that each time a Role is assumed, there is a unique user_identity.arn created. This rule is meant to capture unique instances of the Role itself which is captured separate from the individual session names in the `user.name` field. `cloud.account.id` has been added to the new_terms fields to account for organizations with multiple AWS account ids, which may reuse certain user.names across accounts.

This may improve performance especially in environments where there are many users assuming the same role and updating it's trust policy as a part of normal operations.

* remove markdown from description
2025-06-17 15:03:55 -04:00
Isai 74d1715f6e [Rule Tuning] AWS EC2 User Data Retrieval for EC2 Instance (#4808)
* [Rule Tuning] AWS EC2 User Data Retrieval for EC2 Instance

- changed execution window
- explicitly added flattened fields to query, to reduce wildcard usage
- added investigation fields
- changed new terms field to evaluate `user.name` over `aws.cloudtrail.user_identity.arn` so that only the role name for Assumed Role identitites is being evaluated instead of each individual session. This should greatly impact performance as most instances of this rule in telemetry is triggered by Assumed Roles.

* Apply suggestions from code review

* remove instanceId parameter

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
2025-06-17 14:51:18 -04:00
Isai cd003fc9a7 [New Rule] AWS CloudTrail Log Evasion (#4788)
* [New Rule] AWS CloudTrail Log Evasion

Identifies the evasion of cloudtrail logging for IAM actions involving policy creation, modification or attachment. When making certain policy-related API calls, an adversary may pad the associated policy document with whitespaces to trigger CloudTrail’s logging size constraints, resulting in incomplete logging where critical details about the policy are omitted. By exploiting this gap, threat actors can bypass monitoring performed through CloudTrail and can effectively obscure unauthorized changes. This rule looks for IAM API calls with the requestParameters property containing reason:”requestParameters too large” and omitted:true.

This is a known gap in AWS with no immediate remediation steps. While the size constraint issue affects additional services, IAM policy-related API calls are the only that pose a security risk which is why this rule is scoped specifically to `event.provider: iam.amazonaws.com`.  For additional background on the evasion technique refer to Permisso's [research](https://permiso.io/blog/cloudtrail-logging-evasion-where-policy-size-matters).

* aligning IG and rule name

* added investigation fields

added investigation fields

* change severity

* updating pyproject version
2025-06-17 13:58:26 -04:00
Isai e84892a115 [Rule Tuning] AWS EC2 Deprecated AMI Discovery (#4784)
* [Rule Tuning] AWS EC2 Deprecated AMI Discovery

Rule triggers as expected
Telemetry shows only known FP risks from tools that are intentionally including deprecated AMIs in their searches (these should be excluded by customers)
- changed the query to reduce use of multiple wildcards
- changed the execution window
- removed unnecessary parts of IG
- added to the highlighted fields

* update non-ecs-schema.json

update non-ecs-schema.json with field "aws.cloudtrail.flattened.request_parameters.ownersSet.items.owner"

* update version in pyproject.toml

update version in pyproject.toml

* Update pyproject.toml
2025-06-17 13:19:22 -04:00
Ruben Groenewoud ac57818efb [Rule Tuning] Kubernetes User Exec into Pod (#4814) 2025-06-17 14:02:29 +02:00
Terrance DeJesus c7c1586160 [Rule Deprecation] Azure Entra Sign-in Brute Force Microsoft 365 Accounts by Repeat Source (#4780)
* rule deprecation

* adjusted investigation guide
2025-06-10 12:02:54 -04:00
Terrance DeJesus 9569aa4860 [New Rule] Microsoft Entra ID Excessive Account Lockouts Detected (#4782)
* new rule Microsoft Entra ID Exccessive Account Lockouts Detected

* updating investigation guide

* removed user agent exception

* linted
2025-06-10 11:31:35 -04:00
Isai 11468edab6 [Rule Tuning] AWS EC2 Unauthorized Admin Credential Fetch via Assumed Role (#4774)
* [Rule Tuning] AWS EC2 Unauthorized Admin Credential Fetch via Assumed Role

- Edited Rule Name, Description, and Investigation Guide to better align with the behavior captured by this rule
- adjusted execution window
- added highlighted fields

* adding account id to highlighted fields

adding account id to highlighted fields

* changing AWS EC2 tag for consistency across EC2 rules

changing AWS EC2 tag for consistency across EC2 rules
2025-06-06 15:08:48 -04:00
Isai a9fe1b107a [Rule Tunings] AWS EC2 Flow Log Deletion and Network ACL Activity (#4778)
"AWS VPC Flow Logs Deletion"
Rule Triggers as expected
Telemetry looks fine
- changed time window
- added AWS EC2 tag
- Added highlighted fields
- updated Mitre technique

"AWS EC2 Network Access Control List Deletion"
Rule Triggers as expected
Telemetry looks fine
- changed time window
- added AWS EC2 tag
- Added highlighted fields
- updated Mitre technique

"AWS EC2 Network Access Control List Creation"
Rule Triggers as expected
Telemetry looks fine
- changed time window
- Added highlighted fields
- added Defense Evasion Mitre technique and tag
2025-06-06 14:11:54 -04:00
Isai 6538fb1662 [Rule Tuning][New Rule][Deprecation] AWS EC2 EBS Snapshot Activity Rules (#4763)
* [Rule Tuning][New Rule][Deprecation] AWS EC2 EBS Snapshot Activity Rules

1. Rule Tuning - to prevent duplicate alerts for AWS EC2 EBS Snapshot Shared of Made Public, the execution interval has been adjusted from 5m interval with 4m lookback to 5m interval with 1m lookback.
2. New Rule - to capture when access is removed from an EBS Snapshot. While this may be intentional behavior it could indicate malicious attempts to inhibit system recovery efforts post-compromise, or to maintain exclusive access to critical backups by removing permissions for all users except their own controlled account.
3. Deprecate - AWS EC2 Snapshot Activity is too broad a rule and the behavior of the other 2 rules resulting in duplicate alerts and non-specific context for which permission change type is happening (`add` vs `remove`).

* adding updated_date to new rule

* adding Deprecated to IG title

* adding source.address to keep fields
2025-06-04 10:49:52 -04:00
Terrance DeJesus 0a8c3ca471 new rule for bloodhound user agents (#4769) 2025-06-04 09:11:13 -04:00
Terrance DeJesus 71c82ec475 [New Rule] Entra ID Protection - Risk Detection - User Risk (#4762)
* new rule Entra ID Protection - Risk Detection - User Risk

* adding max signals note

* adjusted mitre mapping

* Update rules/integrations/azure/initial_access_entra_id_protection_user_risk_detected.toml

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

---------

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
2025-06-04 08:59:01 -04:00
Terrance DeJesus 61fb056f05 [Rule Tuning] Microsoft Entra ID Protection Anonymized IP Risk Detection (#4759)
* tuning Microsoft Entra ID Protection Anonymized IP Risk Detection

* adjusted tags and mappings

* added max signals

* adjusted file name

* adding max signals note

* adjusted mitre mapping
2025-06-04 08:31:21 -04:00
Isai c9a1ba358e [Tuning] AWS Access Token Used from Multiple Addresses (#4753)
* [Tuning] AWS Access Token Used from Multiple Addresses

Rule tuning for AWS STS Temporary IAM Session Token Used from Multiple Addresses

* update min stack

* add access key identification to IG

add access key identification to IG

---------

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
2025-06-02 11:32:05 -04:00
Terrance DeJesus aef166c301 [New Rule] Microsoft 365 Suspicious Inbox Rule to Delete or Move Emails (#4743)
* new rule Microsoft 365 Suspicious Inbox Rule to Delete or Move Emails

* updating uuid

* adjusted query logic per KQL parser

* adjusted metadata for integration
2025-06-02 10:02:18 -04:00
Terrance DeJesus bfca0ea414 [New Hunt] Commvault Supply Chain Threat (#4748)
* hunts for CommVault threat

* added lookback time to ESQL query

* updated query logic
2025-05-28 14:11:46 -04:00
Terrance DeJesus 17d98cc8dd [Rule Tuning] Tuning Azure Entra Sign-in Brute Force against Microsoft 365 Accounts (#4737)
* rule tuning 'Potential Microsoft 365 Brute Force via Entra ID Sign-Ins'

* updated lookback windows, date truncation times

* updated investigation guide
2025-05-28 13:45:15 -04:00
Terrance DeJesus 4bd8469c38 [New Rule] Microsoft Entra ID Elevated Access to User Access Administrator (#4742)
* new rule Microsoft Entra ID Elevated Access to User Access Administrator

* updating uuid
2025-05-28 13:33:22 -04:00
Terrance DeJesus 22d780f9af [New Rule] Microsoft Entra ID User Reported Suspicious Activity (#4740)
* new rule Microsoft Entra ID User Reported Suspicious Activity

* Update rules/integrations/azure/initial_access_entra_id_user_reported_risk.toml

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

---------

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
2025-05-28 11:55:51 -04:00
Terrance DeJesus 0d4db2ecfe tuning 'Microsoft Entra ID High Risk Sign-in' (#4739) 2025-05-28 11:40:04 -04:00
Terrance DeJesus fab0933df4 [Rule Tuning] Tuning Microsoft 365 Global Administrator Role Assigned (#4738)
* tuning 'Microsoft 365 Global Administrator Role Assigned'

* Update rules/integrations/o365/persistence_microsoft_365_global_administrator_role_assign.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/integrations/o365/persistence_microsoft_365_global_administrator_role_assign.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

* Update rules/integrations/o365/persistence_microsoft_365_global_administrator_role_assign.toml

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
2025-05-21 12:47:58 -04:00
Terrance DeJesus 82bee3e9c2 [Rule Tuning] Microsoft Graph First Occurrence of Client Request (#4728)
* tuning 'Microsoft Graph First Occurrence of Client Request'

* updated update date
2025-05-19 14:56:21 -04:00
Terrance DeJesus fcd70b284b [New Rule] Multiple Microsoft 365 User Account Lockouts in Short Time Window (#4717)
* new rule 'Multiple Microsoft 365 User Account Lockouts in Short Time Window'

* adjusted logic

---------

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2025-05-19 14:44:46 -04:00
Terrance DeJesus 3e0a9ec47b [Rule Tuning] Potential Microsoft 365 User Account Brute Force (#4716)
* tuning M365 brute force rule

* updated logic

* updated references

* adds minstack for values

* removed ignoring MSFT ASN

* Update rules/integrations/o365/credential_access_microsoft_365_potential_user_account_brute_force.toml

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>

---------

Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2025-05-19 14:08:38 -04:00
Terrance DeJesus 8f27c24528 [New Rule] Suspicious Email Access by First-Party Application via Microsoft Graph (#4704)
* new rule 'Suspicious Email Access by First-Party Application via Microsoft Graph'

* updated patch version

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2025-05-09 20:49:08 -04:00
Terrance DeJesus d83e1c711a [New Rule] Microsoft Entra Session Reuse with Suspicious Graph Access (#4711)
* new rule 'Microsoft Entra Session Reuse with Suspicious Graph Access'

* fixed tags; linted

* fixed mitre mappings

* updated name and investigation guide
2025-05-09 20:32:22 -04:00
Terrance DeJesus 762857f15f [Rule Tuning] Tuning Suspicious Mailbox Permission Delegation in Exchange Online (#4705)
* rule tuning 'Suspicious Mailbox Permission Delegation in Exchange Online'

* Update rules/integrations/o365/persistence_exchange_suspicious_mailbox_permission_delegation.toml

* updated date
2025-05-08 11:01:00 -04:00
shashank-elastic 0f3bfcd98a Fix new term doc broken link (#4706) 2025-05-07 17:03:58 +05:30
James Valente 36d595ae2f [Rule Tuning] Add exceptions for non-interactive signin failures for Entra M365 Bruteforce (#4405)
* Add exceptions for non-interactive signin failures.

Include exceptions for error codes, restricted to `NonInteractiveUserSignInLogs` and token refreshes:

- 70043 : Refresh token expired or no longer valid due to conditional access frequency checks
- 70044 : Session expired or no longer valid due to conditional access frequency checks
- 50057 : User account is disabled

* Update rules/integrations/azure/credential_access_entra_signin_brute_force_microsoft_365.toml

* Update metadata for `updated_date`

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
Co-authored-by: shashank-elastic <91139415+shashank-elastic@users.noreply.github.com>
2025-05-06 22:43:15 +05:30
Jonhnathan d3aa4b2f38 [Rule Tuning] Reduce Severity from Critical to High (#4637) 2025-05-06 21:37:47 +05:30
Terrance DeJesus a34a26ddec [Rule Tuning] Excluding Microsoft Entra ID Service Principal Addition Invoked by MSFT Identity (#4700)
* tuning rule to exclude service principals added by MSFT

* added additional exclusions

* updated rule name and file name

* updated investigation guide and mitre
2025-05-06 11:19:50 -04:00
Samirbous f480e98f16 [New] Concurrent Azure SignIns with Suspicious Properties (#4670) 2025-05-06 13:09:54 +05:30