Friday 15 April 2011

FAKE VIRUS IN C++(HACK/WIN)

So before we get started go download Dev-++. Once its downloaded and set up open it and insert this code:
    #include <cstdlib>
    #include <iostream>
    #include <Windows.h>
    #include <winable.h>
    using namespace std;
   
    int main()
      {
         
                   
      int f = 1;
   
                  BlockInput(true);
                  SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
                  Sleep(100);
                  
                  BlockInput(false);                         
   
           while(f<50)
           {
                      MessageBeep(MB_ICONEXCLAMATION);
                      Sleep(10);
                      f++;
           }  
                  MessageBox(
                  NULL,
                  "An error occurred in sector 5x00",
                  "HAL.DLL",
                  MB_OK);
                  
                  Sleep(1000);
                  
                  MessageBox(
                  NULL,
                  "Windows has detected HAL.DLL has been corrupted. Please re-install HAL.DLL to continue running windows correctly.",
                  "Windows",
                  MB_OK);
                  
                  Sleep(1000);
                  
                    HWND hWin;
                    
        hWin = FindWindow("Shell_TrayWnd",NULL);
        EnableWindow(hWin,false);
        
        ShowWindow(hWin,false);
        
        Sleep(1000);
        
        while(1==1)
        {
        MessageBox(
        NULL,
        "Please reboot your machine to ensure protection from further corruption.",
        "Windows",
        MB_OK);
        Sleep(10000);
      }
      
    }
Once you have done that File>Save, then Execute>Compile. Go to wherever you saved it and there should be a .cpp and .exe file. The .exe is our "Viruse".
HOW THIS WORKS
Now i wont explain in depth this code but i will go over the general idea of programming. First you must have a source code that you wrote (or in this case stole)  now to turn it into a program you must compile it. That is the basic idea of programming in the c language.

8 comments:

  1. wouldnt you need the header files winable.h and Windows.h or are they standard libraries? im a c++ noob

    ReplyDelete
  2. i feel like i need to try this just to see how well i can figure out something i know nothing about lol

    ReplyDelete
  3. That is a lot of stuff that I can't understand

    ReplyDelete
  4. umm yeah you need the header files

    ReplyDelete
  5. umm yeah you need the header files

    ReplyDelete