GoBypassAV
GoBypassAV copied to clipboard
procCryptProtectMemory api的调用有问题
CryptProtectMemory这个API调用其实出错了,没有效果

发现问题了,加密大小必须为16的倍数,修改后的代码:
shellcode, _ := hex.DecodeString(scxor)
var BlockNum = len(shellcode) / 16
if len(shellcode)%16 != 0 {
BlockNum += 1
}
_, _, err = procCryptProtectMemory.Call(uintptr(unsafe.Pointer(&shellcode)), uintptr(BlockNum*16), uintptr(0x00))