3 ms·
I once replied to a flippant comment about the inherent reliability of the cloud with a two-line PowerShell script that would end any 100% cloud-hosted business
by jiggawatts 5y ago
I once replied to a flippant comment about the inherent reliability of the cloud with a two-line PowerShell script that would end any 100% cloud-hosted business if executed in the context of an admin account. As in: pack up everything, turn the lights off, lock the doors, and go home because the game is over.
I deliberately obfuscated the script by replacing characters with various Unicode confusables, both the letters and the symbols.
I still felt bad and ended up deleting the post.
Hopefully nobody tried to type it in manually instead of cut & pasting just to see what would happen...
- stavros 5y agoWhat, like rm -rf?
- jiggawatts 5y agoThere are cloud-era equivalents that will do a heck of a lot more damage. Think bulk account/subscription deletion with a sprinkling of -force and -purge. Delete locks and the like will stop this… unless you bulk delete them first. The admins will get warning emails that they will finish reading in abject terror some time after their entire cloud tenant has gone to heaven. The modern equivalent of “Operating system not found” is “Click the guides below to get started with your new cloud account.”
- justsomehnguy 5y agohttps://docs.aws.amazon.com/powershell/latest/reference/items/Get-EC2Instance.html https://docs.aws.amazon.com/powershell/latest/reference/item... # this would wipe all EC2 instances, assuming you are authenticated and there is nothing else need to get a list of them Get-EC2Instance | Remove-EC2Instance -Force If there is a way to enumerate objects without explicitly specifying some properties then PS makes it very easy to pipe that output to remove or disable cmdlets. I never worked with AWS but if I needed to write such killer script I would kill instances (as in above example), remove all S3 objects (quite similar, Get-S3Object | Remove-S3Object) and finally wipe out all IAM roles and users (similar Get/Remove-IAMGroup, ..IAMUser etc). And thesubscription/account things, as @jiggawatts says, I'm just not familiar with the AWS lingo. And secrets/creds, of course. By the time a human starts to investigate why the monitoring gone mad (assuming it wasn't hosted with all other infra on same account, lol) there would be nothing to do, too many thing are gone already, too many things are on the way to be purged and even if they could be restored there would be too many things to tie it again to something resembling a functioning system.
- stavros 5y agoOh huh, for some reason that didn't even come to mind. Good thing all our infrastructure is applied by CI and our local tokens are read-only!
- jiggawatts 5y agoDo you gave S3 buckets? They’re just as easy to bulk-delete, and then they’re… gone.
- chikipowpow 5y ago