mirror of
https://github.com/vxunderground/MalwareSourceCode.git
synced 2024-12-26 13:25:26 +00:00
84 lines
2.8 KiB
C#
84 lines
2.8 KiB
C#
|
// Decompiled with JetBrains decompiler
|
|||
|
// Type: Bmc.Services.Ticket.TicketServer
|
|||
|
// Assembly: ticketservice, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
|||
|
// MVID: 3DFB8186-7053-43AF-8B45-70866071B1F2
|
|||
|
// Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00001-msil\Trojan.Win32.Patched.mf-fd200e64412b6be5c177c3cfa7b94e83e807ff04211ce324f12e2ffa5537eb36.exe
|
|||
|
|
|||
|
using Bmc.Broker.Config;
|
|||
|
using Bmc.Broker.ResourceSystem;
|
|||
|
using Bmc.RegistryAccess;
|
|||
|
using Bmc.RegistryAccess.Ticket;
|
|||
|
using Net.LShift.SPKI;
|
|||
|
using Net.LShift.Utilities;
|
|||
|
using System;
|
|||
|
using System.Collections;
|
|||
|
using System.Net;
|
|||
|
|
|||
|
namespace Bmc.Services.Ticket
|
|||
|
{
|
|||
|
public class TicketServer : MarshalByRefObject, ITicket, ICredentialFactory
|
|||
|
{
|
|||
|
private static TicketServer _instance;
|
|||
|
private static ResourceManager _resourceManager = new ResourceManager(false);
|
|||
|
private WebClient _webClient;
|
|||
|
private SecureStateManager _secureStateManager;
|
|||
|
private TicketManager _ticketManager;
|
|||
|
private ActivationManager _activationManager;
|
|||
|
private Hashtable _running = new Hashtable();
|
|||
|
|
|||
|
public static TicketServer Instance => TicketServer._instance;
|
|||
|
|
|||
|
static TicketServer()
|
|||
|
{
|
|||
|
TicketServer._resourceManager.Init();
|
|||
|
DebugManager.Init(TicketServer._resourceManager);
|
|||
|
}
|
|||
|
|
|||
|
public void Init()
|
|||
|
{
|
|||
|
this._secureStateManager = new SecureStateManager();
|
|||
|
this._activationManager = new ActivationManager(this._secureStateManager, TicketServer._resourceManager, new ResourceManager(true));
|
|||
|
this._ticketManager = new TicketManager(this._webClient, this._activationManager, this._secureStateManager);
|
|||
|
this._secureStateManager.Init();
|
|||
|
}
|
|||
|
|
|||
|
public TicketServer()
|
|||
|
{
|
|||
|
this._webClient = new WebClient(ConfigurationManager.Instance.ProtocolUri, (ICredentialFactory) this);
|
|||
|
this.Init();
|
|||
|
TicketServer._instance = this;
|
|||
|
}
|
|||
|
|
|||
|
public NetworkCredential GetCredential() => new NetworkCredential(this._secureStateManager[(SECURE_FIELD) 0], this._secureStateManager[(SECURE_FIELD) 2], (string) null);
|
|||
|
|
|||
|
public void FetchTicket() => this._ticketManager.FetchTicket();
|
|||
|
|
|||
|
public void WipeState()
|
|||
|
{
|
|||
|
this._secureStateManager.WipeState();
|
|||
|
TicketServer._resourceManager.WipeState();
|
|||
|
this.Init();
|
|||
|
}
|
|||
|
|
|||
|
public SPKISexp GetTicket() => this._activationManager.Ticket;
|
|||
|
|
|||
|
public DateTime GetTime() => this._secureStateManager.RatchetTime;
|
|||
|
|
|||
|
public void RegisterInstance(int port, string auth) => this._running[(object) port] = (object) auth;
|
|||
|
|
|||
|
public void KillAll()
|
|||
|
{
|
|||
|
foreach (DictionaryEntry dictionaryEntry in this._running)
|
|||
|
{
|
|||
|
try
|
|||
|
{
|
|||
|
new LocalWebServer((int) dictionaryEntry.Key, (string) dictionaryEntry.Value).TriggerAction("kill");
|
|||
|
}
|
|||
|
catch (Exception ex)
|
|||
|
{
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|