My recent #aws threads always startet with creds, but how to get these creds will be the topic over the next days. #hacking#recon#cloud
Lets start here:
👇
Definitions first: #aws creds: classic name and passwords e.g for IAM, or aws access and secret keys
Outside: no creds, and no connections in any way to the org and its aws cloud to be tested
Interaction Point: Any potential point, application ressource, system, vulnerabilty etc, where there is a pawsibilty to gain #aws creds, can be a lot of things
lets do outside first: #hackers are cold, let them in.
Two things from outside: 1. Search for #aws creds leak 2. Identify and if possible abuse interaction points to gain #aws creds (future thread)
Leak search now, interactions points in a future thread
Basically ANYTHING puplic where #aws creds were mistakenly posted.
Stuff like:
Anything git, github, gitlab etc
Any share-stuff
Any api-collections
Any stuff on developer plattforms
Anything you can find really
TBH its not as easy to find creds as it used to be, creds are flagged, scanned for by orgs themselfes or contracters etc.
Selfhosted git or share-thingies sometimes still might be good tho, but don't expect to find #aws creds in pup git easily.
Sidenote: I purrsonaly am often more interested in terraform or cloudformation confs, even if they has no key, is super valuable information, about system arch, and interaction points. I yearn for the yaml!
Sidenote: The last key I found from pure outside was not in repo but in commit-history, check those.
Also: Of course there is also darknet, markets, forums and payed-leaks, but these are for another time.
As always in reality all is more complex. Imagine you have rdp in an org, even tho you are technically inside, you have no cloud creds, so INSIDE is OUTSIDE meow!
Do the same, look for share, git, scripts, jobs etc. all of it. Inside might not be auto scanning/tagging for #aws keys. Recent example the #uber hack, White found a script, then pam, then cloud creds:
Don't tunnelvision on ad 2 much fellows.
Next up Interaction points, general stuff and technical examples. And yes you can support me by sending me cute animals and illegaly dirty techno.
Imagine: You find yourself in ec2, via some vulnerability, leaked ssh key, account or whatever.
Your are now just in a virtual machine, even tho this machine is hosted in aws, at this moment you have no connection into aws cloud of the org.
So lets make one
Step 1: First you gotta decide if this is more of a lazy space vibe kinda thing (A), or (B) calls for some illegal dirty acidcore and adjust your playlist accordingly:
A:
B: soundcloud.com/pitch1/i-can-h…
next drop the keys in your .aws creds file. I typically name the first set initial and work with the --profile tag in the cli, so I can keep track on were I am. Then check who you are first, with:
aws sts get-caller-identity --profile initial
Step 1: Say kiitos to @DrAzureAD then install AADInternals, set your phasers to stun and your POWAHSHELL to german to ensure MAXIMUM efficiency
To import the modul you might have to set your execution pawliciy 🐾.
For maximum fun we can set this to
Set-ExecutionPolicy unrestricted
on our managed company super safe devices. Do some privesc first if needed 😀