You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Potential Impact**: Disruption of cost allocation, resource tracking, and tag-based access control policies.
73
73
74
-
### `states:UpdateStateMachine`
74
+
Absolutely — here's your **PR-ready write-up** in the requested format, aligned with the `HackTricks` style you've been following.
75
75
76
-
This permission allows an attacker to **modify the logic of an existing state machine**. By injecting malicious logic into the state definition, the attacker could:
76
+
---
77
77
78
-
- Add a **new state** that exfiltrates input/output to an external system (via Lambda or SNS).
79
-
-**Bypass security checks**, skip validation steps, or disable error handling.
80
-
-**Insert a logic bomb** that triggers under specific input conditions to disrupt execution.
This attack can be subtle, blending into large state definitions, and may go unnoticed without strict ASL version control.
80
+
An attacker who compromises a user or role with the following permissions:
81
+
82
+
```json
83
+
{
84
+
"Version": "2012-10-17",
85
+
"Statement": [
86
+
{
87
+
"Sid": "AllowUpdateStateMachine",
88
+
"Effect": "Allow",
89
+
"Action": "states:UpdateStateMachine",
90
+
"Resource": "*"
91
+
},
92
+
{
93
+
"Sid": "AllowUpdateFunctionCode",
94
+
"Effect": "Allow",
95
+
"Action": "lambda:UpdateFunctionCode",
96
+
"Resource": "*"
97
+
}
98
+
]
99
+
}
100
+
```
101
+
102
+
...can conduct a **high-impact and stealthy post-exploitation attack** by combining Lambda backdooring with Step Function logic manipulation.
103
+
104
+
This scenario assumes that the victim uses **AWS Step Functions to orchestrate workflows that process sensitive input**, such as credentials, tokens, or PII.
-**Potential Impact**: Data exfiltration, disruption of logic flow, persistent access through hidden states.
185
+
where the victim won't realize the different
114
186
115
187
---
116
188
117
-
### `states:StartExecution`
189
+
### Victim Setup (Context for Exploit)
118
190
119
-
With this permission, an attacker can **trigger executions on demand**, passing arbitrary input to state machines. This allows:
191
+
- A Step Function (`LegitStateMachine`) is used to process sensitive user input.
192
+
- It calls one or more Lambda functions such as `LegitBusinessLogic`.
120
193
121
-
-**Triggering sensitive operations** (e.g., Lambda invocations, EC2 actions) if the workflow handles them.
122
-
-**Supplying attacker-controlled input** to abuse poorly validated states.
123
-
-**Recon of business logic** by probing execution responses or failures.
124
-
125
-
Used with `states:GetExecutionHistory`, it becomes a powerful tool for **logic discovery**, **abuse**, or **command execution** through embedded Lambdas or activities.
126
-
127
-
```bash
128
-
aws stepfunctions start-execution \
129
-
--state-machine-arn <value> \
130
-
--name "backdoor-$(date +%s)" \
131
-
--input '{"command":"whoami"}'
132
-
```
194
+
---
133
195
134
-
-**Potential Impact**: Unauthorized triggering of sensitive workflows, business logic abuse, stealthy persistence (can be cron-triggered via EventBridge).
196
+
**Potential Impact**:
197
+
- Silent exfiltration of sensitive data including secrets, credentials, API keys, and PII.
198
+
- No visible errors or failures in workflow execution.
199
+
- Difficult to detect without auditing Lambda code or execution traces.
200
+
- Enables long-term persistence if backdoor remains in code or ASL logic.
0 commit comments