Skip to content

Add CloudTrail event logging across all exploit modules and identity add --from-profile alias - #87

Merged
sethsec merged 3 commits into
mainfrom
cloudtrail-logging-and-identity-alias
Oct 5, 2026
Merged

sethsec merged 3 commits into
mainfrom
cloudtrail-logging-and-identity-alias

Conversation

@sethsec

@sethsec sethsec commented Oct 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Instruments all 81 exploit modules with logger.LogAWSCall() so every AWS API call made during exploitation is captured as a structured, CloudTrail-aligned event for purple team use
  • Threads DiscoveryLogger through pkg/discovery/ helpers so auto-discovery calls are also logged
  • Adds pkg/report/ package with HTML and Markdown export for workspace report, plus --output and --module filter flags on the CLI
  • Adds --from-profile as an alias for --profile on identity add, consistent with the other --from-* flags on that command
  • Adds *.html to .gitignore to avoid committing generated report artifacts

Test plan

  • go test ./tests/unit/ — unit tests for CloudTrail logger, report package, and REPL
  • go test ./tests/integration/ — integration tests for CloudTrail report, report export, and cleanup
  • make build — confirm pkg/exploits/register.go regenerates and binary compiles clean
  • Smoke test: run an exploit module and confirm workspace report output includes logged AWS calls
  • Smoke test: pathrunner identity add --from-profile <name> loads the profile correctly

🤖 Generated with Claude Code

sethsec and others added 3 commits October 2, 2026 20:04
…nd discovery layer.

Instruments all 81 exploit modules with logger.LogAWSCall() calls so every AWS API
call made during exploitation is captured as a structured CloudTrail-aligned event.
Threads DiscoveryLogger through pkg/discovery/ helpers so auto-discovery calls are
also logged. Extends pkg/modules with the Logger interface and ExecutionContext.Logger
field. Adds workspace report --output flag (HTML/Markdown export) and --module filter.
Updates pkg/core session and REPL wiring, cleanup helpers, tab completion, and CLI
adapter. Adds integration and unit tests for new report/cleanup behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Accepts --from-profile as an alternative to --profile so the flag name is
consistent with the other --from-* prefixed flags on the same command.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…v1.338.

go get -u ./... upgraded the EC2 SDK from v1.325 to v1.338, which renamed
types.BlobAttributeValue to types.SecureBlobAttributeValue. Update both
call sites (ec2_modifyinstanceattribute module and cleanup_extra) to use
the new name.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sethsec
sethsec merged commit 522732c into main Oct 5, 2026
15 of 17 checks passed
@sethsec
sethsec deleted the cloudtrail-logging-and-identity-alias branch October 5, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant