#147 Bugfix: Invoke-Mimikatz

Invoke-Mimikatz was not not handling functions exported by ordinal.
Thank you @gentilkiwi for the suggested fix!
This commit is contained in:
Matt Graeber 2016-07-15 14:07:10 -07:00
parent 8d46d02099
commit fee3b4c642
1 changed files with 8 additions and 1 deletions

View File

@ -1687,7 +1687,14 @@ $RemoteScriptBlock = {
}
else
{
[IntPtr]$NewThunkRef = $Win32Functions.GetProcAddress.Invoke($ImportDllHandle, $ProcedureName)
if($ProcedureName -is [string])
{
[IntPtr]$NewThunkRef = $Win32Functions.GetProcAddress.Invoke($ImportDllHandle, $ProcedureName)
}
else
{
[IntPtr]$NewThunkRef = $Win32Functions.GetProcAddressOrdinal.Invoke($ImportDllHandle, $ProcedureName)
}
}
if ($NewThunkRef -eq $null -or $NewThunkRef -eq [IntPtr]::Zero)