Query Details
// Detect Black Basta Ransomware Campaign // Social Engineering Attack via Teams // https://www.rapid7.com/blog/post/2024/12/04/black-basta-ransomware-campaign-drops-zbot-darkgate-and-custom-malware/ // Exclude Corporate Sharepoint let CorporateSharepoint = "xxx.sharepoint.com"; CloudAppEvents | where Application == @"Microsoft Teams" | where ActionType == @"MessageSent" | where AccountId contains "@" | where parse_json(RawEventData)["CommunicationType"] == 'OneOnOne' | where isnotempty(parse_json(RawEventData)["MessageURLs"]) | where (parse_json(RawEventData)["MessageURLs"]) contains ".sharepoint.com" // External Teams Tenant sending a sharepoint link to download RMM tools to evade detections | where (parse_json(RawEventData)["MessageURLs"]) !contains CorporateSharepoint
This query is designed to detect potential social engineering attacks related to the Black Basta ransomware campaign, specifically targeting Microsoft Teams communications. Here's a simplified breakdown of what the query does:
Data Source: It analyzes events from Microsoft Teams, focusing on messages sent within the platform.
Filter Criteria:
Suspicious Activity Detection:
Purpose:
Overall, the query is designed to flag potentially malicious messages in Teams that could be part of a broader ransomware campaign, while excluding legitimate corporate communications.

Steven Lim
Released: December 9, 2024
Tables
Keywords
Operators