Chapter 5. Exploiting and Securing Misconfigured AWS IAM Roles
Securing serverless applications involves securing every identity in the AWS account. This includes IAM users, roles, and other identities attackers could target to gain unauthorized access, escalate privileges, and establish persistence in the cloud account. In this chapter, you’ll work under the assumption that an attacker has gained access to leaked developer credentials, and examine how overlooked IAM misconfigurations within an AWS account can magnify the impact of a credential leak. You will explore how attackers exploit misconfigurations to escalate privileges, focusing on techniques such as abusing AssumeRole and leveraging AWS Lambda roles with excessive permissions.
By the end of this chapter, you will be better equipped to recognize IAM misconfigurations and assess Lambda execution roles for potential privilege escalation risks. In addition, you’ll have a better idea of what to look for when auditing accounts for persistence mechanisms that could allow attackers to maintain long-term access.
Reviewing Technical Prerequisites
To follow along in this chapter, and in Chapters 6 and 7 as well, you will need the following:
-
Two AWS accounts: one to set up and host the vulnerable-by-design serverless lab environment (the Serverless Lab account) and another for running simulated exploits (the Attacker account). Make sure to have both accounts ready and open in separate browser sessions (or incognito/private windows) ...
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