aboutsummaryrefslogtreecommitdiff
path: root/Invoke-SMBExec.ps1
diff options
context:
space:
mode:
authorKevin Robertson <robertsonk@gmail.com>2017-03-29 20:17:08 -0400
committerKevin Robertson <robertsonk@gmail.com>2017-03-29 20:17:08 -0400
commitb8f630f00e897278c5518a007127d3993c85f76b (patch)
tree3808f83bf3d5caf90f8c8ed10f95419f3fc2e4cd /Invoke-SMBExec.ps1
parent0da20709138029fcda7cab895487ec4553dc2bf5 (diff)
downloadInvoke-TheHash-b8f630f00e897278c5518a007127d3993c85f76b.tar.gz
Invoke-TheHash-b8f630f00e897278c5518a007127d3993c85f76b.zip
Fixed encoding
I removed the BOM characters that slipped into the files. They were causing import problems with some tools like Empire. I switched the SMBExec service startup type to manual just in case the delete doesn't complete. Updated one of the SMBExec messages.
Diffstat (limited to 'Invoke-SMBExec.ps1')
-rw-r--r--Invoke-SMBExec.ps18
1 files changed, 4 insertions, 4 deletions
diff --git a/Invoke-SMBExec.ps1 b/Invoke-SMBExec.ps1
index 3203cde..a293d77 100644
--- a/Invoke-SMBExec.ps1
+++ b/Invoke-SMBExec.ps1
@@ -1,4 +1,4 @@
-function Invoke-SMBExec
+function Invoke-SMBExec
{
<#
.SYNOPSIS
@@ -758,7 +758,7 @@ function Get-PacketSCMCreateServiceW()
$packet_SCMCreateServiceW.Add("SCMCreateServiceW_DisplayName",$packet_service)
$packet_SCMCreateServiceW.Add("SCMCreateServiceW_AccessMask",[Byte[]](0xff,0x01,0x0f,0x00))
$packet_SCMCreateServiceW.Add("SCMCreateServiceW_ServiceType",[Byte[]](0x10,0x00,0x00,0x00))
- $packet_SCMCreateServiceW.Add("SCMCreateServiceW_ServiceStartType",[Byte[]](0x02,0x00,0x00,0x00))
+ $packet_SCMCreateServiceW.Add("SCMCreateServiceW_ServiceStartType",[Byte[]](0x03,0x00,0x00,0x00))
$packet_SCMCreateServiceW.Add("SCMCreateServiceW_ServiceErrorControl",[Byte[]](0x00,0x00,0x00,0x00))
$packet_SCMCreateServiceW.Add("SCMCreateServiceW_BinaryPathName_MaxCount",$packet_command_length)
$packet_SCMCreateServiceW.Add("SCMCreateServiceW_BinaryPathName_Offset",[Byte[]](0x00,0x00,0x00,0x00))
@@ -1430,7 +1430,7 @@ if($SMB_client.Connected)
}
elseif([System.BitConverter]::ToString($SMB_client_receive[108..111]) -eq '05-00-00-00')
{
- Write-Output "$output_username is not a local administrator on $Target"
+ Write-Output "$output_username is not a local administrator or does not have required privilege on $Target"
$SMBExec_failed = $true
}
else
@@ -2142,7 +2142,7 @@ if($SMB_client.Connected)
}
elseif([System.BitConverter]::ToString($SMB_client_receive[128..131]) -eq '05-00-00-00')
{
- Write-Output "$output_username is not a local administrator on $Target"
+ Write-Output "$output_username is not a local administrator or does not have required privilege on $Target"
$SMBExec_failed = $true
}
else