SSM Session Started to EC2 Instance

Last updated 7 months ago on 2025-01-15
Created a year ago on 2024-04-16

About

Identifies the first occurrence of an AWS resource establishing a session via SSM to an EC2 instance. Adversaries may use AWS Systems Manager to establish a session to an EC2 instance to execute commands on the instance. This can be used to gain access to the instance and perform actions such as privilege escalation. This rule helps detect the first occurrence of this activity for a given AWS resource.
Tags
Domain: CloudData Source: AWSData Source: Amazon Web ServicesData Source: AWS SSMUse Case: Threat DetectionTactic: Lateral MovementLanguage: kuery
Severity
medium
Risk Score
47
MITRE ATT&CK™

Lateral Movement (TA0008)(opens in a new tab or window)

False Positive Examples
Legitimate use of AWS Systems Manager to establish a session to an EC2 instance.
License
Elastic License v2(opens in a new tab or window)

Definition

Rule Type
New Terms Rule
Integration Pack
Prebuilt Security Detection Rules
Index Patterns
filebeat-*logs-aws.cloudtrail-*
Related Integrations

aws(opens in a new tab or window)

Query
event.dataset:"aws.cloudtrail" and event.provider:"ssm.amazonaws.com"
    and event.action:"StartSession" and event.outcome:"success"

Install detection rules in Elastic Security

Detect SSM Session Started to EC2 Instance in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(opens in a new tab or window).