When compromised mailboxes attack & Using Microsoft Sentinel to Respond
Business Email Compromise (BEC) isn't fun for the owner of the compromised mailboxes, or the folks on the receiving end of phish sent from those compromised mailboxes. This post is for those in the latter camp, a place I've been on a couple of occasions in my career. In one instance the bad actor got rather ambitious and sent numerous phishing messages to my organization - all were leveraging existing threads in multiple mailboxes, and using at least one of three malicious hyperlinks. Here is how I attacked the problem with Sentinel:
We blocked inbound mail from the source to stop the bleeding, and then went about identifying the messages involved:
let suspectmessages = (
EmailEvents
| where SenderFromDomain contains "sourceofphish.net"
)
| summarize by NetworkMessageId;
EmailUrlInfo
| where NetworkMessageId has_any (suspectmessages)
| summarize by Url
Of course this could also be done in MS 365 Advanced Hunting, but I was SO HAPPY when email data was added to the MS 365 connector into Sentinel. With the above, we are inventorying all of the messages coming from the breached organization, and from that list taking stock of all of the hyperlinks therein. The malicious links stood out like sore thumbs, and we promptly blocked them via endpoint indicators and web filtering.
After seeing what the messages did in a sandbox, and querying DeviceNetworkEvents to make sure nobody hit those indicators, I wanted to focus on who the specific senders were:
let suspectmessages = (
EmailEvents
| where SenderFromDomain contains "sourceofphish.net"
)
| summarize by NetworkMessageId;
let badURLmessages = (
EmailUrlInfo
| where NetworkMessageId has_any (suspectmessages)
| where Url has_any ('evildomain1.com', 'evildomain2.in', 'evildomain3.com')
| summarize by NetworkMessageId);
EmailEvents
| where NetworkMessageId has_any (badURLmessages)
| sort by TimeGenerated desc
I only had a few malicious links so I just populated an array in the "Where url has_any" line. Looking at this in retrospect this could have been made a little smoother, but it got the job done. Now I had a timeline of events and plenty of information to share with the victim company, and indicators to share with our friendly neighborhood ISAC.
Comments
Post a Comment