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

Commit 90a05de

Browse files
committed
Bugfix: Resolving ordinals in remote dll injection
Thanks to sixdub for finding and fixing a bug when resolving functions by ordinal in remote processes.
1 parent dc1a5e5 commit 90a05de

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CodeExecution/Invoke-ReflectivePEInjection.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Author: Joe Bialek, Twitter: @JosephBialek
3333
License: BSD 3-Clause
3434
Required Dependencies: None
3535
Optional Dependencies: None
36-
Version: 1.2
36+
Version: 1.3
3737
3838
.DESCRIPTION
3939
@@ -1547,7 +1547,7 @@ $RemoteScriptBlock = {
15471547
{
15481548
Throw "Unable to allocate memory in the remote process for shellcode"
15491549
}
1550-
1550+
[UIntPtr]$NumBytesWritten = [UIntPtr]::Zero
15511551
$Success = $Win32Functions.WriteProcessMemory.Invoke($RemoteProcHandle, $RSCAddr, $SCPSMemOriginal, [UIntPtr][UInt64]$SCLength, [Ref]$NumBytesWritten)
15521552
if (($Success -eq $false) -or ([UInt64]$NumBytesWritten -ne [UInt64]$SCLength))
15531553
{

0 commit comments

Comments
 (0)