carnal0wnage / weirdAAL

WeirdAAL (AWS Attack Library)
780 stars 92 forks source link

simple change, for correct interpreter and additional cred check, as … #72

Closed c0decave closed 4 years ago

c0decave commented 4 years ago

…lambda aws excepts otherwise. I like tools which are not directly crashing if files or alike are missing ;-) Example: ./weirdAAL.py Traceback (most recent call last): File "./weirdAAL.py", line 32, in exec("from %s import " % module) File "", line 1, in File "/weirdAAL/modules/aws/aws_lambda.py", line 4, in from libs.aws.aws_lambda import File "weirdAAL/libs/aws/aws_lambda.py", line 21, in AWS_ACCESS_KEY_ID = credentials.access_key AttributeError: 'NoneType' object has no attribute 'access_key'

Now: ./weirdAAL.py No Key Information available. Place creds in .env file or export variables. Shared Creds Example File: [default] aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY

Or to export them in running shell: export AWS_ACCESS_KEY_ID= export AWS_SECRET_ACCESS_KEY=

I think, it could be done much more elegant, but who has time ;)

carnal0wnage commented 4 years ago

ok if you didnt follow the readme and dont have a .env file you do get that error. I'll talk with Ken about how best to handle that

weirdAAL git:(master) ✗ mv .env .notenv (weirdAAL) ➜ weirdAAL git:(master) ✗ python3 weirdAAL.py Traceback (most recent call last): File "weirdAAL.py", line 30, in exec("from %s import " % module) File "", line 1, in File "/Users/cgates/Documents/pentest/weirdAAL/modules/aws/cloudtrail.py", line 4, in from libs.aws.cloudtrail import File "/Users/cgates/Documents/pentest/weirdAAL/libs/aws/cloudtrail.py", line 22, in AWS_ACCESS_KEY_ID = credentials.access_key AttributeError: 'NoneType' object has no attribute 'access_key'

thanks for PR!

carnal0wnage commented 4 years ago

I think this is handled with https://github.com/carnal0wnage/weirdAAL/commit/ef760fde7ffa997e7319bbab0329e99de83e2847

carnal0wnage commented 4 years ago

thanks for the PR though!