Lab Verified: 2026-10-18
ConnectWise Hunt Query
The attack vector weaponized multi-tenant OAuth application credentials, allowing threat actors to request app-only Entra ID access tokens that bypassed user MFA and passwords to access Exchange, Teams, SharePoint, and Microsoft Graph APIs.
// Query 1: Hunt for Service Principal Sign-Ins from Adversary C2 IP
let maliciousIP = "144.172.64.128";
let compromisedAppIDs = dynamic([
"506e08f9-6e9a-4da4-942b-a099a03644ae",
"2399d300-6fca-4e6a-a686-399fefe75b83",
"24205314-2b89-4e07-a2a4-579e898a5640",
"b78f6a77-d4e5-46fb-87e5-d1648bd02519",
"0de14c77-b9b0-4137-9360-34878a929827",
"412dcf96-176d-4b3a-a1b0-4981ad66971e",
"b2b55f5b-7758-4719-8d8f-88ae172e6bdb"
]);
AADServicePrincipalSignInLogs
| where TimeGenerated >= datetime(2026-10-13 00:00:00Z)
| where IPAddress == maliciousIP or AppId in (compromisedAppIDs)
| project
TimeGenerated,
IPAddress,
AppId,
ServicePrincipalName,
ServicePrincipalId,
ResourceDisplayName,
ResultType,
ResultDescription,
LocationDetails
| order by TimeGenerated desc
// Query 2: Correlate Sign-ins with Credential Additions in Entra AuditLogs
AuditLogs
| where TimeGenerated >= datetime(2026-10-13 00:00:00Z)
| where OperationName in ("Add service principal credentials", "Add application credentials", "Add member to role")
| extend InitiatingApp = tostring(InitiatedBy.app.displayName),
InitiatingIP = tostring(InitiatedBy.app.servicePrincipalId),
TargetApp = tostring(TargetResources[0].displayName)
| project
TimeGenerated,
OperationName,
InitiatingApp,
InitiatingIP,
TargetApp,
Result,
AdditionalDetails
| order by TimeGenerated descNeed to defang indicators or test triage logs?
Use our zero-telemetry client-side parser to extract, defang & format indicators.
Target Log Sources & Tables
DeviceProcessEvents
Ensure telemetry connector is actively ingesting this table into your Sentinel workspace or Defender XDR.
False Positives & Tuning Guidance
Legitimate administrative software deployment scripts, authorized security testing, or system maintenance tasks.
Source Incident Analysis
ConnectWise: How to Detect & Remediate M365 Tenant Hijacking
Disclosed: 2026-10-18
DETECTION_ENGINEERING_FEEDBACK
Submit Feedback →Have tuning recommendations, encounter false positives in your environment, or want to contribute rule improvements?