AWS Trail Recon is an idea that came up during gohacking's offensive AWS security training. The idea is to use Cloudtrail:lookupevents to analyze what permissions the user of the leaked key has.
- Fork this project
- Create an issue
- Code/Fix/Solve the issue in your repository.
- Make a pull request to this Project.
- Create a virtual environment
- Install the requirements
- Find any AWS Credential
- If the credential has the CloudTrail:LookUpEvents action you will get the results.
- trail-recon.py -d 1
- chmod +x trail-recon.sh
- ./trail-recon.sh -k $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -t $AWS_SESSION_TOKEN -d 1 or
- ./trail-recon.sh -p teste -d 1s
Python version
time trail-recon.py -d 1
10.02s user 13.48s system 34% cpu 1:07.50 total
time trail-recon.sh -d 1
32.66s user 16.37s system 34% cpu 2:21.75 total
[ ] - Better output format (eg: json, table). [ ] - Arguments to stay low profile (replace the useragent and other stuff) [ ] - Verify first if there is an SCP or if the credential has this permission(avoid getting denied) [ ] - Productionize the tool [ ] - Add tests for quality