Skip to content

Destroy an EC2 instance

Platform Author Last Update
aws Anela Tiro 2023-07-01

An adversary may attempt to teardown/terminate an EC2 instance as part of an attempt to impact service availability.

MITRE IDs

Required Permissions

  • ec2:TerminateInstances

Required Parameters

Name Type Description Example Value
instanceid str ID of an existing EC2 instance EC2_ID

Attacker Action

aws ec2 terminate-instances --instance-ids EC2_ID

Detection Case

ELK query

When logs are ingested into ELK, the following Lucene query can be used to identify relevant events.

eventName:TerminateInstances AND eventSource:*.ec2.amazonaws.com  

Sigma Definition

---
title: Destroy an EC2 instance
id: testing
status: experimental
author: Anela Tiro
date: 2023-07-01
description: An adversary may attempt to teardown/terminate an EC2 instance as part of an attempt to impact service availability.
logsource:
  service: cloudtrail
detection:
  selection_source:
    - eventSource: "*.ec2.amazonaws.com"
  events:
    - eventName: "TerminateInstances"
  condition: selection_source AND events
level: low
tags:
  - attack.T1529