Skip to content

Commit

Permalink
add error code AADSTS53003 indicating successful spray but blocked by…
Browse files Browse the repository at this point in the history
… CAP per issue #67
  • Loading branch information
knavesec committed Mar 19, 2024
1 parent f723047 commit 7d9d1ae
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
6 changes: 6 additions & 0 deletions plugins/azuresso/azuresso.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ def azuresso_authenticate(url, username, password, useragent, pluginargs):
if (token):
data_response['output'] += f" - GOT TOKEN {token[0]}"

elif "AADSTS53003" in xmlresponse:
# Access successful but blocked by CAP
data_response['result'] = "success"
data_response['output'] = f"[+] SUCCESS ({error_code}): {creds} - NOTE: The response indicates token access is blocked by CAP"
data_response['valid_user'] = True

elif "AADSTS50076" in xmlresponse:
# Microsoft MFA response
data_response['result'] = "success"
Expand Down
6 changes: 6 additions & 0 deletions plugins/azvault/azvault.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ def azvault_authenticate(url, username, password, useragent, pluginargs):
data_response['result'] = "failure"
data_response['output'] = f'[-] FAILURE ({error_code}): Tenant for account {username} is not using AzureAD/Office365'

elif "AADSTS53003" in error:
# Access successful but blocked by CAP
data_response['result'] = "success"
data_response['output'] = f"[+] SUCCESS ({error_code}): {username}:{password} - NOTE: The response indicates token access is blocked by CAP"
data_response['valid_user'] = True

elif "AADSTS50076" in error:
# Microsoft MFA response
data_response['result'] = "success"
Expand Down
6 changes: 6 additions & 0 deletions plugins/msgraph/msgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ def msgraph_authenticate(url, username, password, useragent, pluginargs):
elif "AADSTS50034" in error:
data_response['result'] = "failure"
data_response['output'] = f'[-] FAILURE ({error_code}): Tenant for account {username} is not using AzureAD/Office365'

elif "AADSTS53003" in error:
# Access successful but blocked by CAP
data_response['result'] = "success"
data_response['output'] = f"[+] SUCCESS ({error_code}): {username}:{password} - NOTE: The response indicates token access is blocked by CAP"
data_response['valid_user'] = True

elif "AADSTS50076" in error:
# Microsoft MFA response
Expand Down
6 changes: 6 additions & 0 deletions plugins/msol/msol.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ def msol_authenticate(url, username, password, useragent, pluginargs):
data_response['result'] = "failure"
data_response['output'] = f'[-] FAILURE ({error_code}): Tenant for account {username} is not using AzureAD/Office365'

elif "AADSTS53003" in error:
# Access successful but blocked by CAP
data_response['result'] = "success"
data_response['output'] = f"[+] SUCCESS ({error_code}): {username}:{password} - NOTE: The response indicates token access is blocked by CAP"
data_response['valid_user'] = True

elif "AADSTS50076" in error:
# Microsoft MFA response
data_response['result'] = "success"
Expand Down
7 changes: 6 additions & 1 deletion plugins/template/MS_Template/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ def template_authenticate(url, username, password, useragent, pluginargs): # TOD
data_response['result'] = "failure"
data_response['output'] = f'[-] FAILURE ({error_code}): Tenant for account {username} is not using AzureAD/Office365'

elif "AADSTS53003" in error:
# Access successful but blocked by CAP
data_response['result'] = "success"
data_response['output'] = f"[+] SUCCESS ({error_code}): {username}:{password} - NOTE: The response indicates token access is blocked by CAP"
data_response['valid_user'] = True

elif "AADSTS50076" in error:
# Microsoft MFA response
data_response['result'] = "success"
Expand All @@ -104,7 +110,6 @@ def template_authenticate(url, username, password, useragent, pluginargs): # TOD
data_response['result'] = "potential"
data_response['output'] = f"[?] WARNING ({error_code}): The account {username} appears to be locked."


elif "AADSTS50055" in error:
# User password is expired
data_response['result'] = "success"
Expand Down

0 comments on commit 7d9d1ae

Please sign in to comment.