Beispiel #1
0
        /// <summary>
        /// Program entry point
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            Console.WriteLine("jobCrypter Password Cracker");

            //Require elevated privileges
            if (!isAdmin())
            {
                ProcessStartInfo startInfo = new ProcessStartInfo(AppDomain.CurrentDomain.FriendlyName);
                startInfo.Verb = "runas";
                System.Diagnostics.Process.Start(startInfo);
                Environment.Exit(0);
            }

            Console.WriteLine("[*] Searching for the first encrypted file's timestamp...");

            FileInfo targetPNG = new FileInfo("C:\\ProgramData\\Microsoft\\User Account Pictures\\user.png.css");
            var      timestamp = EncryptedFileFinder.getFirstEncryptedFile(ref targetPNG);

            Console.WriteLine("[+] First encrypted file created at: {0}", timestamp.ToString());

            //Get last reboot time to calculate approximation of Environment.TickCount
            Console.WriteLine("[*] Getting last boot time before encryption...");
            DateTime lastReboot = EncryptedFileFinder.getLastReboot(timestamp);

            if (lastReboot == default(DateTime))
            {
                Console.WriteLine("[!] Proceeding with no knowledge of boot time.");
            }
            else
            {
                Console.WriteLine("[+] Last boot time before encryption: {0}", lastReboot.ToString());
            }

            EncryptedFileFinder.CalculatePassword(args, timestamp, lastReboot, targetPNG);
        }
 /// <summary>
 /// Runs the slice of work, calculating a password and then attempting decryption
 /// </summary>
 public void runSlice()
 {
     for (int i = 0; i < offset; i++)
     {
         string password = passwordFromTickCount(start + i);
         EncryptedFileFinder.Decode_File(filename, password);
     }
 }