Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
#147 Bugfix: Invoke-Mimikatz
Browse files Browse the repository at this point in the history
Invoke-Mimikatz was not not handling functions exported by ordinal.
Thank you @gentilkiwi for the suggested fix!
  • Loading branch information
Matt Graeber committed Jul 15, 2016
1 parent 8d46d02 commit fee3b4c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Exfiltration/Invoke-Mimikatz.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fee3b4c

Please sign in to comment.