Chapter 4. Exploiting and Securing Exposed AWS IAM Credentials
Identity and access management (IAM) serves as the primary mechanism for defining and controlling which resources each component in your serverless architecture is allowed to access. Despite its importance, IAM is often misconfigured and overlooked during development. One of the most critical mistakes you can make is exposing IAM credentials with full-access permissions because of insecure or poorly designed architecture. This is equivalent to locking your door and leaving the key taped to the doorknob.
In this chapter, you’ll work with a vulnerable-by-design serverless application to see how attackers can abuse exposed IAM credentials firsthand. You’ll explore how attackers can extract exposed keys from client-side code, leverage overly permissive IAM policies and roles to disable CloudTrail logging, and even create a backdoor IAM user with full administrative privileges.1 In addition, you’ll see how unauthorized Bedrock model invocations can be performed from an attacker account.2 Finally, you’ll learn how to audit CloudTrail and Bedrock model invocation logs to detect and respond to such attacks.
This chapter is divided into the following topics:
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