Entra ID & AiTM Detection · T1550.001 / T1071.001

Spotting Suspicious User-Agents (python-requests, axios, curl) in Entra ID Logs

Direct Answer (Key Forensic Takeaway)

Ordinary Office users authenticate with standard Edge, Chrome, Safari, or Outlook user-agents—whereas AiTM post-exploitation kits, credential sprayers, and mailbox dumpers frequently leave HTTP library strings like python-requests, axios, node-fetch, Go-http-client, curl, Boto3, PostmanRuntime, or legacy Edge/18 spoofs in Entra userAgent and Purview ExtendedProperties.UserAgent. AuditVane rule AV-003 flags all of them automatically.

Detection Objective & Threat Scope

While top-tier red teams carefully clone modern Chrome or Edge User-Agent headers inside custom tooling, real-world cybercrime campaigns operate at scale—relying on mass-produced Node.js, Python, and Go scripts whose default HTTP client headers stick out like beacons in cloud logs.

Hunting programmatic User-Agents across both Entra ID Sign-In logs and Purview `ExtendedProperties.UserAgent` catches everything from Tycoon/Evilginx helper scripts checking stolen tokens to automated IMAP password sprayers.

Where do User-Agent strings hide across Microsoft 365 exports? In Entra Sign-In JSON exports, `userAgent` sits cleanly as a top-level property. In Purview Unified Audit Log CSVs, however, `UserAgent` is buried inside the nested `AuditData.ExtendedProperties` array (`{"Name":"UserAgent","Value":"axios/1.7.7"}`), making it invisible in Excel unless recursively flattened.

AuditVane normalizes both locations automatically and triggers rule `AV-003` (Critical) whenever `python-requests`, `python/`, `axios/`, `node-fetch`, `go-http-client`, `curl/`, `boto3`, `postmanruntime`, `powershell`, or deprecated `Edge/18.`/`MSIE` strings appear.

1. RAW TELEMETRY Entra ID & AiTM Detection T1550.001 / T1071.001 2. CLIENT-SIDE PARSE AuditVane Engine suspicious user agents Entra ID lo 0 Bytes Uploaded 3. SOC OUTCOME Scoped Containment IOCs · CSV · KQL
Local browser DFIR workflow for suspicious user agents Entra ID logs (T1550.001 / T1071.001)
AdSense-Ready In-Article Placement

Forensic Telemetry Fields & High-Signal Indicators

Telemetry Field / Pattern Meaning in M365 / Entra High-Signal Threat Indicator
python-requests / aiohttp / Python/Python HTTP automation librariesSeen in credential sprays & Graph mail scrapers
axios / node-fetchNode.js HTTP clientsCommon in modern JS AiTM & BEC validation bots
Go-http-clientCompiled Go offensive binariesFrequent in distributed password-spray tooling
curl/ / PostmanRuntimeCLI & API test clientsSuspicious on regular employee mailboxes
Boto3 / PowerShellCloud SDK / scripted PowerShell callsCheck whether authorized IT automation or abuse
Edge/18. or MSIE 11Deprecated legacy browser signaturesHardcoded static UA defaults in older kits

Hunt Programmatic User-Agents in Sentinel KQL & Purview PowerShell

// Sentinel KQL across Interactive & Non-Interactive logs:
SigninLogs
| union AADNonInteractiveUserSignInLogs
| where UserAgent has_any ("python","axios","curl","go-http","node-fetch","postman","boto3","edge/18.")
| summarize Hits=count(), IPs=make_set(IPAddress) by UserPrincipalName, UserAgent, AppDisplayName

# PowerShell Purview ExtendedProperties extraction:
Import-Csv .\Purview.csv | ForEach-Object { $ad = $_.AuditData | ConvertFrom-Json; $ua = ($ad.ExtendedProperties | Where-Object Name -eq "UserAgent").Value; if ($ua -match "python|axios|curl|go-http") { "$($ad.CreationTime) | $($ad.UserId) | $ua" } }

Sample Suspicious User-Agent Hunting Output

UserPrincipalName                  UserAgent              IPs
-----------------                  ---------              ---
hr.lead@contoso-demo.invalid       python-requests/2.32.3 ["194.26.135.210"]
hr.lead@contoso-demo.invalid       curl/8.7.1             ["45.155.205.19"]

Expected Corporate User-Agents vs. High-Signal Script Signatures

Actor ProfileNormal Expected UserAgentSuspicious Compromise Signature
Finance / HR / ExecutiveMozilla/5.0 ... Edg/131, Chrome/131, MacOutlookaxios/*, python-requests/*, curl/*, Go-http-client
DevOps / Cloud EngineerAzure CLI, Edge/Chrome, vetted MSGraph scriptsForeign residential proxy IP + python-requests
Automated CI / Backup AppService Principal / Managed Identity (no interactive UPN)Interactive user UPN running Boto3 or PostmanRuntime

Scripted UserAgent Hidden Inside Purview ExtendedProperties

{
  "CreationTime": "2026-12-01T08:12:04Z",
  "Operation": "UserLoggedIn",
  "RecordType": 15,
  "UserId": "finance.director@contoso-demo.invalid",
  "ClientIP": "185.220.101.45:51422",
  "ExtendedProperties": [
    { "Name": "UserAgent", "Value": "axios/1.7.7" },
    { "Name": "RequestType", "Value": "OAuth2:Token" }
  ]
}

In Purview CSVs, axios/1.7.7 sits tucked inside ExtendedProperties[0].Value—which AuditVane promotes cleanly to AuditData.ExtendedProperties.UserAgent and flags immediately as AV-003 Critical.

Real-World Incident Walkthrough

At 08:12 UTC, an attacker tests stolen credentials/tokens captured via phishing against `finance.director@company.com` from `185.220.101.45` using an automated Node.js script emitting `axios/1.7.7`, followed an hour later by a credential spray attempt from `91.214.124.88` emitting `Boto3/1.34 Python/3.11`.

Neither user-agent is normal for a Windows Edge finance user. AuditVane immediately flags both under `AV-003` Critical inside the merged timeline.

Step-by-Step Triage, Containment & Verification

  1. Drop Entra Sign-In JSON and Purview UAL CSV exports into AuditVane and filter by AV-003 Critical findings.
  2. Check the actor UPN: separate vetted IT/DevOps automation accounts running from known build servers from interactive employee mailboxes.
  3. Pivot on the ClientIP and SessionId tied to any flagged UserAgent to trace every accessed mailbox item or SharePoint file.
  4. Revoke user sessions, reset credentials, and add confirmed proxy/VPS IPs to an Entra Named Location block if needed.

How to Verify Containment Completed Cleanly

  • Zero unexpected python/axios/curl/go-http user-agents present on interactive user accounts.
  • Authorized IT scripts migrated off interactive user accounts onto scoped Service Principals or Managed Identities.

Analyst Blind Spots, Licensing Quirks & False Positives

Legitimate security scanners, SIEM connectors, and IT automation scripts running under service accounts can emit `python-requests` or `PowerShell`. Always check whether the UPN is a human user and whether the ClientIP belongs to your corporate datacenter.

Conversely, sophisticated AiTM kits spoof a plausible Windows Chrome/Edge UserAgent—so never rely solely on `AV-003` to declare a clean bill of health; always combine it with IP/ASN (`AV-009`), MFA (`AV-004`), and InboxRule (`AV-001`) checks.

Frequently Asked Questions

Where are User-Agents hidden inside Purview UAL CSV files?

Inside AuditData.ExtendedProperties as an object {Name: "UserAgent", Value: "..."}, which AuditVane flattens automatically.

Why does Edge/18 show up in phishing telemetry?

Older legacy phishing/spray toolkits often ship hardcoded legacy EdgeHTML/IE user-agent strings that stand out against modern Chromium Edge (Edg/120+).

Can attackers spoof a normal Chrome User-Agent?

Yes, which is why AuditVane pairs User-Agent hunting (AV-003) with multi-IP geo-velocity (AV-009) and behavioral rules (AV-001, AV-004, AV-005).

Does AuditVane check both Entra JSON and Purview CSV for User-Agents?

Yes—rule AV-003 evaluates Entra userAgent, Purview ExtendedProperties.UserAgent, and ClientInfoString together.

Related Forensics Guides