Free Hands-on labintermediatered teamAWS
Access Secrets Manager via Lambda Function with LFI
Exploit a Lambda function’s LFI injection vulnerability to compromise a web application, gaining unauthorized access to Secrets Manager. Capture the flag by retrieving the secret value.
- 13 guided tasks
- Capture the flag

Scenario
You've been hired by Cybr, Inc. as part of a pentesting contract to find issues with Cybr's employee management portal. After basic enumeration, you find what should have been an internal-only web application, but that was misconfigured which resulted in it being publicly accessible. After discovering this, your job is to find potential vulnerabilities in this app so that you can report them to the organization. Good luck; have fun!
What you will learn
- Open the public employee portal served by a Lambda function
- Probe the employee code parameter for injection flaws
- Confirm the local file inclusion flaw by reading server files
- Steal the Lambda role credentials from /proc/self/environ
- Use the stolen credentials to read the Secrets Manager secret and capture the flag
Hands-on lab
Access Secrets Manager via Lambda Function with LFI
Free with a Cybr account.