Exemple #1
0
        public NuagesC2Implant(Dictionary <string, string> config, NuagesC2Connector connector)
        {
            this.jobs = new JArray();

            this.config = config;

            this.connector = connector;

            try
            {
                this.hostname = Dns.GetHostName();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                this.hostname = "";
            }

            try
            {
                this.localIp = GetLocalIPv4();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                this.localIp = "";
            }
            try
            {
                this.username = Environment.UserName;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                this.username = "";
            }

            this.os = "windows";

            this.connectionString = connector.getConnectionString();

            this.supportedPayloads = new string[5];

            this.supportedPayloads[0] = "Command";

            this.supportedPayloads[1] = "Exit";

            this.supportedPayloads[2] = "Download";

            this.supportedPayloads[3] = "Upload";

            this.supportedPayloads[4] = "Configure";

            this.handler = connector.getHandler();

            this.options = new Dictionary <string, string>();
        }
Exemple #2
0
        public NuagesC2Implant(Dictionary <string, string> config, NuagesC2Connector connector)
        {
            this.jobs = new JsonArray();

            this.config = config;

            this.connector = connector;

            this.assemblies = new Dictionary <string, Assembly>();


            try
            {
                this.hostname = Dns.GetHostName();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                this.hostname = "";
            }

            try
            {
                this.localIp = GetLocalIPv4();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                this.localIp = "";
            }
            try
            {
                this.username = Environment.UserName;
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                this.username = "";
            }

            this.os = "windows";

            this.type = "SharpImplant";

            this.connectionString = connector.getConnectionString();

            this.supportedPayloads = new string[10];

            this.supportedPayloads[0] = "command";

            this.supportedPayloads[1] = "exit";

            this.supportedPayloads[2] = "download";

            this.supportedPayloads[3] = "upload";

            this.supportedPayloads[4] = "configure";

            this.supportedPayloads[5] = "cd";

            this.supportedPayloads[6] = "posh_in_mem";

            this.supportedPayloads[7] = "reflected_assembly";

            this.supportedPayloads[8] = "socks";

            this.supportedPayloads[9] = "tcp_fwd";

            this.handler = connector.getHandler();
        }