Stealing OAuth Github Tokens with AWS CodeBuild

Stealing OAuth Github Tokens with AWS CodeBuild

Source: YouTube · John Hammond · published Jun 28, 2023 · 15:22

Cloud Security
No ratings yet Log in to rate
Transcript Available
Description

AWS CodeBuild was patched to prevent unauthorized HTTP traffic, but an attacker can still leverage custom Docker containers to perform man-in-the-middle attacks and steal GitHub OAuth tokens from within the build environment.

Key Takeaways:
• AWS removed the vulnerability that allowed proxying traffic via HTTP, but introduced a feature that lets users execute builds inside custom Docker images, creating a new attack surface. 4:45
• By configuring a custom Docker container with a man-in-the-middle proxy and a custom CA certificate, an attacker can intercept the connection between CodeBuild and GitHub to capture sensitive OAuth tokens. 10:30
• This vulnerability highlights a structural difference from other providers like Google Cloud Platform; AWS exposes the GitHub connection to the build process, whereas GCP handles token distribution internally to prevent interception. 12:31

This technique serves as a "reverse" pivot method, demonstrating how compromising a CI/CD provider can expose secrets from external cloud services like GitHub.

Sources:

  • 1:20 Explanation of AWS CodeBuild
  • 4:45 Introduction of the Docker workaround
  • 7:36 Configuration of the malicious Docker image
  • 10:30 Execution of the MITM attack
  • 12:31 Comparison with Google Cloud Platform and security strategies

Generate CPE Credits

Generate a professional CPE document from this video's transcript.

Estimated credit: 0.5 CPE hours

Estimate uses the video runtime (1 hour ≈ 1 CPE, rounded to the nearest 0.5, minimum 0.5, maximum 2.0). The final amount can be lower after review, never higher.

Topic: Cloud Security. Commonly maps to: Security Architecture and Engineering, Communication and Network Security. Exact CISSP domains are assigned during generation.

CISSP Domain Mapping
Learning Objectives
Self-Assessment Questions
PDF Export Ready

Free account. One generation at a time, with a daily limit.

CPEBuddy is independent and not affiliated with or endorsed by ISC2, ISACA, or any certification body. Exports are formatted for common CPE submissions; acceptance is at your certification body's discretion.

Watch on YouTube

Transcript Preview

First 800 characters of the transcript

iPhone that in AWS you could just change https for HTTP and the connection will work so so AWS was just sending me all the the configure tokens to my account to my my in the middle and then download it all right everyone hey thanks so much for jumping back in I'm stoked to be hanging out with Carlos polyp and Ignacio Dominguez over from halborn where we have been discussing a little bit of cicd here that continuous integration continuous deployment continuous delivery however you want to interpret that last bitly acronym there but man we've been doing some uh sort of crawl walk run uh structure in these videos and now moving on I think we're going to start to run for a little bit I think we're going to be rocking two demos uh both in things that I'm a little bit new to naive and ignorant o…