User Profile
JeremyTBradshaw
Steel Contributor
Joined 8 years ago
User Widgets
Recent Discussions
Incidents from Custom Detection Rules never have Emails for Evidence
let ignoreAddresses = datatable(address:string) [@'email address removed for privacy reasons',@'email address removed for privacy reasons']; let ignoreSpamSubjects = datatable(address:string) [@'ignored subject 1',@'ignored subject 2']; // Time range needs to be set in the UI dropdown in order for LatestDeliveryLocation filter to work (i.e., live table vs streaming API). EmailEvents | where SenderFromDomain in~ (_getEXOAcceptedDomains) | where DetectionMethods has_any('URL detonation reputation', 'URL malicious reputation') and not(RecipientEmailAddress in~ (ignoreAddresses) or SenderFromAddress in~ (ignoreAddresses)) | where not (Subject has_any (ignoreSpamSubjects)) | where (parse_json( AuthenticationDetails).DMARC =~ 'Pass' and EmailDirection =~ 'Inbound') or (EmailDirection =~ 'Intra-org') | where (LatestDeliveryLocation in~ ('Quarantine', 'Junk folder') and not (LatestDeliveryAction =~ 'Quarantine release')) and parse_json(ConfidenceLevel).Phish in~ ('Normal','High') | join kind=inner ( EmailUrlInfo | summarize Urls = make_list(Url) by NetworkMessageId ) on NetworkMessageId I've got the above query saved as a detection rule, which works fine except for one thing - the emails are never present in the Evidence tab of the generated incidents. Meanwhile the Recipients show up in the Mailbox and User assets as I'm using Entity mapping to mapping the RecipientEmailAddress / RecipientObjectId to those 2 entity types. The only thing I can find about Emails is that for Actions to be possible on the Emails in the query results - "The columns NetworkMessageId and RecipientEmailAddress must be present in the output results of the query to apply actions to email messages." (ref) - which is being satisfied. The Evidence available is the IP of the sender, and an empty email cluster, like this: In the incident above there are 2 emails, and the 4 assets are the user and mailbox for each of the 2 emails' Recipient. I can successfully just use the query manually to find and manage those emails, but a big part of the goal with these detection rules, at least in my opinion, is to be able to easily manage the evidence. In this exact case, I'm looking for inbound emails coming from our own Accepted Domains in the SenderFromAddress, which pass DMARC, but are in Quarantine, detected as Phish. The idea is to watch out for false positives due to URL detonation reputation since most of the messages fitting this criteria are coming in from various emailing services (e.g., Constant Contact, MailChimp, SendGrid, etc.) and these services tend to end up on the reputation lists a few times per month. Just wondering if there are any tricks anyone knows about to help me populate the emails into my resulting incidents.Bad actors impersonating Microsoft Billing using rogue on-prem. Exchange > M365 tenants
Everyone should be aware and watch out for these very believable spoofs coming from microsoft-noreply_at_microsoft.com. If you have Threat Explorer (Defender Portal > Email & Collaboration > Explorer) or Advanced Hunting (EmailEvents table) available, you can find these messages by looking for these criteria: - Sender From Address:microsoft-noreply_at_microsoft.com (note the@ / _at_ swap) - Sender MailFrom Domain: Not equal to Microsoft.com (will be <something>.onmicrosoft.com) If you're getting these, you'll notice the MailFrom domain is an ever-changing long list of rogue tenants (e.g., <rogueTenant123>.onmicrosoft.com). The MailFrom address will be starting with "bounces+srs", like this "bounces+srs=<12345567890abcxyz>@<rogueTenant123>.onmicrosoft.com", letting us see that these bad actors are using an on-premises Exchange server, SMTP receive Connector and then a Send Connector up to and out via EXO/EOP. These things pass SPF, DKIM, and DMARC and so only get detected via General/Advanced filter and/or Fingerprint Matching (which only means loose match, there's no specific fingerprint/ID involved). The subject seems to always be "Your Microsoft order on September 23, 2024", and will be for the current date. Some people have raised this on Reddit, for example:email address removed for privacy reasons - Suspicious email : r/DefenderATP (reddit.com) I've been working with MS Support to try and get this addressed. We're seeing a lot of these, and so far it's be many many different rogue tenants, so it seems like the bad actors are working overtime and successfully standing up tenant after tenant to get these things out successfully.1.3KViews0likes1CommentHow to KQL query *live* EmailEvents table and NOT the streaming API
EmailEvents table in the advanced hunting schema - Microsoft Defender XDR | Microsoft Learn- this page tells us: Note * The LatestDeliveryLocation and LatestDeliveryAction columns are not available in the Streaming API. I've found that a lot of my queries come back with blank LatestDeliveryLocation. This means I'm searching via the streaming API. But I don't want to do that, I want to search the live EmailEvents table and even want to filter based on LatestDeliveryLocation. I am working in Defender portal, within the Advanced Hunting section. Example query: // Works (time range set in UI dropdown): EmailEvents | where LatestDeliveryLocation in~ ('Quarantine', 'Junk folder') and DeliveryLocation =~ 'Inbox/folder' // Does NOT work: EmailEvents | where TimeGenerated >= ago(1d) | where LatestDeliveryLocation in~ ('Quarantine', 'Junk folder') and DeliveryLocation =~ 'Inbox/folder' So it seems as though if your query sets the time range, you're searching the streaming API. Can anyone please confirm I have this understood correctly? My next question would be, can I add something else to my query to ensure I'll be searching the live table? Microsoft 365 Defender Streaming API: Identity and CloudApp Events in General Availability - Microsoft Community Hub- I asked this in the comments over there too.Solved283Views0likes1CommentCDX - Terms Of Use Last Updated - March 12, 2024
I'm not a big fan of these 2 limitations in the terms of use: CDX tenants have an administrative user that should not be deleted or altered in any way. External domains are not to be connected to CDX tenants. For the 1st, I want to set my own password on the admin@ account. What's so wrong with that? You could reset it if you really need/want to get in there. This is not fair. For the 2nd, of course we want to test with custom domains! This is again no fair. The other thing - I've already added my custom domain in my VSE Azure Subscription which I've associated to my CDX tenant directory. In there, I'm testing out SMTP as a Service via Azure Communication Services. Again, of course I want to use my own custom domain, with DKIM, DMARC, SPF, etc. This is completely reasonable. Today I login to CDX to see if my ability to request renewal of my renewable tenant is available yet, and I can't even get in without accepting the new terms. But it says: " Violations of the CDX Terms of Use will result in the immediate deprecation of tenants as well as access to CDX without notice. By proceeding, you agree to the Microsoft Platform policies Accept and Continue " So I guess I have to go dismantle my stuff gracefully before I accept the terms. I had reset the password long ago on Admin, just knowing that-that particular term is ridiculous, but previously I don't recall the prohibition of custom domains. I really don't see what the problem is. Please can we take away these 2 points in the terms?SolvedRepost: Important Announcement: Deprecation of Search-AdminAuditLog and New-AdminAuditLogSearch cmdl
In case you get your Exchange blog posts from the Exchange Team's EHLO blog, you may have missed this doozy: Important Announcement: Deprecation of Search-AdminAuditLog and New-AdminAuditLogSearch cmdlets - Microsoft Community Hub It has been posted in the Security, Compliance and Identity blog instead.267Views0likes0CommentsWhy does Windows NOT tell me *which* account needs to be "Fix now"?
I find it troubling that we have to click "Fix now" and watch windows cycle through all of our various added accounts to figure out which one has a problem that needs the "Fix now" button treatment. Does anyone know - is there any way to just cut to the chase and see what account it is that has the supposed problems? Years and years of this, I have no idea, but the internet is filthy with unrelated search results.704Views0likes2CommentsLooking for Subject and InternetMessageHeaders from messages (neither part of EmailEvents)
I'm successfully doing queries with Start-MgSecurityHuntingQuery to find messages which are from a particular sender domain, and which have failed DMARC. I would like to get these messages' Subject and InternetMessageHeaders. I can't seem to find a Delegated permission way to get this done other than Mail.ReadBasic.Shared with FullAccess permission also granted. Same could be done with Mail.Read and FullAccess, but I'm trying to avoid FullAccess, and I would like to do this with Delegated permissions. Seems like some kind of Mail.ReadBasic.All but for delegated would be perfect, but don't see anything available. Is anyone aware of a delegated permissions approach to getting the message subject and message headers? If EmailEvents table would just get Subject and InternetMessageHeaders added, that would be fantastic. Barring that, Mail.ReadBasic.Shared and some new AccessRight that I can add via Add-MailboxPermission could be another option. Or just a flavor of Mail.ReadBasic.All that magically works with delegated. When I use Defender's Threat Explorer, it seems like all this stuff is possible (minus message headers, which can be retrieved from the email's entity page.441Views0likes1CommentAnti-Phishing > Impersonation Insights inaccuracy
Working with a client who are piloting Standard Preset Policies. We have not added any Users to Protect. We have added "owned domains" to the Domains to Protect list. No other anti-phish policies in the tenant have any users listed in Users to Protect. I repeat, zero policies have any users listed in Users to Protect, none, zero. In Impersonation Insights (https://security.microsoft.com > Email & Collaboration > Threat Policies > Anti-Phishing > Impersonation Insights, we have 2 listed in the "Users" tab: And in the details pane for either message, we see this: I can't find anywhere in documentation that explains why this would happen. It seems as though our user is being treated as a "Protected User", yet we've not added this user to any Anti-Phish policy's "Users to Protect" list. We DO have mailbox and impersonation intelligence enabled on the policies. When I read up on Mailbox Impersonation setting,I see this note: The question I have is this - when Mailbox Intelligence identity's a message as impersonation, and when the impersonated user is NOT a protected user, is this enough to trick Impersonation Insight into pretending as though the impersonated user is aProtected User?484Views0likes0CommentsURL Detonation Reputation - How do you like it?
I personally have found this detection technology to be a huge pain in the buttocks. To me, this feature doesn't really look at specific threats or risks, it just says "You cannot do anything that involves this domain name". And with that analogy, "involves" translates to any of the following: Domain is in the subject or body One of the included recipient addresses to which the message is addressed uses the domain. One of the recipients who show in the body of the email due to it being a conversation/thread, uses that domain in their address. An attachment includes that domain within its text (PDF, Word, Excel, TXT, all personally observed by me). These things get blocked as "High confidence phish". To me, they are not that whatsoever, until the message itself is doing some of the "phish" verb. This feels like an overstep on the verdict and I'd prefer they come up with a new name for the detection type, as well as a new drop down box for us to choose between MoveToJunk or Quarantine. Most times I've observed this feature "saving" clients, it's a pain in the butt for the client. I will point out the one improvement I've seen since I started belly-aching over this - it is that Microsoft now puts the bad URL/domain from within the attachments, into the list of URLs in the email entity page within M365 Defender portal. So there is at least that there now, which adds the improvement of not having to go through MS Support to find out what is the supposed bad-rep URL. Would like to know if anyone else finds this feature as a pain for the most part, and hear any other suggestions, or just confirmations about my suggestion (new category of detection so we don't have to treat these things like (HC)phish).SolvedDisable-Mailbox -Archive in EXO with M365 Retention Policies assigned
Hello, working with a client that has 3 M365 retention policies assigned org-wide: 1. For All EXO mailboxes and all SPO/OneDrive's 2. For Teams Chats - all users/Teams 3. For Teams everything else - all users/Teams I'm unable to exclude a mailbox from #2 or #3 via Set-RetentionCompliancePolicy -AddExchangeLocationException, due to error TL;DR: this policy controls teams and Exchange settings are not allowed to be changed. I'm unable to do Disable-Mailbox -Archive, as the error tells me about the Teams policy #3 above being assigned (which indeed shows up in Get-OrganizationConfig). User's InPlaceHolds properly shows -mbx<guidOfPolicy#1Above>, and DelayHoldApplied/DelayReleaseHoldApplied both set to False. I'm unable to do Set-Mailbox -ExcludeFromAllOrgHolds, because that is only allowed on Inactive Mailboxes. Same goes for Set-Mailbox -ExcludeFromOrgHolds. My use case - UserMailbox which was enabled with an online Archive is now converted to a SharedMailbox, only requires <50GB, and no Archive. Archive is not even allowed per the EXO Service Descriptions for an un-licensed SharedMailbox. I find no way to drop the Archive mailbox successfully. This is fine, except the hypothetical scenario where the users of this SharedMailbox start to place items into the Archive, and then Microsoft invents something which takes away Archive mailboxes from un-licensed accounts. Not sure if that will ever happen, but I see no way to get this done and be on the right side of the license terms. Any ideas?
Groups
Recent Blog Articles
Re: Announcing OAuth 2.0 Client Credentials Flow support for POP and IMAP protocols in Exchange Onli
FYI, I received confirmation from MS Support case that we can indeed safely assume that only the mailboxes which have granted FullAccess/Send-As will be accessible to these application permission ver...1like0CommentsRe: Announcing OAuth 2.0 Client Credentials Flow support for POP and IMAP protocols in Exchange Onli
ThanksViliusSand yes indeed in this case I'm focused on the EXO API and not MS Graph. It's for an application ("SAP Build Process Automation"). Good to know the answer is what I wanted. Would be...0likes0Comments