fork download
  1. #include <Windows.h>
  2. #include <stdio.h>
  3.  
  4. unsigned char shellcode[] = "\x8B\xDC"
  5. "\x68\x63\x6D\x64\x20"
  6. "\x8B\xC4"
  7. "\x6A\x01"
  8. "\x50"
  9. "\xB8\x41\x2C\x9A\x77"
  10. "\xFF\xD0"
  11. "\x8B\xE3";
  12.  
  13. void main()
  14. {
  15. unsigned long KernelAddr;
  16. unsigned long WinExecAddr;
  17. DWORD oldProtect;
  18.  
  19. KernelAddr = (unsigned long)GetModuleHandle(TEXT("Kernel32"));
  20. WinExecAddr = (unsigned long)GetProcAddress((HMODULE)KernelAddr, "WinExec");
  21.  
  22. printf("WinExec is at 0x%08p\n", WinExecAddr);
  23.  
  24. VirtualProtect(shellcode, sizeof(shellcode), PAGE_EXECUTE_READ, &oldProtect);
  25. __asm
  26. {
  27. lea eax, shellcode
  28. jmp eax
  29. }
  30.  
  31. /*__asm
  32. {
  33. mov ebx, esp
  34. push 20646D63h
  35. mov eax, esp
  36. push 1
  37. push eax
  38. mov eax, 779A2C41h
  39. call eax
  40. mov esp, ebx
  41. }*/
  42. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:1:21: fatal error: Windows.h: No such file or directory
compilation terminated.
stdout
Standard output is empty