Chapter 6. Hacking Publicly Accessible AWS Lambda Functions
Imagine spending weeks building a serverless application and launching it to thousands of users. Just a few days later, you discover the application has stopped working and AWS has temporarily suspended your account because of suspicious activity. After diving deeper into the root cause, you realize that an attacker exploited a code injection vulnerability in a publicly accessible Lambda function and used its overly permissive IAM role to access and exfiltrate secrets from Secrets Manager as well as sensitive data stored in other cloud resources. This scenario shows you how a single vulnerable Lambda function can be enough to trigger a full-scale data breach across your AWS account.
In this chapter, you will explore how attackers exploit publicly exposed Lambda URLs and run arbitrary code in the function’s execution environment. You’ll examine how a code-injection vulnerability in a Lambda function, when combined with an overly permissive IAM role, lets an attacker exfiltrate secrets stored in a secrets manager service.
To help you experience the attacker’s perspective firsthand, this chapter has been organized into five sections:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access