AWS - CodeBuild Unauthenticated Access

Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!

Other ways to support HackTricks:

CodeBuild

For more info check this page:

pageAWS - Codebuild Enum

buildspec.yml

If you compromise write access over a repository containing a file named buildspec.yml, you could backdoor this file, which specifies the commands that are going to be executed inside a CodeBuild project and exfiltrate the secrets, compromise what is done and also compromise the CodeBuild IAM role credentials.

Note that even if there isn't any buildspec.yml file but you know Codebuild is being used (or a different CI/CD) modifying some legit code that is going to be executed can also get you a reverse shell for example.

For some related information you could check the page about how to attack Github Actions (similar to this):

pageAbusing Github Actions
Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!

Other ways to support HackTricks:

Last updated