Commit Graph

413 Commits

Author SHA1 Message Date
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
Samirbous 6e3b38c645 [New] Suspicious Microsoft 365 UserLoggedIn via OAuth Code (#4691) 2025-05-06 12:53:33 +05:30
Terrance DeJesus 57be590d73 [New Rule] Adding Coverage for Suspicious Activity via Auth Broker On-Behalf-of Principal User (#4687) 2025-05-06 12:41:57 +05:30
Terrance DeJesus 58d03d4043 [New Rule] Adding Coverage for Microsoft Entra ID SharePoint Access for User Principal via Auth Broker (#4695)
* new rule 'Microsoft Entra ID SharePoint Access for User Principal via Auth Broker'

* updated severity

* added new terms note
2025-05-05 16:45:47 -04:00
Samirbous dddc2a7bb9 [New] Microsoft 365 OAuth Redirect to Device Registration for User (#4694)
* [New] Microsoft 365 OAuth Redirect to Device Registration for User Principal

https://github.com/elastic/ia-trade-team/issues/590

* Update non-ecs-schema.json

* Update pyproject.toml

* Update credential_access_antra_id_device_reg_via_oauth_redirection.toml

* Update credential_access_antra_id_device_reg_via_oauth_redirection.toml

* Update credential_access_antra_id_device_reg_via_oauth_redirection.toml

* fixed investigation guide formatting; fixed unit test failure

* updated patch version

---------

Co-authored-by: terrancedejesus <terrance.dejesus@elastic.co>
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2025-05-02 08:36:10 +01:00
Terrance DeJesus ce66f52aad [New Rule] Adding Coverage for Microsoft Entra ID Protection Anonymized IP Risk Detection (#4689)
* Adding new rule 'Microsoft Entra ID Protection Anonymized IP Risk Detection'

* updating description

* adding index

* updating mitre tactic mapping

* updating file name
2025-05-01 23:03:50 -04:00
Terrance DeJesus bae7835f6a [New Rule] MSFT Tenant OAuth Phishing via First-Party VSCode Client (#4642)
* new rules for MSFT Oauth phishing in Azure, Entra and Microsoft 365

* changed m365 file name

* fixed duplicate tactics

* updaing non-ecs for graph activity logs

* updating rules; investigation guides; formatting, linting errors
2025-05-01 22:38:41 -04:00
Terrance DeJesus ff2ecad573 [New Rule] Adding Coverage for AWS S3 Static Site JavaScript File Uploaded (#4617)
* new rule 'AWS S3 Static Site JavaScript File Uploaded'

* adjusting name

* updated keep command

---------

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2025-04-30 16:25:03 -04:00
Terrance DeJesus f02ccfef64 [New Rule] Adding Coverage for AWS IAM or STS API Calls via Temporary Session Tokens (#4628)
* adding new rule 'AWS IAM or STS API Calls via Temporary Session Tokens'

* updated name and query logic

* updated query logic

* changed rule to new terms

* fixed logic

* Update rules/integrations/aws/persistence_iam_sts_api_calls_via_user_session_token.toml

* Update rules/integrations/aws/persistence_iam_sts_api_calls_via_user_session_token.toml

* updated investigation guide; scoped to IAM only; updated naming

* updating file name

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
2025-04-24 15:39:51 -04:00
Isai b429be2bda [Rule Tuning] O365 Exchange Suspicious Mailbox Right Delegation (#4648) 2025-04-24 10:19:06 +05:30
Samirbous ea31143b83 [New] Suspicious Azure Sign-in via Visual Studio Code (#4639)
* Create initial_access_entra_login_visual_code_phish.toml

* Update non-ecs-schema.json

* Update initial_access_entra_susp_visual_code_signin.toml

* Update pyproject.toml

* Update initial_access_entra_susp_visual_code_signin.toml

* Update non-ecs-schema.json
2025-04-23 14:06:05 +01:00
Terrance DeJesus c58d59eeb7 [New Rule] Adding Coverage for AWS CLI with Kali Linux Fingerprint Identified (#4625)
* adding new rule 'AWS CLI with Kali Linux Fingerprint Identified'

* updating rule logic

* updating mitre mapping

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2025-04-21 12:06:57 -04:00
Terrance DeJesus 94237798a5 [New Rule] Adding Coverage for AWS IAM Virtual MFA Device Registration (#4626)
* adding new rule 'AWS IAM Virtual MFA Device Registration Attempt with Session Token'

* updating rule

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2025-04-21 11:02:14 -04:00
Terrance DeJesus 96c2d0ca85 [New Rule] Adding Coverage for AWS Temporary User Session Token Used from Multiple Addresses (#4624)
* adding new rule 'AWS STS Temporary IAM Session Token Used from Multiple Addresses'

* updating rule assets

* updating mitre mapping

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2025-04-17 16:06:40 -04:00
Terrance DeJesus ba16e27edb [Rule Tuning] Tuning Azure Service Principal Credentials Added (#4570)
* tuning 'Azure Service Principal Credentials Added'

* updated patch version

* added investigation guide

* updating patch version

* updating patch version
2025-04-16 13:58:17 -04:00