Merge pull request #31 from carnal0wnage/switch_from_step_to_module
changing from step to module
This commit is contained in:
@@ -4,9 +4,9 @@ This file is used to list lambda functions and event mappings
|
|||||||
from libs.aws_lambda import *
|
from libs.aws_lambda import *
|
||||||
|
|
||||||
|
|
||||||
def step_lambda_list_functions():
|
def module_lambda_list_functions():
|
||||||
list_functions()
|
list_functions()
|
||||||
|
|
||||||
|
|
||||||
def step_lambda_list_event_source_mappings():
|
def module_lambda_list_event_source_mappings():
|
||||||
list_event_source_mappings()
|
list_event_source_mappings()
|
||||||
|
|||||||
@@ -7,5 +7,5 @@ permission to get anything from this
|
|||||||
from libs.ce import *
|
from libs.ce import *
|
||||||
|
|
||||||
|
|
||||||
def step_cost_explorer_get_cost_and_usage():
|
def module_cost_explorer_get_cost_and_usage():
|
||||||
ce_get_cost_and_usage()
|
ce_get_cost_and_usage()
|
||||||
@@ -4,17 +4,17 @@ This file is used to perform cloudtrail actions
|
|||||||
from libs.cloudtrail import *
|
from libs.cloudtrail import *
|
||||||
|
|
||||||
|
|
||||||
def step_cloudtrail_describe_trails():
|
def module_cloudtrail_describe_trails():
|
||||||
describe_trails()
|
describe_trails()
|
||||||
|
|
||||||
|
|
||||||
def step_cloudtrail_list_public_keys():
|
def module_cloudtrail_list_public_keys():
|
||||||
list_public_keys()
|
list_public_keys()
|
||||||
|
|
||||||
|
|
||||||
def step_cloudtrail_stop_trail(TrailARN):
|
def module_cloudtrail_stop_trail(TrailARN):
|
||||||
stop_trail(TrailARN)
|
stop_trail(TrailARN)
|
||||||
|
|
||||||
|
|
||||||
def step_cloudtrail_delete_trail(TrailARN):
|
def module_cloudtrail_delete_trail(TrailARN):
|
||||||
delete_trail(TrailARN)
|
delete_trail(TrailARN)
|
||||||
@@ -5,11 +5,11 @@ decribe alarms, describe alarm history, list metrics
|
|||||||
from libs.cloudwatch import *
|
from libs.cloudwatch import *
|
||||||
|
|
||||||
|
|
||||||
def step_cloudwatch_describe_alarms():
|
def module_cloudwatch_describe_alarms():
|
||||||
describe_alarms()
|
describe_alarms()
|
||||||
|
|
||||||
def step_cloudwatch_describe_alarm_history():
|
def module_cloudwatch_describe_alarm_history():
|
||||||
describe_alarm_history()
|
describe_alarm_history()
|
||||||
|
|
||||||
def step_cloudwatch_list_metrics():
|
def module_cloudwatch_list_metrics():
|
||||||
list_metrics()
|
list_metrics()
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ datapipeline modules
|
|||||||
from libs.datapipeline import *
|
from libs.datapipeline import *
|
||||||
|
|
||||||
|
|
||||||
def step_datapipeline_list_pipelines():
|
def module_datapipeline_list_pipelines():
|
||||||
'''
|
'''
|
||||||
List Pipelines
|
List Pipelines
|
||||||
'''
|
'''
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ db_name = "weirdAAL.db"
|
|||||||
# for a key, what services does it have listed in the DB
|
# for a key, what services does it have listed in the DB
|
||||||
|
|
||||||
|
|
||||||
def step_show_services_by_key():
|
def module_show_services_by_key():
|
||||||
'''
|
'''
|
||||||
Show services for a given key service:sub_service
|
Show services for a given key service:sub_service
|
||||||
example: elasticbeanstalk:DescribeEvents
|
example: elasticbeanstalk:DescribeEvents
|
||||||
@@ -28,7 +28,7 @@ def step_show_services_by_key():
|
|||||||
print("{}:{}".format(result[0], result[1]))
|
print("{}:{}".format(result[0], result[1]))
|
||||||
|
|
||||||
|
|
||||||
def step_show_services_by_key_with_date():
|
def module_show_services_by_key_with_date():
|
||||||
'''
|
'''
|
||||||
Show services for a given key service:sub_service
|
Show services for a given key service:sub_service
|
||||||
example: elasticbeanstalk:DescribeEvents
|
example: elasticbeanstalk:DescribeEvents
|
||||||
@@ -41,7 +41,7 @@ def step_show_services_by_key_with_date():
|
|||||||
# same as show_sevices
|
# same as show_sevices
|
||||||
|
|
||||||
|
|
||||||
def step_list_services_by_key():
|
def module_list_services_by_key():
|
||||||
'''
|
'''
|
||||||
Show services for a given key service:sub_service
|
Show services for a given key service:sub_service
|
||||||
example: elasticbeanstalk:DescribeEvents
|
example: elasticbeanstalk:DescribeEvents
|
||||||
@@ -55,7 +55,7 @@ def step_list_services_by_key():
|
|||||||
# for a key, what services does it have listed in the DB and the date
|
# for a key, what services does it have listed in the DB and the date
|
||||||
|
|
||||||
|
|
||||||
def step_list_services_by_key_with_date():
|
def module_list_services_by_key_with_date():
|
||||||
'''
|
'''
|
||||||
Show services for a given key service:sub_service with date
|
Show services for a given key service:sub_service with date
|
||||||
example: elasticbeanstalk:DescribeEvents -> Date: 2018-04-18 20:36:41.791780
|
example: elasticbeanstalk:DescribeEvents -> Date: 2018-04-18 20:36:41.791780
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ dynamoDB examples
|
|||||||
from libs.dynamodb import *
|
from libs.dynamodb import *
|
||||||
|
|
||||||
|
|
||||||
def step_dynamodb_list_tables():
|
def module_dynamodb_list_tables():
|
||||||
list_dynamodb_tables()
|
list_dynamodb_tables()
|
||||||
|
|
||||||
def step_dynamodb_list_tables_detailed():
|
def module_dynamodb_list_tables_detailed():
|
||||||
list_dynamodb_tables_detailed()
|
list_dynamodb_tables_detailed()
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ dynamoDBstreams examples
|
|||||||
from libs.dynamodbstreams import *
|
from libs.dynamodbstreams import *
|
||||||
|
|
||||||
|
|
||||||
def step_dynamodbstreams_list_streams():
|
def module_dynamodbstreams_list_streams():
|
||||||
list_dynamodbstreams()
|
list_dynamodbstreams()
|
||||||
@@ -12,7 +12,7 @@ InstanceID: i-XXXXXXXXXXXXXXX, InstanceType: t2.micro, State: {'Code': 80, 'Name
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_describe_instances_basic():
|
def module_ec2_describe_instances_basic():
|
||||||
describe_instances_basic()
|
describe_instances_basic()
|
||||||
|
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ All info about each EC2 instance
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_describe_instances():
|
def module_ec2_describe_instances():
|
||||||
describe_instances()
|
describe_instances()
|
||||||
|
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ show volumes sorted by instanceId ex: instanceID-->multiple volumes less detail
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_get_instance_volume_details():
|
def module_ec2_get_instance_volume_details():
|
||||||
get_instance_volume_details()
|
get_instance_volume_details()
|
||||||
|
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ show volumes by instanceId but instanceID->volume1 of ID, instanceID->volume2 of
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_get_instance_volume_details2():
|
def module_ec2_get_instance_volume_details2():
|
||||||
get_instance_volume_details2()
|
get_instance_volume_details2()
|
||||||
|
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ This function is used to list EBS volumes and whether or not they are encrypted.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_review_encrypted_volumes():
|
def module_ec2_review_encrypted_volumes():
|
||||||
review_encrypted_volumes()
|
review_encrypted_volumes()
|
||||||
|
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ This function is used to describe ec2 network addresses.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_describe_addresses():
|
def module_ec2_describe_addresses():
|
||||||
describe_addresses()
|
describe_addresses()
|
||||||
|
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ This function is used to describe ec2 network interfaces.
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_describe_network_interfaces():
|
def module_ec2_describe_network_interfaces():
|
||||||
describe_network_interfaces()
|
describe_network_interfaces()
|
||||||
|
|
||||||
|
|
||||||
@@ -75,5 +75,5 @@ this function describes route tables for each ec2 instance
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_ec2_describe_route_tables():
|
def module_ec2_describe_route_tables():
|
||||||
describe_route_tables()
|
describe_route_tables()
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ ECR functions
|
|||||||
'''
|
'''
|
||||||
from libs.ecr import *
|
from libs.ecr import *
|
||||||
|
|
||||||
def step_ecr_describe_repos():
|
def module_ecr_describe_repos():
|
||||||
describe_repositories()
|
describe_repositories()
|
||||||
|
|||||||
@@ -12,21 +12,21 @@ when you run these functions
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
|
|
||||||
def step_elasticbeanstalk_describe_applications():
|
def module_elasticbeanstalk_describe_applications():
|
||||||
describe_applications()
|
describe_applications()
|
||||||
|
|
||||||
|
|
||||||
def step_elasticbeanstalk_describe_applications_versions():
|
def module_elasticbeanstalk_describe_applications_versions():
|
||||||
describe_application_versions()
|
describe_application_versions()
|
||||||
|
|
||||||
# not working
|
# not working
|
||||||
# def step_elasticbeanstalk_describe_configuration_options():
|
# def module_elasticbeanstalk_describe_configuration_options():
|
||||||
# describe_configuration_options()
|
# describe_configuration_options()
|
||||||
|
|
||||||
|
|
||||||
def step_elasticbeanstalk_describe_environments():
|
def module_elasticbeanstalk_describe_environments():
|
||||||
describe_environments()
|
describe_environments()
|
||||||
|
|
||||||
|
|
||||||
def step_elasticbeanstalk_describe_events():
|
def module_elasticbeanstalk_describe_events():
|
||||||
describe_events()
|
describe_events()
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ This file is used to perform some EMR actions
|
|||||||
from libs.emr import *
|
from libs.emr import *
|
||||||
|
|
||||||
|
|
||||||
def step_emr_list_clusters():
|
def module_emr_list_clusters():
|
||||||
list_clusters()
|
list_clusters()
|
||||||
|
|
||||||
|
|
||||||
def step_emr_list_security_configurations():
|
def module_emr_list_security_configurations():
|
||||||
list_security_configurations()
|
list_security_configurations()
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ Firehose functions
|
|||||||
from libs.firehose import *
|
from libs.firehose import *
|
||||||
|
|
||||||
|
|
||||||
def step_firehose_list_delivery_streams():
|
def module_firehose_list_delivery_streams():
|
||||||
firehose_list_delivery_streams()
|
firehose_list_delivery_streams()
|
||||||
|
|
||||||
|
|
||||||
def step_firehose_describe_delivery_streams():
|
def module_firehose_describe_delivery_streams():
|
||||||
firehose_describe_delivery_streams()
|
firehose_describe_delivery_streams()
|
||||||
@@ -4,39 +4,39 @@ IAM recon functions
|
|||||||
from libs.iam import *
|
from libs.iam import *
|
||||||
|
|
||||||
|
|
||||||
def step_iam_list_groups():
|
def module_iam_list_groups():
|
||||||
iam_list_groups()
|
iam_list_groups()
|
||||||
|
|
||||||
|
|
||||||
def step_iam_get_user():
|
def module_iam_get_user():
|
||||||
iam_get_user()
|
iam_get_user()
|
||||||
|
|
||||||
|
|
||||||
def step_iam_get_account_summary():
|
def module_iam_get_account_summary():
|
||||||
iam_get_account_summary()
|
iam_get_account_summary()
|
||||||
|
|
||||||
|
|
||||||
def step_iam_list_users(*args):
|
def module_iam_list_users(*args):
|
||||||
iam_list_users()
|
iam_list_users()
|
||||||
|
|
||||||
def step_iam_check_root_account():
|
def module_iam_check_root_account():
|
||||||
check_root_account()
|
check_root_account()
|
||||||
|
|
||||||
def step_iam_get_password_policy():
|
def module_iam_get_password_policy():
|
||||||
get_password_policy()
|
get_password_policy()
|
||||||
|
|
||||||
def step_iam_list_roles():
|
def module_iam_list_roles():
|
||||||
iam_list_roles()
|
iam_list_roles()
|
||||||
|
|
||||||
def step_iam_list_policies():
|
def module_iam_list_policies():
|
||||||
iam_list_policies()
|
iam_list_policies()
|
||||||
|
|
||||||
#have to figure out the argument passing part here first
|
#have to figure out the argument passing part here first
|
||||||
def step_iam_list_user_policies():
|
def module_iam_list_user_policies():
|
||||||
iam_list_user_policies( 'root')
|
iam_list_user_policies( 'root')
|
||||||
|
|
||||||
def step_iam_list_attached_user_policies():
|
def module_iam_list_attached_user_policies():
|
||||||
iam_list_attached_user_policies( 'root')
|
iam_list_attached_user_policies( 'root')
|
||||||
|
|
||||||
def step_iam_list_entities_for_policy():
|
def module_iam_list_entities_for_policy():
|
||||||
iam_list_entities_for_policy('arn:aws:iam::xxxxxxx')
|
iam_list_entities_for_policy('arn:aws:iam::xxxxxxx')
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from libs.sts import *
|
|||||||
#from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
#from config import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
|
||||||
|
|
||||||
|
|
||||||
def step_cg_test():
|
def module_iam_pwn():
|
||||||
get_accountid()
|
get_accountid()
|
||||||
check_root_account()
|
check_root_account()
|
||||||
get_password_policy()
|
get_password_policy()
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
from libs.opsworks import *
|
from libs.opsworks import *
|
||||||
|
|
||||||
|
|
||||||
def step_opsworks_describe_stacks():
|
def module_opsworks_describe_stacks():
|
||||||
describe_stacks()
|
describe_stacks()
|
||||||
|
|
||||||
|
|
||||||
def step_opsworks_describe_user_profiles():
|
def module_opsworks_describe_user_profiles():
|
||||||
describe_user_profiles()
|
describe_user_profiles()
|
||||||
@@ -7,5 +7,5 @@ permission to get anything from this
|
|||||||
from libs.pricing import *
|
from libs.pricing import *
|
||||||
|
|
||||||
|
|
||||||
def step_pricing_describe_services():
|
def module_pricing_describe_services():
|
||||||
pricing_describe_services()
|
pricing_describe_services()
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ RDS module
|
|||||||
|
|
||||||
from libs.rds import *
|
from libs.rds import *
|
||||||
|
|
||||||
def step_rds_describe_db_instances():
|
def module_rds_describe_db_instances():
|
||||||
describe_db_instances()
|
describe_db_instances()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from libs.brute import *
|
|||||||
from libs.s3 import *
|
from libs.s3 import *
|
||||||
|
|
||||||
|
|
||||||
def step_recon_all():
|
def module_recon_all():
|
||||||
get_accountid()
|
get_accountid()
|
||||||
check_root_account()
|
check_root_account()
|
||||||
brute_acm_permissions()
|
brute_acm_permissions()
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ route53 functions
|
|||||||
from libs.route53 import *
|
from libs.route53 import *
|
||||||
|
|
||||||
|
|
||||||
def step_route53_list_geolocations():
|
def module_route53_list_geolocations():
|
||||||
list_geolocations()
|
list_geolocations()
|
||||||
@@ -5,11 +5,11 @@ SES module
|
|||||||
|
|
||||||
from libs.ses import *
|
from libs.ses import *
|
||||||
|
|
||||||
def step_ses_list_identities():
|
def module_ses_list_identities():
|
||||||
list_identities()
|
list_identities()
|
||||||
|
|
||||||
def step_ses_get_send_statistics():
|
def module_ses_get_send_statistics():
|
||||||
get_send_statistics()
|
get_send_statistics()
|
||||||
|
|
||||||
def step_ses_list_configuration_sets():
|
def module_ses_list_configuration_sets():
|
||||||
list_configuration_sets()
|
list_configuration_sets()
|
||||||
@@ -4,5 +4,5 @@ SQS
|
|||||||
from libs.sqs import *
|
from libs.sqs import *
|
||||||
|
|
||||||
|
|
||||||
def step_sqs_list_queues():
|
def module_sqs_list_queues():
|
||||||
sqs_list_queues()
|
sqs_list_queues()
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ from libs.sts import *
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def step_sts_get_accountid():
|
def module_sts_get_accountid():
|
||||||
get_accountid()
|
get_accountid()
|
||||||
|
|
||||||
def step_sts_get_accountidall():
|
def module_sts_get_accountidall():
|
||||||
get_accountid_all()
|
get_accountid_all()
|
||||||
@@ -21,7 +21,7 @@ for module in all_modules:
|
|||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("-s", "--step", help="list the step you would like to run", action="store", type=str, required=True)
|
parser.add_argument("-m", "--module", help="list the module you would like to run", action="store", type=str, required=True)
|
||||||
parser.add_argument("-t", "--target", help="Give your target a name so we can track results", action="store", type=str, required=True)
|
parser.add_argument("-t", "--target", help="Give your target a name so we can track results", action="store", type=str, required=True)
|
||||||
parser.add_argument("-a", "--arguments", help="Provide a list of arguments, comma separated. Ex: arg1,arg2,arg3", action="store", type=str, required=False)
|
parser.add_argument("-a", "--arguments", help="Provide a list of arguments, comma separated. Ex: arg1,arg2,arg3", action="store", type=str, required=False)
|
||||||
parser.add_argument("-l", "--list", help="list steps", action="store_true")
|
parser.add_argument("-l", "--list", help="list steps", action="store_true")
|
||||||
@@ -45,14 +45,9 @@ def perform_credential_check():
|
|||||||
print("The AWS Access Keys are not valid/active")
|
print("The AWS Access Keys are not valid/active")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def step_recon():
|
|
||||||
print("!!!")
|
|
||||||
|
|
||||||
|
|
||||||
def method_create():
|
def method_create():
|
||||||
try:
|
try:
|
||||||
arg = globals()["step_" + args.step]
|
arg = globals()["module_" + args.step]
|
||||||
return arg
|
return arg
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print("That step does not exist")
|
print("That step does not exist")
|
||||||
|
|||||||
Reference in New Issue
Block a user