ECR Container Registry Enumeration
Container images frequently contain hardcoded secrets, internal service URLs, and build-time credentials. Pulling and inspecting images requires only ecr:GetAuthorizationToken and ecr:BatchGetImage.
- Environment variables baked into image config (API keys, DB passwords)
- Build-time secrets leaked through
ARGandRUNinstructions in layer history - Repository policies with
Principal: *granting cross-account or public pull access - Internal service URLs and hostnames in config files within image layers
List Repositories
List Images in a Repository
Authenticate Docker to ECR
Pull and Inspect an Image
Extract Secrets from Image Layers
Image history shows build commands including any credentials passed as ARG or RUN steps:
Repository Policy
Check if the repository allows cross-account or public access:
"Principal": "*" in the policy means anyone can pull from the repository.
Public ECR Gallery
Public repositories on ECR Public Gallery (public.ecr.aws) require no authentication: