Detection rules › Panther

Panther rules: defender

Defender Detection Passthrough

#

This is a third-party alert feed, not a detection over modeled telemetry. Another security product raised the finding; this rule forwards or reshapes it into the SIEM. It is searchable for reference but is excluded from the detection-rule browse and the ATT&CK coverage matrix.

Severity
medium
Group by
properties.AlertId
Log types
MicrosoftDefenderXDR.AdvancedHunting
Tags
Defender
Reference
learn.microsoft.com
Source
github.com/panther-labs/panther-analysis

Microsoft Defender has detected malicious activity. This activty could be on a host or on a connected platform such as Azure, Microsoft 365, or Intune.

Detection logic

ALERT_URL = ""


def rule(event):
    # Alert on any AlertInfo event
    return event.get("category") == "AdvancedHunting-AlertInfo"


def title(event):
    # Simple title with the native Defender alert title
    return f"Defender Alert: [{event.deep_get('properties', 'Title', default='Unknown')}]"


def alert_context(event):

    # pylint: disable=global-statement
    global ALERT_URL

    # Use the AlertId and tenantId to generate a URL to the alert in the Microsoft 365 Security
    # Center. The tenant ID is not completely necessary, but is helpful if a user is a member
    # of multiple tenants
    alert_id = event.deep_get("properties", "AlertId", default="Unknown")
    tenant_id = event.deep_get("tenantId", default="Unknown")
    if alert_id != "Unknown" and tenant_id != "Unknown":
        ALERT_URL = f"https://security.microsoft.com/alerts/{alert_id}?tid={tenant_id}"
    else:
        ALERT_URL = ""

    return {
        "AlertId": alert_id,
        "Name": event.deep_get("properties", "Title", default="Unknown"),
        "Severity": event.deep_get("properties", "Severity", default="Unknown"),
        "Source": event.deep_get("properties", "DetectionSource", default="Unknown"),
        "ATT&CK Techniques": event.deep_get("properties", "AttackTechniques", default="Unknown"),
        "Alert URL": ALERT_URL,
    }


def reference(_):

    # If the alert ID is not found, return the Microsoft Defender documentation for the
    # AlertInfo table.
    if ALERT_URL:
        return ALERT_URL

    return "https://learn.microsoft.com/en-us/defender-xdr/advanced-hunting-alertinfo-table"


def severity(event):
    return event.deep_get("properties", "Severity", default="MEDIUM")


def dedup(event):
    return f"{event.deep_get('properties', 'AlertId', default='Unknown')} "

Rule specification

AnalysisType: rule
Filename: defender_detection_passthrough.py
RuleID: "Defender.Detection.passthrough"
DisplayName: "Defender Detection Passthrough"
Enabled: true
LogTypes:
    - MicrosoftDefenderXDR.AdvancedHunting
Tags:
    - Defender
Severity: Medium
Description: Microsoft Defender has detected malicious activity. This activty could be on a host or on a connected platform such as Azure, Microsoft 365, or Intune.
DedupPeriodMinutes: 60
Threshold: 1
Runbook: .
Reference: https://learn.microsoft.com/en-us/defender-xdr/advanced-hunting-alertinfo-table

Stages and Predicates

Fires on MicrosoftDefenderXDR.AdvancedHunting events when the condition below holds.

Condition

  • category is AdvancedHunting-AlertInfo

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
categoryeq
  • AdvancedHunting-AlertInfo
field:"category" kind:eq value:"AdvancedHunting-AlertInfo"

Output fields

Fields the rule emits when it matches, drawn from the rule's alert_context.

FieldSource
AlertIdproperties.AlertId
Nameproperties.Title
Severityproperties.Severity
Sourceproperties.DetectionSource
ATT&CK Techniquesproperties.AttackTechniques

Response runbook

.

Worked example

A sample event from the rule's unit tests that triggers a match.

Sample Test Event
{
  "Tenant": "DefaultTenant",
  "_TimeReceivedBySvc": "2025-04-11 21:07:42.726000000",
  "category": "AdvancedHunting-AlertInfo",
  "operationName": "Publish",
  "properties": {
    "AlertId": "0000000000-1111-2222-3333-444444444444",
    "AttackTechniques": "[\"System Binary Proxy Execution (T1218)\",\"Regsvr32 (T1218.010)\",\"Rundll32 (T1218.011)\"]",
    "Category": "DefenseEvasion",
    "DetectionSource": "Scheduled Alerts",
    "ServiceSource": "Microsoft Sentinel",
    "Severity": "High",
    "Timestamp": "2025-04-21 20:51:04.058183200",
    "Title": "Regsvr32 Rundll32 Image Loads Abnormal Extension"
  },
  "tenantId": "55555555-6666-7777-8888-999999999999",
  "time": "2025-04-11 21:07:42.781656600"
}