示例#1
0
        private static void GetConfig(Microsoft.Office.Interop.Outlook.NameSpace ns, String mode)
        {
            //Reference:https://github.com/n1nj4sec/pupy/blob/unstable/pupy/modules/outlook.py
            Console.WriteLine("[*] Try to get config");
            Console.WriteLine();
            Object CurrentProfileName = ns.GetType().InvokeMember("CurrentProfileName", System.Reflection.BindingFlags.GetProperty, null, ns, null);

            Console.WriteLine("[*] CurrentProfileName:" + CurrentProfileName.ToString());

            Object ExchangeMailboxServerName = ns.GetType().InvokeMember("ExchangeMailboxServerName", System.Reflection.BindingFlags.GetProperty, null, ns, null);

            Console.WriteLine("[*] ExchangeMailboxServerName:" + ExchangeMailboxServerName.ToString());

            Object ExchangeMailboxServerVersion = ns.GetType().InvokeMember("ExchangeMailboxServerVersion", System.Reflection.BindingFlags.GetProperty, null, ns, null);

            Console.WriteLine("[*] ExchangeMailboxServerVersion:" + ExchangeMailboxServerVersion.ToString());
            if (mode == "all")
            {
                Console.WriteLine("[!] Notice:When the antivirus software is inactive or out-of-date,it will pop up a Outlook security prompt.\r\n");
                Console.WriteLine("[*] Account-DisplayName:" + ns.Accounts[1].DisplayName);
                Console.WriteLine("[*] Account-SmtpAddress:" + ns.Accounts[1].SmtpAddress);
                Console.WriteLine("[*] Account-AutoDiscoverXml:\r\n" + ns.Accounts[1].AutoDiscoverXml);
                Console.WriteLine("[*] Account-AccountType:" + ns.Accounts[1].AccountType);
            }
        }