Skip to content
Snippets Groups Projects
Commit 8051bd57 authored by Marius Raes's avatar Marius Raes
Browse files

15 min sleep

parent 20230e47
No related branches found
No related tags found
No related merge requests found
#ps1_sysnative #ps1_sysnative
Start-Sleep -s 1800
echo custom-script echo custom-script
if( !(Test-Path -Path "C:\flag.txt")) { if( !(Test-Path -Path "C:\flag.txt")) {
New-Item -Path "C:\flag.txt" New-Item -Path "C:\flag.txt"
...@@ -22,7 +23,7 @@ if( !(Test-Path -Path "C:\flag.txt")) { ...@@ -22,7 +23,7 @@ if( !(Test-Path -Path "C:\flag.txt")) {
$usr = "$dc\Administrator" $usr = "$dc\Administrator"
$creds = New-Object System.Management.Automation.PSCredential($usr,$pw) $creds = New-Object System.Management.Automation.PSCredential($usr,$pw)
$added = $true $joined = $true
$i = 0; $i = 0;
do { do {
try { try {
...@@ -39,6 +40,10 @@ if( !(Test-Path -Path "C:\flag.txt")) { ...@@ -39,6 +40,10 @@ if( !(Test-Path -Path "C:\flag.txt")) {
} while ((-Not $joined) -And ($i -lt 25)) } while ((-Not $joined) -And ($i -lt 25))
}else { }else {
Start-Sleep -s 600 $i = 0
do {
<RDPMembers> # Adds users to the rdp member group <RDPMembers> # Adds users to the rdp member group
$i = $i+1
} while($i -lt 10)
} }
...@@ -22,13 +22,12 @@ if( !(Test-Path -Path "C:\flag.txt")) { ...@@ -22,13 +22,12 @@ if( !(Test-Path -Path "C:\flag.txt")) {
exit 1003 exit 1003
}else { }else {
echo "else" echo "else"
New-Item -Path "C:\log.txt"
New-ADUser -Name "bojack" -Accountpassword (ConvertTo-SecureString "HorsemanPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt New-ADUser -Name "bojack" -Accountpassword (ConvertTo-SecureString "HorsemanPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "diane" -Accountpassword (ConvertTo-SecureString "NguyenPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt New-ADUser -Name "diane" -Accountpassword (ConvertTo-SecureString "NguyenPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "todd" -Accountpassword (ConvertTo-SecureString "ChavezPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt New-ADUser -Name "todd" -Accountpassword (ConvertTo-SecureString "ChavezPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "sarah" -Accountpassword (ConvertTo-SecureString "LynnPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt New-ADUser -Name "sarah" -Accountpassword (ConvertTo-SecureString "LynnPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "hollyhock" -Accountpassword (ConvertTo-SecureString "ManheimPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt New-ADUser -Name "hollyhock" -Accountpassword (ConvertTo-SecureString "ManheimPass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "wanda" -Accountpassword (ConvertTo-SecureString "PiercePass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt New-ADUser -Name "wanda" -Accountpassword (ConvertTo-SecureString "PiercePass1" -AsPlainText -Force ) -Enabled $true
New-ADUser -Name "pinky" -Accountpassword (ConvertTo-SecureString "PenguinPass1" -AsPlainText -Force ) -Enabled $true >> C:\log.txt New-ADUser -Name "pinky" -Accountpassword (ConvertTo-SecureString "PenguinPass1" -AsPlainText -Force ) -Enabled $true
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment