-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Outlook constraint #1
Comments
This is great, thanks! I'll take a look over the next few days. |
No problem, I saw the talk on this in Vail and was interested to see how it worked under the hood, went out and started experimenting before this was released to try and self replicate and came away with these shortcuts. Here is a snippet for sending the response to the reporting user using EWS in case you are interested in that as well. Just create the HTML formatted email. Make sure you reference any pictures in the HTML using their cid, and they have to be added as an inline attachment (see the Send-ThankYou snippet) <img width=220 height=121 style='width:2.2916in;height:1.2604in' id="Picture_x0020_2" src="cid:logo.png" alt="cid:logo.png"> Function to send Thank You E-mail function Send-ThankYou {
Param(
[string]$MailTo,
[Microsoft.Exchange.WebServices.Data.ExchangeService]$Service,
[switch]$Error
)
$email = New-Object Microsoft.Exchange.WebServices.Data.EmailMessage($Service)
$email.Subject = "Thank you for your Phishing submission"
$email.body = Get-Content $scriptPath"\Thank You.html" -Raw
[void]$email.ToRecipients.Add($MailTo)
[void]$email.Attachments.AddFileAttachment("logo.png", $scriptPath+"\logo.png")
$email.Attachments[0].IsInline = $true
$email.Attachments[0].ContentId = "logo.png"
$email.SendAndSaveCopy()
} |
Thanks! I actually have the response aspect of the script configured to use the server, via the O365 phishing report account. I'm looking at adapting your scripts into the next piece, which performs analysis of the email that was submitted. If I can get that figured out, there will be no need to leave Outlook open. :-) |
Hello @gfoss have you had a chance to look into doing everything via EWS API instead of the Outlook client? |
Got a sample here that I was toying with that you can pick apart and use that does the analysis and stuff right in the ps1 and is proxy aware. It does not do any of the LR integration. |
I have not had time to dive into this issue just yet, unfortunately. Appreciate the link to this project though - will have to dive into this and see if I can apply this non-interactive mailbox fix to PIE! |
I believe that I've inadvertently fixed this problem with the following commit: I was solving a separate issue and a side-effect is that you actually have to leave Outlook closed now in order to process mail properly in the background. If you have some time, please test and let me know if the updated code works for you. |
It would be more efficient to use EWS to periodically poll your phishing mailbox and send the reply than to install an Outlook client and leave it open on a server.
The text was updated successfully, but these errors were encountered: