refactor, tidy up, split out config

This commit is contained in:
cmc
2017-07-24 14:35:17 -07:00
parent eab4dc0131
commit b0aa204efe
18 changed files with 40 additions and 303 deletions

View File

@@ -1,27 +1,9 @@
'''
if you have root or IAM access gather user info, manipulate access keys or passwords, make backdoor account
'''
import boto3
import botocore
import json
import urllib
import logging
import sys,os
import pprint
pp = pprint.PrettyPrinter(indent=5, width=80)
from libs.iam import *
from libs.sts import *
#insert AWS key, will figure out how to pull this in from a single file for all scripts
AWS_ACCESS_KEY_ID = ''
AWS_SECRET_ACCESS_KEY =''
from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
get_accountid(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
check_root_account(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
@@ -31,4 +13,4 @@ get_password_policy(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
#change_user_console_password(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, 'pythons3', 'PS#EDCasd123456!@')
#create_user(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,'leethax')
#make_admin(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,'leethax')
#make_backdoor_account(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,'leethax','PS#EDCasd123456!@')
#make_backdoor_account(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,'leethax','PS#EDCasd123456!@')