-
-
未解决
[求助]关于shellcode调用后堆栈崩溃的问题
-
发表于:
2021-3-15 10:07
7281
-
未解决 [求助]关于shellcode调用后堆栈崩溃的问题
最近打算写一个加载shellcode的,但是一运行就堆栈崩了,如下图,尝试了各种方法,汇编调用 申请内存等.凡是shellcode弹窗完就堆栈崩溃了。有大佬成功帮忙解决的 20R 联系我Q 2070002026
插入代码
#include "stdafx.h"
#include <stdlib.h>
#include <windows.h>
int main(){
unsigned char shellcode[] = {
"\xfc\x68\x6a\x0a\x38\x1e\x68\x63\x89\xd1\x4f\x68\x32\x74\x91\x0c\x8b\xf4\x8d\x7e\xf4\x33\xdb\xb7\x04\x2b\xe3\x66\xbb\x33\x32\x53\x68\x75\x73\x65\x72\x54\x33\xd2\x64\x8b\x5a\x30\x8b\x4b\x0c\x8b\x49\x1c\x8b\x09\x8b\x69\x08\xad\x3d\x6a\x0a\x38\x1e\x75\x05\x95\xff\x57\xf8\x95\x60\x8b\x45\x3c\x8b\x4c\x05\x78\x03\xcd\x8b\x59\x20\x03\xdd\x33\xff\x47\x8b\x34\xbb\x03\xf5\x99\x0f\xbe\x06\x3a\xc4\x74\x08\xc1\xca\x07\x03\xd0\x46\xeb\xf1\x3b\x54\x24\x1c\x75\xe4\x8b\x59\x24\x03\xdd\x66\x8b\x3c\x7b\x8b\x59\x1c\x03\xdd\x03\x2c\xbb\x95\x5f\xab\x57\x61\x3d\x6a\x0a\x38\x1e\x75\xa9\x33\xdb\x53\x68\x77\x65\x73\x74\x68\x66\x61\x69\x6c\x8b\xc4\x53\x50\x50\x53\xff\x57\xfc\x53\xff\x57\xf8"
};
PVOID p = NULL;
p = VirtualAlloc(NULL, sizeof(shellcode), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
memcpy(p, shellcode, sizeof(shellcode));
((void(*)())p)();
}
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)