Beginner Lab
aws
Bypass Restrictions in API Gateway
Learn about API Gateway features, and how we can leverage these as red teamers to increase our access!
Overview
This fun and beginner friendly lab provides a good methodology to follow when starting to assess the security of Application Programming Interfaces. It showcases API Gateway features, and how we can leverage these as red teamers to increase our access!
Scenario
As part of a red team engagement, we have gained access to several AWS CodeCommit repositories. In one of the repositories we found hardcoded AWS access keys and a development API endpoint. Can you use this to compromise more than the development environment, and help increase our access?
Lab prerequisites
- Using cURL to interact with resources
- Familiarity with the command line
Learning outcomes
- Understanding of the Amazon API Gateway service
- Understanding of API security and how to approach it
- Making changes to resource policies and deploying new configurations
- IAM policy enumeration
Real-world context
An API (Application Programming Interface) gateway is a key part of modern software stacks. Acting like a middleman between users and the backend systems, it serves as a single entry point to handle and protect access to various APIs. Being able to assess API security by exploiting vulnerabilities, misconfigurations and exposures, and learning how to prevent making these mistakes are very important skills for penetration testers, software engineers and DevOps professionals alike.
Amazon API Gateway is a comprehensive service from AWS that allows the creation, deployment, and management of APIs at scale. It provides functionalities like transforming requests and responses, managing access through authorization, controlling request rates (throttling), and integrating seamlessly with AWS services (i.e. Lambda)."
Cloud Security Training To Protect Your Business
Pwned Labs for Business gives your team access to dedicated business content, including labs and cyber ranges.
We also offer in-person or remote workshops, and our cloud penetration services are helping businesses become more secure!