Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter for overriding observation window #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions DomainPasswordSpray.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ function Invoke-DomainPasswordSpray{

For each user, will try that user's name as their password

.PARAMETER TimeBetweenSpray

Amount of time between sprays ( default: automatic )

.EXAMPLE

C:\PS> Invoke-DomainPasswordSpray -Password Winter2016
Expand Down Expand Up @@ -109,7 +113,11 @@ function Invoke-DomainPasswordSpray{
$Delay=0,

[Parameter(Position = 9, Mandatory = $false)]
$Jitter=0
$Jitter=0,

[Parameter(Position = 10, Mandatory = $false)]
[int]
$TimeBetweenSpray=0

)

Expand Down Expand Up @@ -181,7 +189,16 @@ function Invoke-DomainPasswordSpray{
Write-Host -ForegroundColor Yellow "[*] WARNING - Be very careful not to lock out accounts with the password list option!"
}

$observation_window = Get-ObservationWindow $CurrentDomain
# If you can't look up the observation window, you can specify this parameter to override how many
# minutes between sprays.
if ($TimeBetweenSpray)
{
$observation_window = $TimeBetweenSpray
}
else
{
$observation_window = Get-ObservationWindow
}

Write-Host -ForegroundColor Yellow "[*] The domain password policy observation window is set to $observation_window minutes."
Write-Host "[*] Setting a $observation_window minute wait in between sprays."
Expand Down