---
title: AWS Systems Manager command executed from a new source ASN for the actor
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > AWS Systems Manager command executed
  from a new source ASN for the actor
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# AWS Systems Manager command executed from a new source ASN for the actor
Classification:attackTactic:[TA0003-persistence](https://attack.mitre.org/tactics/TA0003)Technique:[T1078-valid-accounts](https://attack.mitre.org/techniques/T1078) 
## Goal{% #goal %}

Detects an accepted AWS Systems Manager `SendCommand` call from a source autonomous system number (ASN) unfamiliar to the actor.

## Strategy{% #strategy %}

This rule monitors AWS Systems Manager `SendCommand` activity and uses New Value detection to learn source ASNs in `@network.client.geoip.as.number` for each identity in `@userIdentity.arn`. It learns for 14 days and forgets an ASN after 30 days without matching activity. The detection covers long-term access keys and temporary credentials, including IAM Identity Center sessions. Tracking the actor rather than an individual access key lets the baseline persist when credentials rotate, provided the actor ARN stays the same.

A new ASN can indicate a change in the network provider used for remote access. IP address changes within the same ASN do not trigger this rule. Calls must have no recorded API error and include the returned command ID. An accepted API call does not confirm that the command ran successfully on the host.

The signal includes response IDs and target selectors for correlation with host activity. Review the triggering CloudTrail event for access key ID, source network, account, region, and event time. Investigate suspicious host activity even when the source ASN is familiar or this rule is still learning.

## Triage and response{% #triage-and-response %}

- Match `{{@responseElements.command.commandId}}` to `@process.variables.ssm_command_id` on the affected host, and review suspicious activity in that process tree. Commands targeting tags can affect multiple hosts. Identify actual recipients from host telemetry or command invocation records.
- Verify whether `{{@userIdentity.arn}}` was authorized to initiate `SendCommand` from `{{@network.client.ip}}` in ASN `{{@network.client.geoip.as.number}}`.
- Check whether the network change corresponds to an expected VPN endpoint, office network, internet provider, or automation environment.
- Identify whether `{{@userIdentity.accessKeyId}}` is a long-term key (`AKIA`) or temporary credential (`ASIA`), and review the IAM user or role session that used it.
- Identify the targeted managed nodes and examine the commands and their output, if available.
- Review surrounding activity for the actor and access key to identify other unexpected API calls or credential reuse.
- Confirm the activity with the identity owner and revoke the affected credentials or role session when access is unauthorized.
