Skip to content

Refine AWS IAM policy creation detections - #4446

Draft
themaryjo wants to merge 1 commit into
developfrom
AWS-IAM-detections-batch-1
Draft

themaryjo wants to merge 1 commit into
developfrom
AWS-IAM-detections-batch-1

Conversation

@themaryjo

Copy link
Copy Markdown
Contributor

Summary

Refines two AWS IAM policy detections to require an Allow statement specifying all actions and all resources within the same statement. Updates descriptions and findings to avoid asserting that policy creation gave the caller permissions.

Detection Scope Changes
AWS Create Policy Version to allow all resources Successful CloudTrail CreatePolicyVersion events Requires Effect="Allow" and exact "*" Action/Resource values within one statement; adds scalar/array handling; retains targeted spath; removes statement-count aggregation; retains actor, policy/version identifiers, default-version flags, event ID, and matching statement.
ASL AWS Create Policy Version to allow all resources Successful ASL IAM CreatePolicy events Adds IAM service and success filters; replaces broad extraction and substring regex matching with targeted, same-statement permission checks; adds scalar/array handling; removes aggregation; retains policy and event context; deduplicates populated event IDs to return one representative matching statement per event within a search run.

In both rules we updated descriptions, logic, findings, false-positive, versions, and modification dates.

Scope clarification

The ASL rule retains its existing CreatePolicy operation and unchanged title. Its description now clarifies the actual scope. The title/operation mismatch remains a documented limitation.

A matching event does not establish that a policy was attached or that the caller gained its permissions. Non-default versions and conditional wildcard statements remain in scope.

Extraction and performance

Targeted spath was selected:

  • For the standard CloudTrail rule, it was faster in the local comparison.
  • For ASL, targeted spath and JSON functions had effectively equivalent single-event runtimes. These observations do not establish production-scale performance improvements, since the tests were done with uploaded datasets.

Validation

  • Manual Splunk fixture tests confirmed positive matching and investigation-field extraction.
  • The ASL automated detection test passed.
  • Complete regression coverage, ASL array handling, and production-scale performance remain validation limitations.

Related dataset change

Dataset draft PR: splunk/attack_data#1277

The CloudTrail fixture is replaced with one anonymized real-lab event creating a non-default wildcard Allow policy version. Its filename is preserved. The ASL fixture remains unchanged.

The existing public dataset URL continues to serve the old CloudTrail fixture until the dataset PR is merged.

@patel-bhavin

patel-bhavin commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Is there a bug/issue we are trying to fix in here? the current detection does accurate catch the new simulations as well so I was curious what got reported for the current detection.

image

version_id='responseElements.policyVersion.versionId',
set_as_default='requestParameters.setAsDefault',
returned_is_default='responseElements.policyVersion.isDefaultVersion',
event_id=eventID,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we use a | stats count min(_time) as firstTime max(_time) as lastTime............ field in here so that the output is in a table format?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same with the asl detection.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants