Cloud Administration Command T1651

Tactic: Execution

Adversaries may abuse cloud management services to execute commands within virtual machines. Resources such as AWS Systems Manager, Azure RunCommand, and Runbooks allow users to remotely run scripts in virtual machines by leveraging installed virtual machine agents.

Events covered

10 catalog events are tagged with this technique by at least one rule.

Authoring guide

These 27 rules share fields, values, and exclusions.

Fields filtered most (42 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
EventType12in 6, eq 5, wildcard 1exec, MICROSOFT.COMPUTE/VIRTUALMACHINES/EXTENSIONS/WRITE, SendCommand, exec_event, CreateDocument
data_stream.dataset10eq 10azure.activitylogs, aws.cloudtrail, endpoint.events.process, gcp.audit
event.outcome10eq 9, in 1success, Success
process_basename6eq 4, in 2, ne 1CustomScriptHandler.exe, arp.exe, aws, base64, bash
CommandLine3contains 1, eq 1, is_not_null 1, %/document/orchestration/%/awsrunShellScript/%/_script.sh, *-enc*, *-w hidden*, *DownloadFile*
Provider_Name3eq 3ssm.amazonaws.com, cloudformation.amazonaws.com
event.category3eq 3process
event.type3eq 2, in 1start, process_started
parent_process_basename3eq 3, in 3bash, dash, powershell.exe, busybox, csh
process.args3contains 2, eq 1, in 1, starts_with 1*-decode*, *-encode*, *awsrunPowerShellScript*, *awsrunShellScript*, *urlcache*
process.parent.args3wildcard 2, contains 1/var/lib/waagent/run-command/download/*/script.sh, *awsrunPowerShellScript*, *awsrunShellScript*
AppId2eq 2FociClientApplications
IncomingTokenType2eq 2none
ParentCommandLine2eq 2powershell -ExecutionPolicy Unrestricted -File script?.ps1
azure.activitylogs.identity.authorization.evidence.principal_id2is_not_null 2

Top indicator values (185 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.outcomeeq
Success
9306
data_stream.dataseteq
azure.activitylogs
538
data_stream.dataseteq
aws.cloudtrail
3143
event.categoryeq
process
3105
AppIdeq
FociClientApplications
2
EventTypein
exec
228
EventTypein
exec_event
217
EventTypein
executed
214
EventTypein
process_started
27
IncomingTokenTypeeq
none
22
ParentCommandLineeq
powershell -ExecutionPolicy Unrestricted -File script?.ps1
22
Provider_Nameeq
ssm.amazonaws.com
25
azure.activitylogs.identity.authorization.evidence.principal_idis_not_null
23
azure.resource.nameis_not_null
22
parent_process_basenameeq
powershell.exe
22
parent_process_basenamein
bash
27
parent_process_basenamein
dash
25
parent_process_basenamein
sh
27
process.parent.argswildcard
/var/lib/waagent/run-command/download/*/script.sh
22
process_basenameeq
CustomScriptHandler.exe
22
process_basenameeq
powershell.exe
2187
resultTypein
Succeeded
251
resultTypein
Success
251
source.as.numberis_not_null
210
ActionTypeeq
FileCreated
12
AppDisplayNamein
Microsoft Azure CLI
1
AppDisplayNamein
Microsoft Azure PowerShell
1
AppDisplayNamein
Office 365 Management
1
CategoryValueeq
Administrative
1
CommandLinecontains
*-enc*
13

Exclusions (45 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
CommandLineends_with
*/checkExclusionPreference/_script.sh
1
CommandLineends_with
*/checkProvisioningEligibility/_script.sh
1
CommandLineends_with
*/install/_script.sh
1
CommandLineends_with
*/invokeInspectorSsmPluginLinux/_script.sh
1
CommandLineends_with
*/uninstall/_script.sh
1
CommandLineends_with
*\createUpdateFolder\_script.ps1
1
CommandLineends_with
*ssm-user
1
Imageeq
/usr/bin/dpkg-query
1
Imageeq
/usr/bin/id
1
Imageeq
/usr/bin/lscpu
1
Imageeq
/usr/bin/rpm
1
Imageeq
/usr/bin/snap
1
Imageeq
C:\Program Files\Amazon\SSM\Plugins\SessionManagerShell\winpty-agent.exe
1
Imagewildcard
/snap/snapd/*/usr/bin/snap
1
Imagewildcard
/var/lib/amazon/ssm/update/amazon-ssm-agent-updater/*/updater
1

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Elastic 16 rules

Kusto 9 rules

Panther 2 rules