Initial Access
AWS Lambda and API Gateway Initial Access
Its possible to get RCE through API Gateway if it executes commands.
If you can execute commands, there is a way to retrieve keys from the API Gateway, just use env , configure aws cli and proceed with the exploitation.
Credential Access
Getting credentials from Lambda can be done in 2 ways
These keys can be gathered using SSRF, RCE and so on.
Getting credentials using RCE
https://apigateway/prod/system?cmd=envGetting credentials using SSRF
https://apigateway/prod/example?url=http://localhost:9001/2018-06-01/runtime/invocation/Getting credentials using SSRF and wrappers
Getting credentials from lambda enviroment variables (cli)
It's important to enumerate the functions first with:
Then:
Last updated