PowerShellMafia / PowerSploit

PowerSploit - A PowerShell Post-Exploitation Framework
Other
11.68k stars 4.59k forks source link

Invoke-Shellcode fails to run on Windows 10.0.17134 #320

Open chrisbvt opened 5 years ago

chrisbvt commented 5 years ago

Duplicate of this ticket only for Invoke-Shellcode, this may be an issue across the board? https://github.com/PowerShellMafia/PowerSploit/issues/293

Fix is to change the following: Please try to change the line: $GetProcAddress = $UnsafeNativeMethods.GetMethod('GetProcAddress')

to

$GetProcAddress = $UnsafeNativeMethods.GetMethod('GetProcAddress', [reflection.bindingflags] "Public,Static", $null, [System.Reflection.CallingConventions]::Any, @((New-Object System.Runtime.InteropServices.HandleRef).GetType(), [string]), $null);

Senas23 commented 5 years ago

It is an issue across the board. Just committed to the Exfiltration/Get-Keystrokes.ps1 the same change. Will review all instances for this change.