Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

procCryptProtectMemory api的调用有问题 #2

Open
breaking153 opened this issue Sep 23, 2022 · 1 comment
Open

procCryptProtectMemory api的调用有问题 #2

breaking153 opened this issue Sep 23, 2022 · 1 comment

Comments

@breaking153
Copy link

CryptProtectMemory这个API调用其实出错了,没有效果
图片
图片

@breaking153
Copy link
Author

图片
发现问题了,加密大小必须为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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant