T1588.007

Artificial Intelligence

Adversaries may obtain access to generative artificial intelligence tools, such as large language models (LLMs), to aid various techniques during targeting. These tools may be used to inform, bolster, and enable a variety of malicious tasks, including conducting Reconnaissance, creating basic scripts, assisting social engineering, and developing payloads. By utilizing publicly available LLMs, adversaries effectively outsource or automate attack preparation tasks — drafting multilingual phishing content, accelerating vulnerability research, generating or refining malicious scripts, and producing AI-generated media (text, audio, images, video) for fraud and impersonation. Detection of this pre-compromise technique is challenging because AI tool access typically occurs on adversary-controlled infrastructure. Detectable signals pivot to: programmatic (non-browser) AI API access from corporate endpoints indicating possible insider threat or compromised workstation; large data uploads to AI services suggesting sensitive data exfiltration via prompt injection; and downstream behavioral indicators of AI-assisted tooling (unusually well-formed payloads, high-quality phishing lures, novel script obfuscation patterns).

Microsoft Sentinel / Defender
kusto
let AIServiceDomains = dynamic([
    "api.openai.com",
    "api.anthropic.com",
    "generativelanguage.googleapis.com",
    "api.cohere.ai",
    "api-inference.huggingface.co",
    "api.mistral.ai",
    "api.together.xyz",
    "api.groq.com",
    "api.perplexity.ai",
    "api.replicate.com",
    "api.ai21.com",
    "api.stability.ai",
    "inference.azure.com"
]);
let SuspiciousInitiators = dynamic([
    "python.exe", "python3.exe", "python3",
    "powershell.exe", "pwsh.exe",
    "cmd.exe", "wscript.exe", "cscript.exe",
    "curl.exe", "wget.exe",
    "node.exe", "node",
    "mshta.exe", "regsvr32.exe", "rundll32.exe",
    "wmic.exe", "msbuild.exe"
]);
DeviceNetworkEvents
| where Timestamp > ago(24h)
| where RemoteUrl has_any (AIServiceDomains)
      or RemoteIP !startswith "10." and RemoteIP !startswith "172." and RemoteIP !startswith "192.168."
         and (RemoteUrl contains "openai" or RemoteUrl contains "anthropic" or RemoteUrl contains "huggingface"
              or RemoteUrl contains "mistral" or RemoteUrl contains "cohere" or RemoteUrl contains "groq"
              or RemoteUrl contains "perplexity" or RemoteUrl contains "replicate")
| where InitiatingProcessFileName has_any (SuspiciousInitiators)
| extend IsScriptProcess = InitiatingProcessFileName has_any ("python.exe", "python3.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe")
| extend IsLOLBin = InitiatingProcessFileName has_any ("mshta.exe", "regsvr32.exe", "rundll32.exe", "wmic.exe", "msbuild.exe")
| extend IsCurlWget = InitiatingProcessFileName has_any ("curl.exe", "wget.exe")
| extend SuspicionScore = toint(IsScriptProcess) + toint(IsLOLBin) * 2 + toint(IsCurlWget)
| project Timestamp, DeviceName, AccountName,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          InitiatingProcessParentFileName,
          RemoteUrl, RemoteIP, RemotePort,
          IsScriptProcess, IsLOLBin, IsCurlWget, SuspicionScore
| sort by SuspicionScore desc, Timestamp desc
medium severity medium confidence

Data Sources

Network Traffic: Network Connection Creation Microsoft Defender for Endpoint Process: Process Creation

Required Tables

DeviceNetworkEvents DeviceProcessEvents

False Positives

  • Software developers and data scientists running Python/Node.js scripts that legitimately call AI APIs for authorized product features or research
  • Corporate AI chatbot integrations (Teams bots, helpdesk automation, CI/CD pipelines) that make programmatic API calls from internal servers
  • Security tooling using AI APIs for threat intelligence enrichment or automated triage
  • IT automation scripts (PowerShell DSC, Ansible-driven scripts) that invoke AI APIs for summarization or classification tasks
  • Developer workstations running local AI model inference tools (Ollama, LM Studio) that proxy to cloud APIs for model pulling

Unlock Pro Content

Get the full detection package for T1588.007 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections