AWS - Codebuild Enum
Last updated
Last updated
Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)
AWS CodeBuild is recognized as a fully managed continuous integration service. The primary purpose of this service is to automate the sequence of compiling source code, executing tests, and packaging the software for deployment purposes. The predominant benefit offered by CodeBuild lies in its ability to alleviate the need for users to provision, manage, and scale their build servers. This convenience is because the service itself manages these tasks. Essential features of AWS CodeBuild encompass:
Managed Service: CodeBuild manages and scales the build servers, freeing users from server maintenance.
Continuous Integration: It integrates with the development and deployment workflow, automating the build and test phases of the software release process.
Package Production: After the build and test phases, it prepares the software packages, making them ready for deployment.
AWS CodeBuild seamlessly integrates with other AWS services, enhancing the CI/CD (Continuous Integration/Continuous Deployment) pipeline's efficiency and reliability.
This is the legacy option where it's possible to configure some access (like a Github token or app) that will be shared across codebuild projects so all the projects can use this configured set of credentials.
The stored credentials (tokens, passwords...) are managed by codebuild and there isn't any public way to retrieve them from AWS APIs.
Depending on the repository platform (Github, Gitlab and Bitbucket) different options are provided. But in general, any option that requires to store a token or a password will store it as a secret in the secrets manager.
This allows different codebuild projects to use different configured accesses to the providers instead of just using the configured default one.
In the following page, you can check how to abuse codebuild permissions to escalate privileges:
AWS - Codebuild PrivescLearn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE) Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)