Giter Club home page Giter Club logo

credmaster's Introduction

CredMaster

Launch a password spray / brute force attach via Amazon AWS passthrough proxies, shifting the requesting IP address for every authentication attempt. This dynamically creates FireProx APIs for more evasive password sprays.

Shoutout to @ustayready for his CredKing and FireProx tools, which form the base of this suite.

See all the full notes on the Wiki, tool released with specifics in this blogpost

For detection tips, see the blogpost and detection section.

Be careful for account lockouts, know the reset policies of your target

TL;DR

  1. git clone the repo down
  2. If unsure how to create correct keys see this blog.
  3. pip install -r requirements.txt
  4. Fill out the config file (wiki) with desired options, or provide through CLI

Benefits & Features

  • Rotates the requesting IP address for every request
  • Automatically generates APIs for proxy passthru
  • Spoofs API tracking numbers, forwarded-for IPs, and other proxy tracking headers = fully anonymous
  • Easily configuation via config file
  • Multi-threaded processing
  • Password delay counters & configuration for lockout policy evasion
  • Easily add new plugins
  • Colourised output
  • Notification systems for Keybase, Slack, Discord, Teams & Pushover
  • WeekdayWarrior setting for timed spraying and SOC evasion

general

Quick Use

The following plugins are currently supported:

  • OWA - Outlook Web Access
    • --plugin owa
  • EWS - Exchange Web Services
    • --plugin ews
  • O365 - Office365 - DEPRECATED
    • plugin removed
  • ADFS - Active Directory Federation Services
    • --plugin adfs
  • O365Enum - Office365 User Enum (No Authentication Request)
    • --plugin o365enum
  • MSOL - Microsoft Online
    • --plugin msol
  • MSGraph - MSGraph Module, msgraph spray point for azure and MSOL credentials
    • --plugin msgraph
  • AzureSSO - Azure AD Seamless SSO Endpoint
    • --plugin azuresso
  • AzVault - AzVault Module, Azure spray point different to MSOL/AzureSSO
    • --plugin azvault
  • Okta - Okta Authentication Portal
    • --plugin okta
  • FortinetVPN - Fortinet VPN Client
    • --plugin fortinetvpn
  • HTTPBrute - Generic HTTP Brute Methods (Basic/Digest/NTLM)
    • --plugin httpbrute
  • GMailEnum - GSuite/Gmail enumeration
    • --plugin gmailenum

Example Use:

python3 credmaster.py --plugin {pluginname} --access_key {key} --secret_access_key {key} -u userfile -p passwordfile -a useragentfile {otherargs}

or

python3 credmaster.py --config config.json

This tool requires AWS API access keys, a walkthrough on how to acquire these keys can be found here: https://bond-o.medium.com/aws-pass-through-proxy-84f1f7fa4b4b

All other usage details can be found on the wiki

TODO

PRs welcome :)

  • New Plugin: Optiv's Go365 Method - Includes Office365 auth and userenum capabilities via SOAP
  • "Resume" functionality for paused/cancelled scans. Ideally storing data for APIs used, if they were destroyed and what user/pwd the spray was on
  • Method to reliably determine if an auth attempt was throttled, so the username could be re-queued and tried again later for full cover (would have to be per-plugin, return "throttled" boolean value in plugin script, requeue if throttled)
  • Notification system for webhooks (Teams TODO)
  • Stop on success flag
  • Spray profile overhaul
  • Development notes
  • Spray username==password

Credits

  • Mike Felch (ustayready) - CredKing & FireProx
  • Beau Bullock (dafthack) - MSOLSpray tool
  • Martin Ingesen (mrtn9) - MSOLSpray Python tool
  • Oliver Morton (grimhacker) - Office365UserEnum tool
  • Marcello (byt3bl33d3r) - SprayingToolkit
  • Erforschr - HTTP Bruteforce tool
  • Florian Hauser (frycos from codewhitesec) - ADFS plugin
  • nyxgeek - Azure AD Seamless SSO python implementation
  • Joe Helle (joehelle) - Oh365UserFinder
  • Cameron Geehr (BarrelTit0r) - o365enum tool
  • Max Gruenberg (Max_Gruenberg) - o365enum plugin
  • x0rz - GmailEnum technique
  • Kole Swesey (0xPanic_) - Assorted PR
  • Logan (TheToddLuci0) - Assorted bug squashing, AWS authing, and Keybase notifying
  • Andy Gill (ZephrFish) - Colour functions + Tweaks/Notifications, helping on dev rewrite, AzVault module
  • Hugo VINCENT (@hugow) - Batch size / delay
  • Dennis Herrmann (dhn_ from CODE WHITE GmbH) - Ntfy notifying support

Feel free to drop me a line

credmaster's People

Contributors

0xinfection avatar 0xpanic avatar csandker avatar hugo-syn avatar justaskingquestions avatar knavesec avatar lukelauterbach avatar m0t098 avatar mr-pmillz avatar puzzlepeaches avatar thetoddluci0 avatar zephrfish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

credmaster's Issues

OWA/EWS Plugins Authentication Failed with Valid Credentials

While attempting to use the OWA/EWS plugins I am getting "Authentication Failed:" with a valid credential. O365 module works as expected for the same credentials. Possibly an issue with NTLM auth?

I'm curious if anyone has had success with these plugins before or have seen the same issue.

Required Python3 version?

Getting the following error on a fresh install of Credmaster. Curious if there is a specific python3 version that is required for usage?

image

I'm on python 3.10.4

Have only encountered this issue so far using the Okta plugin.

Fortinet Plugin : 500 internal error

Hello,

The Fortinet VPN plugin does not seem to work, for each request i receive a 500 internal error.
I tried to modify the headers or such but to no avail.

Do everybody have the same problem?

Thank you

Okta module won't run with more than one thread, won't run with zero threads

└─$ python3 credmaster.py --plugin okta  -f $FILE 
[2023-02-10 19:47:28.436] Execution started at: 2023-02-10 19:47:28.436535
Traceback (most recent call last):
  File "/home/notroot/git/CredMaster/credmaster.py", line 711, in <module>
    CredMaster(args, pluginargs)
  File "/home/notroot/git/CredMaster/credmaster.py", line 54, in __init__
    self.Execute(args)
  File "/home/notroot/git/CredMaster/credmaster.py", line 211, in Execute
    valid, errormsg, pluginargs = validator.validate(pluginargs, args)
  File "/home/notroot/git/CredMaster/plugins/okta/__init__.py", line 14, in validate
    if args.threads == 1 or (args.threads > 1 and 'force' in pluginargs.keys()):
TypeError: '>' not supported between instances of 'NoneType' and 'int'

ADFS module always reports success despite invalid credentials

I'm attempting to spray an ADFS endpoint with a list of email addresses validated using OneDriveEnum. I've tried specifying the URL according to the instructions, but also as https://federation.target.com/adfs/ls/. Neither worked. As soon as CredMaster starts spraying I'm seeing success notifications roll in, but there isn't a single one that fails, which I find highly unlikely.

$ python3 credmaster.py --config configuration.json --url https://federation.target.com
[2023-12-11 09:53:35.061] Execution started at: 2023-12-11 09:53:35.061807
[2023-12-11 09:53:35.063] Batching requests enabled: 50 requests per thread, 10s of delay between each batch.
[2023-12-11 09:53:35.063] Creating 10 API Gateways for https://federation.target.com
[2023-12-11 09:53:36.131] Created API - Region: eu-west-1 ID: (hzc7rs5re9) - https://hzc7rs5re9.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:53:47.250] Created API - Region: eu-west-1 ID: (cnlski5omb) - https://cnlski5omb.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:53:48.677] Created API - Region: eu-west-1 ID: (zzcyzo4ci0) - https://zzcyzo4ci0.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:53:51.942] Created API - Region: eu-west-1 ID: (b6tfrj15q6) - https://b6tfrj15q6.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:53:57.797] Created API - Region: eu-west-1 ID: (61qkfoezpb) - https://61qkfoezpb.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:54:15.671] Created API - Region: eu-west-1 ID: (rx80pcn3ri) - https://rx80pcn3ri.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:54:17.305] Created API - Region: eu-west-1 ID: (slapzy6pi2) - https://slapzy6pi2.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:54:19.128] Created API - Region: eu-west-1 ID: (nk7uzgnya1) - https://nk7uzgnya1.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:54:22.711] Created API - Region: eu-west-1 ID: (zxnfo6zr0h) - https://zxnfo6zr0h.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:54:25.149] Created API - Region: eu-west-1 ID: (vb9dmv76yj) - https://vb9dmv76yj.execute-api.eu-west-1.amazonaws.com/fireprox/ => https://federation.target.com
[2023-12-11 09:54:25.546] Testconnect: Connection success, continuing
[2023-12-11 09:54:25.547] Total Regions Available: 15
[2023-12-11 09:54:25.547] Total API Gateways: 10
[2023-12-11 09:54:25.547] Starting Spray...
[2023-12-11 09:54:26.306] Loading credentials from emails_target.com_20231130.txt with password Wachtwoord2023!
[2023-12-11 09:54:28.873] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:28.885] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:29.166] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:29.327] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:29.334] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:29.783] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:30.332] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:30.846] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:30.856] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
[2023-12-11 09:54:31.805] eu-west-1: [+] SUCCESS: => [email protected]:Wachtwoord2023!
^C
[2023-12-11 09:54:31.887] KeyboardInterrupt detected, cleaning up APIs
[2023-12-11 09:54:31.887] Finishing active requests

Please let me know if you need any further information.

AADSTS53003 error related to Conditional Access Policy(CAP) isn't registred as a successful spray

Hi, Thank you so much for your great work on this tool. I have been using it for the last 2 years and loving the work! Unfortunately, when spraying o365 the following error doesn't result in a successful spray and shows it as a failure:

AADSTS53003 Access has been blocked by Conditional Access policies. The access policy does not allow token issuance.

Appreciate it if you don't mind updating the repo to reflect this change :)

[Fireprox] SSO profiles fail

──(venv)─(kali㉿kali)-[~/git/CredMaster]
└─$ aws sso login --profile redteam-pwr
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this request, open the following URL:

https://device.sso.us-east-1.amazonaws.com/

Then enter the code:

XXXX-XXXX
Successfully logged into Start URL: https://XXXXXXXX.awsapps.com/start#
                                                                                                                                                                                                                                            
┌──(venv)─(kali㉿kali)-[~/git/CredMaster]
└─$ python3 credmaster.py --profile redteam-pwr --clean                                                                                                            
[2023-10-17 14:59:24.325] Clearing APIs for all regions
Error, inputs cause error.
Unable to load AWS credentials

Looks like the issue is here:

CredMaster/utils/fire.py

Lines 75 to 98 in 2d8092d

# If profile in files, try it, but flow through if it does not work
config_profile_section = f'profile {self.profile_name}'
if self.profile_name in credentials:
if config_profile_section not in config:
print(f'Please create a section for {self.profile_name} in your ~/.aws/config file')
return False
self.region = config[config_profile_section].get('region', 'us-east-1')
try:
self.client = boto3.session.Session(profile_name=self.profile_name).client('apigateway', config=Config(retries = dict(max_attempts = 10)))
self.client.get_account()
return True
except:
pass
# Maybe had profile, maybe didn't
if self.access_key and self.secret_access_key:
try:
self.client = boto3.client(
'apigateway',
aws_access_key_id=self.access_key,
aws_secret_access_key=self.secret_access_key,
aws_session_token=self.session_token,
region_name=self.region,
config=Config(retries = dict(max_attempts = 10))
)

The code assumes that you have a hard-coded cred somewhere, which isn't the case if you're using SSO profiles.

[azuresso] error when using plugin azuresso

Hi, I have the following error when I use the azuresso plugin with a valid and invalid login/password, it says Invalid STS request do you know what's happening ?

<S:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
    xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust"
    xmlns:S="http://www.w3.org/2003/05/soap-envelope">
    <S:Header>
        <psf:pp xmlns:psf="http://schemas.microsoft.com/Passport/SoapServices/SOAPFault">
            <psf:serverVersion>1</psf:serverVersion>
            <psf:authstate>0x80048800</psf:authstate>
            <psf:reqstatus>0x80048800</psf:reqstatus>
            <psf:serverInfo ServerTime="2023-09-18T15:55:29.3214929Z">ESTS-PUB-WEULR1-AZ2-FD174-001.ProdSlices
                rid:332c8052-2b70-45c5-93b7-78d0b4b63000</psf:serverInfo>
        </psf:pp>
    </S:Header>
    <S:Body xmlns:S="http://www.w3.org/2003/05/soap-envelope">
        <S:Fault>
            <S:Code>
                <S:Value>S:Sender</S:Value>
                <S:Subcode>
                    <S:Value>wst:FailedAuthentication</S:Value>
                </S:Subcode>
            </S:Code>
            <S:Reason>
                <S:Text xml:lang="en-US">Authentication Failure</S:Text>
            </S:Reason>
            <S:Detail>
                <psf:error xmlns:psf="http://schemas.microsoft.com/Passport/SoapServices/SOAPFault">
                    <psf:value>0x80048800</psf:value>
                    <psf:internalerror>
                        <psf:code>0x80048800</psf:code>
                        <psf:text>AADSTS81016: Invalid STS request.</psf:text>
                    </psf:internalerror>
                </psf:error>
            </S:Detail>
        </S:Fault>
    </S:Body>
</S:Envelope>```

MSOL Plugin: Handle BlockedByConditionalAccess (AADSTS53003)

Same issues exists in MSOLSpray (original by dafthack) and its python implementation that the msol module is based on:

If the target tenant is using conditional access policy and the credentials are correct, msol module will only show this error that is easy to miss:

[2023-05-29 07:11:20.098] eu-central-1: [-] FAILURE: Got an error we haven't seen yet for user [email protected]

Since the credentials are actually correct and might work on other endpoints that do not enforce CAP, I think this should be handled properly.

PR incoming.

Error: Unable to load AWS Credentials

Hello,

Recently came across a problem with this tool all of a sudden. Upon trying to run a spray I receive an error:
image

The simple command I've tried running is the command given in the usage example:

python3 credmaster.py --plugin <pluginname> -u users.txt -p passwords.txt --access_key <Key1> --secret_access_key <key2>

I've confirmed that my access keys are valid, I've tried running this tools via virtualenv and with docker but to no avail. Trying to follow the simple example is proving oddly difficult, any idea why I am receiving "Unable to load AWS Credentials". Would this be fireprox related?

TypeError: '>' not supported between instances of 'NoneType' and 'int'

Hey there, just bringing it to your attention, the recent change to the threads default value is causing errors if the threads param is not specified. I fixed it on my end by reverting the change to 'None' for the default variable back to 1.

Traceback (most recent call last): File "/home/kali/tools/CredMaster/credmaster.py", line 713, in <module> CredMaster(args, pluginargs) File "/home/kali/tools/CredMaster/credmaster.py", line 54, in __init__ self.Execute(args) File "/home/kali/tools/CredMaster/credmaster.py", line 207, in Execute valid, errormsg, pluginargs = validator.validate(pluginargs, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kali/tools/CredMaster/plugins/okta/__init__.py", line 14, in validate if args.threads == 1 or (args.threads > 1 and 'force' in pluginargs.keys()): ^^^^^^^^^^^^^^^^ TypeError: '>' not supported between instances of 'NoneType' and 'int'

TooManyRequestsException on thread creation

[2023-05-24 17:57:11.973] Execution started at: 2023-05-24 17:57:11.973820
[2023-05-24 17:57:11.975] Creating 15 API Gateways for https://login.microsoftonline.com
[2023-05-24 17:57:13.112] Created API - Region: us-east-2 ID: (xxxxxxx) - https://xxxxxxxxxx.execute-api.us-east-1.amazonaws.com/fireprox/ => https://login.microsoftonline.com
[2023-05-24 17:57:19.082] Created API - Region: us-east-1 ID: (xxxxxxxxx) - https://xxxxxxxxxxx.execute-api.us-east-1.amazonaws.com/fireprox/ => https://login.microsoftonline.com
[2023-05-24 17:57:23.063] Created API - Region: us-west-1 ID: (xxxxxxxxx) - https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/fireprox/ => https://login.microsoftonline.com
[2023-05-24 17:57:28.840] Created API - Region: us-west-2 ID: (xxxxxxxxxx) - https://xxxxxxxxx.execute-api.us-east-1.amazonaws.com/fireprox/ => https://login.microsoftonline.com
Traceback (most recent call last):
  File "/home/kali/git/CredMaster/credmaster.py", line 706, in <module>
    CredMaster(args, pluginargs)
  File "/home/kali/git/CredMaster/credmaster.py", line 54, in __init__
    self.Execute(args)
  File "/home/kali/git/CredMaster/credmaster.py", line 236, in Execute
    self.load_apis(url, region = self.region)
  File "/home/kali/git/CredMaster/credmaster.py", line 359, in load_apis
    self.apis.append(self.create_api(reg, url.strip()))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/git/CredMaster/credmaster.py", line 367, in create_api
    resource_id, proxy_url = fp.create_api(url)
                             ^^^^^^^^^^^^^^^^^^
  File "/home/kali/git/CredMaster/utils/fire.py", line 272, in create_api
    resource_id, proxy_url = self.create_deployment(response['id'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/git/CredMaster/utils/fire.py", line 350, in create_deployment
    response = self.client.create_deployment(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/git/CredMaster/venv/lib/python3.11/site-packages/botocore/client.py", line 530, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/git/CredMaster/venv/lib/python3.11/site-packages/botocore/client.py", line 960, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.TooManyRequestsException: An error occurred (TooManyRequestsException) when calling the CreateDeployment operation (reached max retries: 4): Too Many Requests

Possibly related to #48 ?

Error with random.py when not specifying UA file

Awesome tool!

Quick thing, it errors out if you do not specify a file with user agents:

image

Is this file a necessity for the tool to function? Seems like the intent is to use a random one if this is not specified.

Thanks!

Flawed logic in EWS results improper detection

First of all thank you for the tool!

I've been playing around with this tool for sometime and apparently the ews module results in false positives due to the flawed logic inside it.

        if resp.status_code != 401:
            data_response['result'] = "success"
            data_response['output'] = f"[+] SUCCESS: {username}:{password}"
            data_response['valid_user'] = True

        elif resp.status_code == 500:
            data_response['output'] = f"[*] POTENTIAL: Found credentials, but server returned 500: {username}:{password}"
            data_response['result'] = "potential"
            data_response['valid_user'] = True

        elif resp.status_code == 504:
            data_response['output'] = f"[*] POTENTIAL: Found credentials, but server returned 504: {username}:{password}"
            data_response['result'] = "potential"
            data_response['valid_user'] = True
            
        else:
            data_response['result'] = "failure"
            data_response['output'] = f"[-] FAILURE: {username}:{password}"

The first condition of the if statement apparently would not allow checking for the remaining elif since 500 != 401 (if resp.status_code is 500).

Hence it would always result in a SUCCESS message.

Issue with AWS API Sessions Not Terminating on Keyboard Interruption

Description:

When performing operations using CredMaster, particularly with plugins that interact with AWS services, I've encountered a significant issue where AWS API sessions persist beyond the intended lifecycle of the tool's execution. Specifically, when the operation is manually interrupted by the user (e.g., using CTRL+C for a keyboard interruption), it appears that the AWS API sessions initiated by CredMaster do not terminate as expected.

This behavior can lead to unintended API sessions remaining active, potentially accruing unnecessary charges or consuming API rate limits. The expected behavior would be for all external service sessions, including those to AWS APIs, to gracefully terminate, ensuring no lingering resources or sessions remain active beyond the tool's operation.

Steps to Reproduce:

  • Initiate any operation with CredMaster that involves communicating with AWS APIs.
  • Once the operation is underway, manually interrupt the process using CTRL+C.
  • Observe that the AWS API sessions remain active despite the manual termination of the CredMaster operation.

Expected Behavior:

Upon a keyboard interruption (CTRL+C), CredMaster should catch the interruption signal and gracefully terminate any active sessions with external services, including AWS APIs, before exiting. This ensures that no unintended resources or sessions remain active, aligning with best practices for resource management and operational hygiene.

Optiv's Go365 tool implementation

https://github.com/Optiv/Go365

Optiv's Go365 tool does some awesome bruteforcing & enum for Office365 tenants. Would be great to have a CredMaster plugin for it, with an optional --endpoint flag to specify RST or Graph.

I could probably do it myself, theres just a lack of time in this world, would appreciate if someone tried their hand with a PR!

Unable to Load AWS Credentials

When running the script after pulling the latest updates today, it doesn't like AWS keys in the command (note: creds have been removed, same exact error output with real ones):

image

Thanks!

Received error: ModuleNotFoundError: No module named 'plugins.o365'

When running this with the "O365" plugin, receive an error stating: ModuleNotFoundError: No module named 'plugins.o365'.

Current Python version 3.10.6

Steps to reproduce:

  1. Git clone recent release
  2. Run command as normal python3 credmaster.py -u <email.txt> -p <password.txt> --access_key '' --secret_access_key ''
  3. Receive output

credmaster

Wiki Permissions

I'd love to be able to build the wiki out, and correct a few minor issues (like the capitalization of "httpbrute" in the example command for the HTTP Brute module). Has any consideration been made to changing the Wiki permissions to public (Link)?

Office 365 Showing Failure for Valid Credentials

Any idea why this fails when running for o365 plugin? I've tested with two email accounts for which I know the password, across two domains configured to work with office 365.

config.json

{
  "plugin" : "o365",
  "userfile" : "users.txt",
  "passwordfile" : "passwords.txt",
  "userpassfile" : null,
  "useragentfile" : "useragents.txt",

  "outfile" : "output.txt",
  "threads" : null,
  "region" : "us-east-1",
  "jitter" : 30,
  "jitter_min" : 4,
  "delay" : 1,
  "passwordsperdelay" : null,
  "randomize" : false,
  "header" : null,
  "weekday_warrior" : null,
  "color" : false,
  "trim" : false,

  "slack_webhook" : null,
  "pushover_token" : null,
  "pushover_user" : null,
  "discord_webhook" : null,
  "teams_webhook" : null,
  "keybase_webhook": null,
  "operator_id" : null,
  "exclude_password" : false,

  "access_key" : "access_key",
  "secret_access_key" : "secret_access_key",
  "session_token" : null,
  "profile_name" : null
}

Output

python credmaster.py --config config.json
[2023-10-02 21:02:22.543] Execution started at: 2023-10-02 21:02:22.543404
[2023-10-02 21:02:22.543] Creating 1 API Gateways for https://autodiscover-s.outlook.com
[2023-10-02 21:02:23.305] Created API - Region: us-east-1 ID: (ID) - https://ID.execute-api.us-east-1.amazonaws.com/fireprox/ => https://autodiscover-s.outlook.com
[2023-10-02 21:02:24.064] Testconnect: Connection success, continuing
[2023-10-02 21:02:24.065] Total Regions Available: 15
[2023-10-02 21:02:24.065] Total API Gateways: 1
[2023-10-02 21:02:24.065] Starting Spray...
[2023-10-02 21:02:24.065] Loading credentials from users.txt with password KNOWN_PASSWORD
DEBUG <Response [401]>
DEBUG <?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
  <Response>
    <Error Time="ERROR_TIME" Id="RANDOM_ID">
      <ErrorCode>600</ErrorCode>
      <Message>Invalid Request</Message>
      <DebugData />
    </Error>
  </Response>
</Autodiscover>
[2023-10-02 21:02:43.332] us-east-1: [-] FAILURE: [email protected]:KNOWN_PASSWORD
[2023-10-02 21:02:43.333] Completed spray with password KNOWN_PASSWORD at 2023-10-02 21:02:43.333070
[2023-10-02 21:02:43.447] Destroying API (ID) in region us-east-1
[2023-10-02 21:02:44.122] End Time: 2023-10-02 21:02:44.122729
[2023-10-02 21:02:44.123] Total Execution: 21.579325 seconds
[2023-10-02 21:02:44.123] Valid credentials identified: 0

Delay problems

It's entirely possible I'm not actually understanding the configs, but running with a config file of this:
image
I end up with the spray going, but then after it cycles through the usernames with a single password it then sleeps for 30 minutes.
image

Shouldn't it be doing 4 different passwords and then sleeping for 30 minutes?

[O365Enum] Users with passwordless auth return not found

Calling via credmaster, we get
image
(Note: I added a print(response.json()) at line 59 to get the json.)

{
  "Username": "[email protected]",
  "Display": "[email protected]",
  "IfExistsResult": 1,
  "IsUnmanaged": false,
  "ThrottleStatus": 0,
  "Credentials": {
    "PrefCredential": 1,
    "HasPassword": true,
    "RemoteNgcParams": null,
    "FidoParams": null,
    "SasParams": null,
    "CertAuthParams": null,
    "GoogleParams": null,
    "FacebookParams": null,
    "CaptchaParams": null
  },
  "EstsProperties": {
    "UserTenantBranding": null,
    "DomainType": 3
  },
  "IsSignupDisallowed": true,
  "apiCanary": "asdfmovie4"
}

Going to log in manually, we see this
image

Note that here the value of IfExistsResult from /common/GetCredentialType is 5.

From the response:

{
  "Username": "[email protected]",
  "Display": "[email protected]",
  "IfExistsResult": 5,
  "IsUnmanaged": false,
  "ThrottleStatus": 0,
  "Credentials": {
    "PrefCredential": 1,
    "HasPassword": true,
    "RemoteNgcParams": null,
    "FidoParams": null,
    "SasParams": null,
    "CertAuthParams": null,
    "GoogleParams": null,
    "FacebookParams": null,
    "CaptchaParams": null
  },
  "EstsProperties": {
    "UserTenantBranding": null,
    "DomainType": 3
  },
  "FlowToken": "gowiththeflowman",
  "IsSignupDisallowed": true,
  "apiCanary": "some_garbage"
}

(Looks like this code is "Different IDP", not sure if that's used elsewhere, of just for passwordless auth.)

The only other difference I'm seeing is the FlowToken being set in the second.

Lockout Potential: Delay Skipped For Unknown Reasons

During a standard run of CredMaster, I encountered an issue where the delay setting in my conf file was skipped completely and the next password run started immediately. I had pushover notices configured, saw the conclusion of one run and the beginning of another run immediately, but there was still inappropriate overlap between attempts.

The following screenshots are from the same command execution. In the first screenshot, delay is obeyed correctly.

image

In this one (from the same running command), delay seems skipped for some reason.

image

The running command:

python3 credmaster.py --config ./config.json --url https://foo.bar.com

config.json

{
  "plugin" : "okta",
  "userfile" : "/project/emails_master.txt",
  "passwordfile" : "/project/passwords.txt",
  "userpassfile" : null,
  "useragentfile" : "/project/uas.txt",

  "outfile" : "/project/credmaster_out.txt",
  "threads" : 1,
  "region" : "us-east-1",
  "jitter" : 15,
  "jitter_min" : 5,
  "delay" : 1532,
  "batch_size": null,
  "batch_delay": null,
  "passwordsperdelay" : null,
  "randomize" : true,
  "header" : null,
  "weekday_warrior" : null,
  "color" : false,
  "trim" : false,

  "slack_webhook" : null,
  "pushover_token" : "<redacted key>",
  "pushover_user" : "<redacted key>",
  "discord_webhook" : null,
  "teams_webhook" : null,
  "keybase_webhook": null,
  "operator_id" : null,
  "exclude_password" : false,

  "access_key" : "<redacted key>",
  "secret_access_key" : "<redacted key>",
  "session_token" : null,
  "profile_name" : null
}

Great tool! Thank you for all the effort you put in to it. :-)

Strange uname/password/API error after recent update

Command:

python3 credmaster.py --plugin okta -u users.txt -p passwords.txt --access_key KEY --secret_access_key KEY --url ORG.okta.com

Prior to the updates within the last week or so, this worked as expected. Now with that same command, I get the following error:

Please provide plugin & username/password information, or provide API utility options (api_list/api_destroy/clean)

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.