AWS SageMaker Notebook Lifecycle Configuration With Suspicious Script Content
Identifies an Amazon SageMaker notebook lifecycle configuration whose OnStart or OnCreate script, after base64 decoding, contains patterns associated with malicious activity such as reverse shells, EC2 instance…
Description
Identifies an Amazon SageMaker notebook lifecycle configuration whose OnStart or OnCreate script, after base64 decoding, contains patterns associated with malicious activity such as reverse shells, EC2 instance metadata (IMDS) credential access, or download-and-execute commands. A lifecycle configuration runs as root on the notebook instance, so a script with these patterns is a strong indicator of an attempt to backdoor the notebook, steal the execution role's credentials, or establish persistent code execution. This rule decodes the script in the request and matches high-signal indicators; it is a higher-fidelity companion to the rule that alerts on any lifecycle configuration change.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- ContainersESXiIaaSIdentity ProviderLinuxmacOSNetwork DevicesOffice SuiteSaaSWindows
The rule states no platform. This is derived from the 2 ATT&CK techniques it maps to.
Known benign triggers
- Legitimate setup scripts may reference metadata endpoints or download tooling. Review the decoded script in "Esql_priv.aws_cloudtrail_lifecycle_script", verify the principal in "aws.cloudtrail.user_identity.arn", and confirm the activity is approved. Note this rule only matches unobfuscated patterns; a clean result does not guarantee a benign script.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 0471a12b-c740-4a72-91f0-12bf95014d3c
- Tagged by the source as
- Data Source: Amazon Web ServicesData Source: AWSData Source: AWS SageMakerDomain: CloudNoise: UnknownPerformance: FastPlatform: AWSResources: Investigation GuideRule Type: ES|QLTactic: ExecutionTactic: PersistenceUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3