Detection rules › Kusto

Hunt MSOL Azure AD Connect / Entra Sync servers

Author
Robbe Van den Daele
Source
github.com/HybridBrothers/Hunting-Queries-Detection-Rules

Microsoft announced that starting from April 30 2025, Microsoft Entra Connect will need to have the minimal version of 2.4.18.0. If you want to identitify if you still have an AD Connect or Entra Sync server with a lower version, you can use below KQL query.

References

Rule body yaml

DeviceTvmSoftwareInventory
| where SoftwareVendor == "microsoft"
| where SoftwareName in ("microsoft_entra_connect_sync", "microsoft_azure_ad_connect")
| distinct DeviceName, SoftwareName, SoftwareVendor, SoftwareVersion
| extend MSOnlineDepricationSafe = iff(
    parse_version(SoftwareVersion) < parse_version("2.4.18.0"),
    "No",
    "Yes"
)

Stages and Predicates

Stage 1: source

DeviceTvmSoftwareInventory

Stage 2: where

| where SoftwareVendor == "microsoft"

Stage 3: where

| where SoftwareName in ("microsoft_entra_connect_sync", "microsoft_azure_ad_connect")

Stage 4: distinct

| distinct DeviceName, SoftwareName, SoftwareVendor, SoftwareVersion

Stage 5: extend

| extend MSOnlineDepricationSafe = iff(
    parse_version(SoftwareVersion) < parse_version("2.4.18.0"),
    "No",
    "Yes"
)
MSOnlineDepricationSafe =
if/* macro: (parse_version(SoftwareVersion) < parse_version("2.4.18.0")) */"No"
else"Yes"

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
SoftwareNamein
  • microsoft_azure_ad_connect transforms: cased
  • microsoft_entra_connect_sync transforms: cased
SoftwareVendoreq
  • microsoft transforms: cased

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
MSOnlineDepricationSafeextend