Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Bypass Non-Killable Process

By: waliedassar on Feb 12th, 2013  |  syntax: C  |  size: 0.62 KB  |  views: 279  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. //http://waleedassar.blogspot.com
  2. //http://www.twitter.com/waleedassar
  3.  
  4. //Bypass for the non-killable process bug
  5. //ZwSuspendProcess @ange4771 (Ange Albertini)
  6.  
  7. #include "stdafx.h"
  8. #include "windows.h"
  9. #include "stdio.h"
  10.  
  11. #define PROCESS_SUSPEND_RESUME  0x800
  12.  
  13. extern "C"
  14. {
  15.         int __stdcall ZwSuspendProcess(HANDLE);
  16. }
  17.  
  18. void main()
  19. {
  20.         unsigned long pid=0;
  21.         printf("Enter process id ");
  22.         scanf("%d",&pid);
  23.         if(!pid) return;
  24.  
  25.         HANDLE hProcess=OpenProcess(PROCESS_SUSPEND_RESUME,FALSE,pid);
  26.         if(!hProcess) return;
  27.         int ret=ZwSuspendProcess(hProcess);
  28.         printf("Ret is %x\r\n",ret);
  29.         CloseHandle(hProcess);
  30. }
clone this paste RAW Paste Data