在安装Windows Update后使用PowerSploit时报错:
Exception calling "GetMethod" with "1" argument(s): "Ambiguous match found."
解决方案是将
$GetProcAddress = $UnsafeNativeMethods.GetMethod('GetProcAddress')
改为
$GetProcAddress = $UnsafeNativeMethods.GetMethod('GetProcAddress',
[Type[]]@([System.Runtime.InteropServices.HandleRef], [String]))
增加的参数表明了GetProcAddress函数的参数类型。如果GetMethod的目标函数不是GetProcAddress,则根据目标函数的原型调整上述代码即可。
欢迎关注微信公众号【CPP笔记】