Elastic medium stable kql
PowerShell Mailbox Collection Script
Detects PowerShell script block content that indicates programmatic mailbox access using Outlook Interop/MAPI or EWS APIs. Adversaries can use mailbox access to collect email content and attachments for exfiltration.
Detection Logic
event.category:process and host.os.type:windows and
(
(
powershell.file.script_block_text : (
"Microsoft.Office.Interop.Outlook" or
"Interop.Outlook.olDefaultFolders" or
"olFolderInBox" or
"Outlook.Application"
) and powershell.file.script_block_text : ("MAPI" or "GetDefaultFolder" or "GetNamespace" or "Session" or "GetSharedDefaultFolder")
) or
(
powershell.file.script_block_text : (
"Microsoft.Exchange.WebServices.Data.Folder" or
"Microsoft.Exchange.WebServices.Data.FileAttachment" or
"Microsoft.Exchange.WebServices.Data.ExchangeService"
) and
powershell.file.script_block_text : ("FindItems" or "Bind" or "WellKnownFolderName" or "FolderId" or "ItemView" or "PropertySet" or "SearchFilter" or "Attachments")
)
) Field Validations
Loading…
Comments (0)
Loading comments...