Commit Graph

659 Commits

Author SHA1 Message Date
Isai a6d31d7dfd [New Rules] AWS IAM Long-Term Creds Abuse Coverage (#5918)
* [New Rules] AWS Long-Term Creds Abuse Coverage

This adds a two-layer approach to long-term IAM access key (AKIA*) abuse, aligned with reporting on stolen or leaked keys often abused as seen in Kudelski Security — Trivy supply-chain report.

### Layer 1 — AWS Long-Term Access Key First Seen from Source IP (9f8e3c5e-f72e-4e91-93f6-e98a4fae3e4f)
New Terms on CloudTrail when a given AKIA succeeds from a new `source.ip` in the history window.
Goal: catch novel use of a durable key (travel, new egress, or attacker infrastructure).

### Layer 2 — AWS Long-Term Access Key Correlated with Elevated Detection Alerts
Higher-order rule on open alerts that requires both the Layer 1 rule and at least one other open alert on the same `source.ip` at medium+ severity (or equivalent risk score).
Goal: raise priority when “new IP for this key” happens together with stronger, post-compromise-style signals.

The higher-order rule correlates on `source.ip` in .alerts-security.* index. In testing, I chose to tie the same sessions together using `source.ip` vs `access_key.id` because the alerts index did not expose this field for queries.

Screenshots below show testing that verified the approach. The same operator/session across Layer 1 rule, the sibling alert, and the Layer 2 correlation rule for two separate lab scenarios (e.g. a high-severity sibling rule and a  medium-severity sibling rule).

* adding IAM to rule names

* removing unnecessary ref

* Fixed Mitre tactics and tags

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2026-04-06 10:36:39 -04:00
Isai ca821414a4 [New Rule] AWS S3 Rapid Bucket Posture API Calls from a Single Principal (#5911)
* [New Rule] AWS S3 Rapid Bucket Posture API Calls from a Single Principal

Detects the same principal (`aws.cloudtrail.user_identity.arn`) from the same `source.ip` successfully calling a tight set of read-only S3 management APIs: ``` GetBucketAcl, GetBucketPublicAccessBlock, GetBucketPolicy, GetBucketPolicyStatus, GetBucketVersioning ``` against more than 15 distinct buckets (`aws.cloudtrail.resources.arn`) within a 10-second window.

The idea is grounded in cloud reconnaissance and scanner-style behavior discussed in Kudelski Security’s analysis of the Trivy supply chain story and related cloud activity. It explicitly called out automated assessment tooling and posture-oriented API use across ~24 buckets in a short time. It also highlighted the user's blind spot in telemetry with no Data events captured for S3 buckets. So would need to rely on management APIs for detection.

All our existing detections related to S3 rely on Data events and we have no explicit detections for scanner style recon sweeps as described in this threat report.

### Rule Design

- ES|QL with date_trunc(10 seconds, …) and count_distinct(aws.cloudtrail.resources.arn) grouped by time bucket, identity ARN, and source.ip.
- Management level API calls that are commonly used to identify bucket posture including public accessibility status and whether or not versioning is enabled (necessary info for ransomeware objectives)
- Excludes AWSService, requires source.ip, non-null aws.cloudtrail.resources.arn and user_identity.arn, and session_credential_from_console IS NULL to capture programmatic sessions over console behavior.
- Threshold 15 after evaluating rule in production environment to reduce noise from benign scanners and automation.
- low severity as this rule is FP prone until users add exclusions for known scanner behaviors specific to their environment

* correcting highlighted fields

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2026-04-06 10:06:35 -04:00
Terrance DeJesus 48128c1c66 [Rule Tuning] Entra ID Illicit Consent Grant via Registered Application - Fix New Terms Field (#5894)
* [Rule Tuning] Entra ID Illicit Consent Grant via Registered Application - Fix New Terms Field
Fixes #5893

* adding non-admin consented filter

* converting to ESQL

* additional query adjustments

* adjusted query KEEP

* updating non-ecs

* Apply suggestion from @terrancedejesus
2026-04-06 09:40:21 -04:00
Terrance DeJesus 6f23fb8d08 [Rule Tuning] M365 Identity OAuth Illicit Consent Grant by Rare Client and User (#5917)
Fixes #5916
2026-04-06 09:30:07 -04:00
Terrance DeJesus 1924fc3fae [Rule Tuning] Entra ID Service Principal with Unusual Source ASN (#5915)
* [Rule Tuning] Entra ID Service Principal with Unusual Source ASN
Fixes #5914

* optimizing query
2026-04-06 08:59:28 -04:00
shashank-elastic 199a4d6160 Monthly Manifest and Schema Updation (#5920) 2026-04-06 17:35:33 +05:30
Isai c0b852a23d [New Rule][Rule Tuning] AWS Organizations/Account Discovery Coverage (#5910)
* [New Rule][Rule Tuning] AWS Organizations/Account Discovery Coverage

In response to the supply chain attack highlighted in (Kudelski’s Trivy / TeamPCP analysis)[https://kudelskisecurity.com/research/investigating-two-variants-of-the-trivy-supply-chain-compromise], I've added coverage for AWS Organization and Account reconnaissance which was called out in the research.

### AWS Discovery API Calls via CLI from a Single Resource
- Expanded our existing Multi-service discovery rule to include `event.provider: oraganizations.amazonaws.com`
- added the new `aws.cloudtrail.session_credential_from_console` field to exclude console behavior from this rule, and added appropriate `min_stack` to account for introduction of the field.

GAP: This rule detects aws-cli usage only. In the mentioned reference, attackers used Botocore and Boto3 tooling for this recon activity.

SOLUTION:

### AWS Account Discovery By Rare User
- Created a new Discovery rule focused solely on Organization/Account reconnaissance.
- Made it a new terms rule to reduce false positive noise from common behavior that might be seen using Boto3 or Botocore tooling.
- excluded console session behavior and service account behavior

Testing:
- Ran PACU's organization__enum module
- created a script that can be run to validate the query
- plenty of test data in our stack to run the query against

* Update rules/integrations/aws/discovery_organization_discovery_by_rare_user.toml

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

---------

Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
2026-04-03 14:54:25 -04:00
Terrance DeJesus ae5ecd5346 [Rule Tuning] AWS suspicious user agents (TruffleHog, Kali CLI/Boto3) (#5902)
* Expand AWS CloudTrail user-agent rule for TruffleHog and Kali

- Rename rule file to initial_access_suspicious_user_agent_detected_in_cloudtrail.toml
- Rule name: AWS Suspicious User Agent Fingerprint
- Match TruffleHog in user_agent.original (successful API calls)
- Retain Kali Linux distrib#kali fingerprint for aws-cli/Boto3
- Refresh narrative and references (incl. Kudelski Trivy supply-chain analysis)

Same rule_id f80ea920-f6f5-4c8a-9761-84ac97ec0cb2.

Made-with: Cursor

* Apply suggestion from @terrancedejesus
2026-04-03 11:50:28 -04:00
Susan 3e1c6f38e4 Update Entity related Kibana prebuilt ML rules with new _ea ML job ID and update minimum stack versions (#5794)
* Update euid job ids and min stack version

* Update euid job ids and min stack version

* Update job suffix from _euid to _ea

* Update pad okta rules

* Update min_stack_comments

* Update gcp audit rules

* Update rules based on new changes

* Add rule for v3_windows_rare_script_ea job

* Update updated_date for rule to pass test

* Remove integrations-only changes (moved to euid-rules-update-integrations branch)

DED, DGA, LMD, PAD, and ProblemChild ML rule changes have been moved to the
euid-rules-update-integrations branch which corresponds to integrations#17626.
This branch (euid-rules-update) now only contains Kibana-related ML rule changes.

Made-with: Cursor

* Update stale updated_date to 2026/04/01 across all modified ML rules

Made-with: Cursor

* Bump min_stack_version from 9.3.0 to 9.4.0 in azure/gcp city/country/user rules

Made-with: Cursor

* Add min_stack_comments to those missing
2026-04-02 09:25:14 -04:00
Mika Ayenson, PhD 8993d1450b [Rule Tuning] Add Supplemental Mitre Mappings (#5876)
---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
Co-authored-by: terrancedejesus <terrance.dejesus@elastic.co>
Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
Co-authored-by: eric-forte-elastic <eric.forte@elastic.co>
2026-04-01 09:12:42 -05:00
Terrance DeJesus c932ececd9 [Rule Tuning] M365 Identity Login from Atypical Travel Location - Reduce FP Noise (#5866)
* [Rule Tuning] M365 Identity Login from Atypical Travel Location - Reduce FP Noise
Fixes #5865

* removing CMSI for FNs
2026-03-26 16:03:38 -04:00
Terrance DeJesus 60beaff33f [Rule Tuning] Entra ID OAuth User Impersonation to Microsoft Graph (#5864)
* [Rule Tuning] Entra ID OAuth User Impersonation to Microsoft Graph
Fixes #5863

* Apply suggestion from @eric-forte-elastic

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

* make sure sign in sources are not null

---------

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>
2026-03-26 15:48:23 -04:00
Ruben Groenewoud c6f843ef9d [New Rules] LiteLLM & Trivy TeamPCP Compromise (#5885)
* [New Rules] LiteLLM & Trivy TeamPCP Compromise

* ++

* Apply suggestion from @Samirbous

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

* Apply suggestion from @Samirbous

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

* ++

* ++

* Update rules/cross-platform/collection_data_encrypted_via_openssl.toml

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

* Update rules/cross-platform/collection_data_encrypted_via_openssl.toml

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

* ++

* ++

* ++

* ++

* Update rules/cross-platform/execution_suspicious_python_command_execution.toml

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

* Update rules/cross-platform/execution_suspicious_python_command_execution.toml

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

* Update rules/cross-platform/defense_evasion_data_encrypted_via_openssl.toml

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

* Update rules/cross-platform/defense_evasion_data_encrypted_via_openssl.toml

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

* ++

* ++

* ++

* ++

---------

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
2026-03-26 11:16:30 -05:00
Terrance DeJesus cd19b25485 [New Rule] M365 Azure Monitor Alert Email with Financial or Billing Theme (#5878)
* [New Rule] M365 Azure Monitor Alert Email with Financial or Billing Theme
Fixes #5877

* adding microsoft_exchange_online_message_trace to manifests/schemas; bumping patch

* updated mitre

* Update rules/integrations/microsoft_exchange_online_message_trace/initial_access_azure_monitor_callback_phishing_email.toml

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

* bumping patch

---------

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
2026-03-26 10:50:15 -05:00
Terrance DeJesus a08d6b4ff7 [Rule Tuning] Entra ID Federation Abuse to Production (#5881)
* [Rule Tuning] Entra ID Federation Abuse to Production

* adjusted file name

---------

Co-authored-by: Samirbous <64742097+Samirbous@users.noreply.github.com>
2026-03-26 10:45:12 -05:00
Terrance DeJesus 18a28762bf [Rule Tuning] M365 SharePoint/OneDrive File Access via PowerShell - Convert to new_terms (#5873)
Fixes #5872
2026-03-26 11:28:36 -04:00
Terrance DeJesus 4217c76ed4 [Rule Tuning] M365 Exchange Inbox Forwarding Rule Created (#5852)
* [Rule Tuning] M365 Exchange Inbox Forwarding Rule Created

* adding back filebeat

* adjusted tags

* Update rules/integrations/o365/collection_exchange_new_inbox_rule.toml

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

---------

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
2026-03-23 10:25:58 -04:00
Terrance DeJesus c0abe39f8a [Rule Tuning] Remove OIDC email scope from Microsoft Graph Email Access Rule (#5856)
* [Rule Tuning] Remove OIDC email scope from Microsoft Graph Email Access Rule

* removing mailboxSettings FPs

* updated query optimization & format
2026-03-23 10:08:47 -04:00
Terrance DeJesus 53553e0bfb [Rule Tuning] Microsoft Graph Request User Impersonation by Unusual Client (#5861) 2026-03-23 09:46:40 -04:00
Isai e49a3f0310 [New Rule] AWS API Activity from Uncommon S3 Client by Rare User (#5694)
* [New Rule] AWS API Activity from S3 Browser Client

Detects AWS API activity originating from the S3 Browser application based on the user agent string. S3 Browser is a Windows-based graphical client for managing S3 buckets that is rarely used in enterprise environments but has been observed in use by threat actors for data exfiltration due to its ease of use and bulk download capabilities. This rule was inspired by the Permiso LUCR-3 research which documented Scattered Spider using S3 Browser (v10.9.9) for data theft operations. No usage captured in alert telemetry and only one user utilized this browser in prod data.

Existing Related Coverage: We have several S3-related exfiltration rules covering bucket replication, policy modifications, and ransomware indicators. This new rule closes a gap by detecting a specific attacker tooling fingerprint rather than relying solely on behavioral patterns.

* Update rules/integrations/aws/exfiltration_s3_browser_user_agent.toml

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

* [New Rule] AWS API Activity from Uncommon S3 Client by Rare User

This rule detects AWS API activity from S3 Browser and Cyberduck desktop clients based on user agent strings. Both are graphical S3 management tools that provide bulk upload/download capabilities and have been observed in use by threat actors for data exfiltration. S3 Browser usage is specifically documented in the Permiso blog on LUCR-3 (Scattered Spider), while Cyberduck is referenced in the MITRE ATT&CK Threat Emulation of Scattered Spider. The rule uses a New Terms approach on cloud.account.id and user.name to alert only on the first occurrence per user/account, reducing noise from repeated GetObject or PutObject operations while still capturing new suspicious tool usage.
No existing rules currently detect activity based on these specific S3 client user agents. This fills a gap in detecting exfiltration tooling commonly used in post-compromise data theft operations.

* adding space to S3 Browser

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>
2026-03-18 18:07:15 -04:00
Terrance DeJesus f84617ba8e bumping date (#5847) 2026-03-18 17:22:55 -04:00
Terrance DeJesus 937a7a35e6 [New Rule] Azure Arc Kubernetes Cluster Connect Abuse (#5824)
* [New Rule] Azure Arc Kubernetes Cluster Connect Abuse
Fixes #5823

* rename, adjusted query

* adding KEEP *

* adjusting maturity

* added to non-ecs schema

* updating rule

* addressing unit test failures

* adjustments to logic, mitre mappings, unit test failures, etc.

* Update rules/integrations/azure/initial_access_azure_arc_cluster_credential_access_unusual_source.toml

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

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
2026-03-17 11:06:47 -04:00
Terrance DeJesus 4091323e0d [New Rule] M365 SharePoint Site Administrator Added (#5806)
* [New Rule] M365 SharePoint Site Administrator Added

* Update rules/integrations/o365/privilege_escalation_sharepoint_site_collection_admin_added.toml

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>

---------

Co-authored-by: Eric Forte <119343520+eric-forte-elastic@users.noreply.github.com>
2026-03-17 10:49:24 -04:00
Isai 3b59030211 [New Rule] AWS CloudShell Environment Created (#5830)
## Summary

This PR adds a new detection rule for AWS CloudShell environment creation, based on the **T1059.009 - Command and Scripting Interpreter: Cloud API** technique as documented in the [AWS Threat Technique Catalog](https://aws-samples.github.io/threat-technique-catalog-for-aws/Techniques/T1059.009.html).

AWS CloudShell is a browser-based shell that provides command-line access to AWS resources directly from the AWS Management Console. While convenient for administrators, CloudShell can be abused by adversaries who gain access to compromised console sessions to execute commands, install tools, or interact with AWS services without needing local CLI credentials.

This rule detects the `CreateEnvironment` API call, which occurs when:
- A user launches CloudShell for the **first time**
- A user accesses CloudShell in a **new AWS region** (each region maintains a separate environment)

### Why `CreateEnvironment` instead of `CreateSession`?
`
While both `CreateEnviroment` and `CreateSession` are noted in the catalog for this technique, during testing I observed that:
- **`CreateEnvironment`** is called when a new CloudShell environment is created (first-time user OR new region)
- **`CreateSession`** is called when reconnecting to an existing CloudShell environment that was previously created

By focusing on `CreateEnvironment`, we capture the meaningful signal (new environment creation) while avoiding noise from users simply reconnecting to existing sessions.
2026-03-17 08:46:59 -04:00
Terrance DeJesus 1d3dad243c [Rule Tuning] Entra ID OAuth Device Code Grant by Unusual User (#5791)
* [Rule Tuning] Entra ID OAuth Device Code Grant by Unusual User
Fixes #5790

* updated description and investigation guide
2026-03-10 10:37:38 -04:00
Terrance DeJesus 0ae390ce6f [New Rule] Entra ID Domain Federation Abuse (#5809) 2026-03-10 10:16:50 -04:00
Terrance DeJesus 386e69bfea [New Rule] M365 SharePoint Site Sharing Policy Weakened (#5795)
* [New Rule] M365 SharePoint Site Sharing Policy Weakened

* removed the comments

* adding original author
2026-03-10 09:48:59 -04:00
Isai 926befff83 [Rule Tuning] AWS Access Token Used from Multiple Addresses (#5785)
* [Rule Tuning] AWS Access Token Used from Multiple Addresses

Summary
Tuning changes to reduce noise and improve fidelity for the AWS Access Token Used from Multiple Addresses rule. After several tuning this rule is still producing ~2000 alerts/day

- Added aws.cloudtrail.session_credential_from_console exclusion to filter out legitimate console login sessions
- Added Esql.event_provider_count_distinct > 1 condition requiring activity across multiple AWS services to reduce single-service noise
- Changed interval from 5m to 30m to reduce alert frequency
- Updated query time window from 30 minutes to 32 minutes to align with the from setting
- Added min_stack_version = "9.2.0" for the new console credential field (AWS integration 4.6.0+)

Rational
- Console login sessions generate temporary credentials that can appear from multiple IPs during VPN/network transitions
- Requiring activity across multiple AWS service providers increases confidence that the token is being used for broader reconnaissance rather than normal single-service operations
- Longer interval reduces duplicate alerting per access token while still catching the behavior within the 32-minute aggregation window

* Apply suggestions from code review

* Update rules/integrations/aws/initial_access_iam_session_token_used_from_multiple_addresses.toml

* Update initial_access_iam_session_token_used_from_multiple_addresses.toml
2026-03-09 13:57:57 -04:00
Ruben Groenewoud 39cdb3887f [New/Tuning] TeamPCP Simulation - New & Tuned Rules (#5812)
* [New/Tuning] TeamPCP Simulation - New & Tuned Rules

* ++

* ++

* Added IGs

* Update event action conditions in TOML rule

Refactor process event conditions for clarity.

* Add cloud-related file access patterns to rules

* Update persistence_suspicious_webserver_child_process_execution.toml

* Update rules/integrations/cloud_defend/defense_evasion_file_creation_execution_deletion_cradle.toml

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

* Update defense_evasion_file_creation_execution_deletion_cradle.toml

* Update defense_evasion_file_creation_execution_deletion_cradle.toml

---------

Co-authored-by: Jonhnathan <26856693+w0rk3r@users.noreply.github.com>
2026-03-09 17:03:39 +01:00
Eric Forte 94c73e3ad7 [FR] Minor Typo Fixes (#5784) 2026-03-06 16:12:45 -06:00
Ruben Groenewoud c24f84b5b0 [Rule Tuning] kubernetes.audit.userAgent --> user_agent.original Conversion (#5808) 2026-03-05 14:13:30 +01:00
Isai 1e777d9be7 [Rule Tuning] AWS STS Role Assumption by User (#5796)
* [Rule Tuning] AWS STS Role Assumption by User

Removed AssumedRole from the `aws.cloudtrail.user_identity.type` filter to eliminate redundancy with the AWS STS Role Chaining rule. The AWS STS Role Chaining rule already covers AssumedRole identity types assuming other roles. This change ensures each rule has distinct coverage without overlapping alerts.

- Changed query filter from `aws.cloudtrail.user_identity.type: ("AssumedRole" or "IAMUser")` to `aws.cloudtrail.user_identity.type: "IAMUser"`
- Updated description to clarify the rule focuses on user-initiated role assumptions
- Minor formatting fixes to investigation guide headings

* reducing new_terms fields

reducing new_terms fields to only use "aws.cloudtrail.user_identity.arn" since we do not have to account for roles, this field is unique for IAMUsers
2026-03-04 13:01:49 -05:00
Isai c5dbd90662 [Rule Tunings] Add Console Session Filtering to AWS Temporary Credential Detection Rules (#5781)
* [Rule Tuningw] Add Console Session Filtering to AWS Temporary Credential Detection Rules

Added `aws.cloudtrail.session_credential_from_console` field filtering to 2 rules to reduce false positives from legitimate console login sessions. Console logins automatically issue temporary "ASIA" credentials, which previously triggered alerts for rules monitoring session token abuse.

- Updated false positives sections to reflect automatic console session filtering
- Updated investigation guides to note that alerts indicate non-console temporary credential usage
- min_stack_version = "9.2.0" because this field was introduced in AWS Integration version 4.6.0. 9.2.0 is the earliest major stack version supported.

Impact
- Significantly reduces false positives from legitimate AWS Management Console usage
- Improves rule fidelity by focusing detection on programmatic abuse of temporary credentials (CLI, SDK, stolen credentials)

* update boolean field value for aws.cloudtrail.session_credential_from_console

update boolean field value for aws.cloudtrail.session_credential_from_console

* removing filebeat compatibility

removing filebeat compatibility
2026-02-26 17:21:18 -05:00
Terrance DeJesus 5ecbc0f0b9 [New Rule] Microsoft 365 SharePoint/OneDrive Sensitive Search and File Access (#5777)
* [New Rule] Microsoft 365 SharePoint/OneDrive Sensitive Search and File Access
Fixes #5776

* adjusting UUIDs

* added additional strings

* adjusted investigation guide

* fixed mitre mappings

* fixed mitre mappings

* Apply suggestion from @terrancedejesus
2026-02-26 14:29:14 -05:00
Terrance DeJesus 71c461d867 [New Rule] M365 MFA Notification Email Deleted or Moved (#5779)
* [New Rule] M365 MFA Notification Email Deleted or Moved
Fixes #5778

* updated non-ecs

* adjusted rule name

* Apply suggestion from @terrancedejesus
2026-02-26 13:21:08 -05:00
Terrance DeJesus 8593116f58 [New Rule] Okta User Authentication via Proxy Followed by Security Alert (#5752)
* [New Rule] Okta User Authentication via Proxy Followed by Security Alert
Fixes #5751

* adjusted to EQL

* fixed syntax

* Update rules/integrations/okta/initial_access_first_occurrence_user_session_started_via_proxy.toml

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

* removed defense evasion; adjusted maxspan to 30m

* removed Okta tag

* adding Okta back as integration tag

---------

Co-authored-by: Isai <59296946+imays11@users.noreply.github.com>
2026-02-26 11:32:25 -05:00
Terrance DeJesus 04ad018f27 [Rule Tuning] M365 OneDrive/SharePoint Excessive File Downloads (#5767)
* [Rule Tuning] M365 OneDrive/SharePoint Excessive File Downloads
Fixes #5766

* updated non-ecs

* fixing keep command
2026-02-26 10:38:59 -05:00
Terrance DeJesus 013dace20f adjusted min-stack (#5763) 2026-02-23 17:31:36 -05:00
Terrance DeJesus 35a8298bda [Rule Tuning] Entra ID Federated Identity Credential Issuer Modified (#5760)
* added min-stack

* Apply suggestion from @terrancedejesus
2026-02-23 12:43:16 -05:00
Terrance DeJesus 6a7c1e9674 [Rule Deprecation] Deprecate Individual MSFT Compliance Rules (#5679)
* [Rule Tuning] Deprecate Individual MSFT Defender Rules / Create BBR MSFT Defender Rule
Fixes #5678

* adjusted naming; fixed mitre match

* adding M365 Exchange DLP Policy Deleted to deprecation

* adjusted BBR naming to represent Purview and not Defender

* added tactic tags

* adding filebeat

* removed new rule
2026-02-20 14:00:34 -05:00
Terrance DeJesus c7954465f3 [Rule Tuning] Okta Credential Stuffing, Password Spraying, and Brute Force Detection Improvements (#5723)
* [Rule Tuning] Okta Credential Stuffing, Password Spraying, and Brute Force Detection Improvements
Fixes #5722

* adding adjustments

* adjusts made; still testing

* adjustments to logic; names; tags; standardization, etc.

* added missing tag

* updated reference rules
2026-02-20 13:36:25 -05:00
Isai 62aa4dcedc [Rule Tuning] Potential AWS S3 Bucket Ransomware Note Uploaded (#5739)
Tuning based on telemetry from recent rule version 9. There are many false positives for what look like typical S3 storage object names like `BillingInformation`, `InstanceInformation` created by AWS Service accounts. I'm excluding AWS service account types from the rule for now which eliminated ~97% of the false positives over last 30 days. leaving only 66 which is acceptable for this rule and should be addressed via local exclusions.

Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
2026-02-20 10:41:42 -05:00
Terrance DeJesus f773103519 [Rule Tuning] Entra ID Federated Identity Credential Persistence Detection (#5702)
* [Rule Tuning] Entra ID Federated Identity Credential Persistence Detection
Fixes #5701

* updated mitre mapping ID

* adjusted mitre mappings; non-ecs schema file

* fixed trailing comma in non-ecs; adjusted file name

* adjusted file name; fixed non-ecs schema for upstream ESQL validation

* Apply suggestion from @terrancedejesus

* Apply suggestion from @terrancedejesus

* changed lookback to 9 minutes; adjusted keep values

* added setup; added tag
2026-02-19 15:58:12 -05:00
Terrance DeJesus 63f76cf004 [Rule Tuning] Entra ID SharePoint Accessed by Unusual User and Microsoft Authentication Broker Client (#5681)
* [Rule Tuning] Transform Dormant SharePoint Rule to Detect OAuth Phishing
Fixes #5680

* adjusted query format for unit test; added additional domain tag for storage

* Apply suggestion from @terrancedejesus

* Fix formatting in non-ecs-schema.json

* adjusted description

* re-order mappings
2026-02-19 10:09:15 -05:00
Terrance DeJesus dbbf71b9c2 [Rule Tuning] Entra ID Suspicious Cloud Device Registration (#5683)
* [Rule Tuning] Entra ID Suspicious Cloud Device Registration
Fixes #5682

* fixed investigation guide name

* adjusted from to 30m and interval to 15m
2026-02-18 17:37:17 -05:00
Isai e633c83b73 [New Rule] AWS SSM Inventory Reconnaissance by Rare User (#5724)
* [New Rule] AWS SSM Inventory Reconnaissance by Rare User

This rule detects the first time a user or role accesses AWS Systems Manager (SSM) inventory APIs or runs the AWS-GatherSoftwareInventory job. SSM Inventory provides detailed information about managed EC2 instances including installed software, patch compliance, network configurations, and command execution history. Threat actors, including Scattered Spider (LUCR-3), have been observed leveraging these APIs to enumerate targets for lateral movement while blending in with legitimate AWS operations. The rule uses a New Terms approach on cloud.account.id and user.name to identify when users access these reconnaissance APIs for the first time.

No existing rules specifically detect SSM inventory reconnaissance activity. This fills a gap in detecting cloud infrastructure discovery techniques used for target enumeration prior to lateral movement.

| API | Purpose |
|-----|---------|
| `GetInventory` | Query inventory data (installed software, OS details) |
| `GetInventorySchema` | Discover available inventory types |
| `ListInventoryEntries` | Get specific instance inventory |
| `DescribeInstancePatches` | Find patch compliance/vulnerabilities |
| `ListCommands` | View SSM command execution history |
| `CreateAssociation` | Trigger AWS-GatherSoftwareInventory job |

* Apply suggestions from code review
2026-02-18 15:50:14 -05:00
Isai f10de64527 [New Rule] AWS Sensitive IAM Operations Performed via CloudShell (#5718)
* [New Rule] AWS Sensitive IAM Operations Performed via CloudShell

This rule detects sensitive AWS IAM operations performed via CloudShell based on the user agent string. CloudShell is a browser-based shell that provides command-line access to AWS resources directly from the console without requiring local tooling. When attackers gain access to a compromised console session, CloudShell enables them to perform privileged operations such as creating users, access keys, roles, or attaching policies—leaving no artifacts on their local system. This behavior is documented in the Permiso blog on LUCR-3 (Scattered Spider) and the CISA Scattered Spider advisory, where threat actors leveraged CloudShell for post-compromise credential harvesting and privilege escalation.

No existing rules specifically detect CloudShell as the origin for sensitive IAM operations. This fills a gap by identifying high-risk actions from this browser-based execution context.

* adding iam provider

* primary tactic change

* updating highlighted fields

* removed bold from IG

* Apply suggestions from code review

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

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
2026-02-18 15:29:53 -05:00
Isai f62026e378 [New Rules] AWS IAM new identity federation provider rules (#5691)
* [New Rules] AWS IAM new identity federation provider rules

AWS IAM SAML Provider Created and AWS IAM OIDC Provider Created by Rare User detect the creation of new identity federation providers in AWS IAM. SAML and OIDC providers establish trust relationships with external identity providers, enabling federated access to AWS resources. Adversaries who gain administrative access may create rogue providers to establish persistent access that survives credential rotation, allowing them to assume roles using tokens from an IdP they control. These rules map to MITRE ATT&CK T1484.002 (Trust Modification), which is referenced in the CISA Scattered Spider advisory (AA23-320A) under the Privilege Escalation tactic.

Existing Related Coverage: We already detect `UpdateSAMLProvider` via privilege_escalation_iam_saml_provider_updated.toml. These new rules close the gap by detecting the creation of federation providers, the initial step required to establish rogue trust relationships.

* Update rules/integrations/aws/persistence_iam_oidc_provider_created.toml

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

* Update rules/integrations/aws/persistence_iam_oidc_provider_created.toml

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

* Apply suggestion from @imays11

---------

Co-authored-by: Ruben Groenewoud <78494512+Aegrah@users.noreply.github.com>
2026-02-18 15:17:13 -05:00
Samirbous 204f0b2ebc [Tuning] Adds host metadata to the setup requirements (#5719)
* [Tuning] Adds host metadata to the setup requirements

Rules requiring host.ip and that are compatible with Elastic Defend integration can be impacting by windows].advanced.set_extended_host_information if set to the default value (false), host.ip won't be populated from 8.18+ (only host.name and host.os and host.id).

Related SDH https://github.com/elastic/sdh-endpoint/issues/722

* ++

* Update rules/integrations/lmd/lateral_movement_ml_high_mean_rdp_process_args.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_high_mean_rdp_session_duration.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_high_remote_file_size.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_high_variance_rdp_session_duration.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_rare_remote_file_directory.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_unusual_time_for_an_rdp_session.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_spike_in_connections_from_a_source_ip.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_rare_remote_file_extension.toml

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

* Update rules/integrations/lmd/lateral_movement_ml_spike_in_connections_to_a_destination_ip.toml

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

* Update lateral_movement_ml_spike_in_rdp_processes.toml

* Apply suggestion from @Mikaayenson

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

---------

Co-authored-by: Mika Ayenson, PhD <Mikaayenson@users.noreply.github.com>
2026-02-18 17:04:40 +00:00
Terrance DeJesus 93d20b1233 [Rule Deprecation] M365 Teams Guest & External Access Rules (#5721)
Fixes #5720
2026-02-18 10:00:24 -05:00