Skip to content

Offensive Terraform module which takes over a subdomain which has a CNAME record pointing to non-existing S3 bucket in target's Route53. The module creates a S3 bucket with a name as subdomain in the specific AWS region that CNAME record is pointing to. Also, it uploads a simple web page with "404 Page Not Found" text.

License

Notifications You must be signed in to change notification settings

offensive-terraform/terraform-aws-s3-subdomain-takeover

Repository files navigation

AWS S3 Subdomain Takeover

OffensiveTerraform OffensiveTerraform OffensiveTerraform

Offensive Terraform module which takes over a subdomain which has a CNAME record pointing to non-existing S3 bucket in target's Route53. The module creates a S3 bucket with a name as subdomain in the specific AWS region that CNAME record is pointing to. Also, it uploads a simple web page with "404 Page Not Found" text.

Attack Diagram

Note: Must specify a S3 bucket region in the provider section.

Usage

provider "aws" {
    region = "us-east-1"
}

module "s3-subdomain-takeover" {
    source  = "offensive-terraform/s3-subdomain-takeover/aws"

    subdomain = "subdomain.example.com"
}

output "s3_website_endpoint" {
  value = module.s3-subdomain-takeover.s3_website_endpoint
}

Author

Module managed by https://github.com/iganbold

About

Offensive Terraform module which takes over a subdomain which has a CNAME record pointing to non-existing S3 bucket in target's Route53. The module creates a S3 bucket with a name as subdomain in the specific AWS region that CNAME record is pointing to. Also, it uploads a simple web page with "404 Page Not Found" text.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published