ARTEX is an open source AI penetration testing framework that was released on GitHub in July 2026. On November 25, 2026, Microsoft Threat Intelligence published What defenders need to know about ARTEX, the agentic AI framework threat actors abuse. The post describes abuse of the framework by state-sponsored and financially motivated threat actors and includes hunting queries for Defender XDR and Sentinel. Each hunting query covers one stage of an attack.

The ARTEX Detect Customizer builds one Sentinel query that correlates five stages on one web server and scores sessions where more than one stage occurs close together. It runs in the browser and sends no data anywhere.

Open the ARTEX Detect Customizer

ARTEX Detect Customizer 3D view

The signal the Microsoft post describes as most durable is timing. After a compromise succeeds, ARTEX sends more agents to the next stage at machine speed. A human operator takes longer between stages. The query uses row_window_session to group events on one host into sessions and adds a weight for each stage seen in the session.

Stage Source options Default weight
WebBurst W3CIISLog, AppServiceHTTPLogs, AGWAccessLogs, AzureDiagnostics 1
ShellBurst DeviceProcessEvents, SecurityEvent 4688, ASIM process parser 3
ScriptDrop DeviceFileEvents, ASIM file parser 2
SecretRead DeviceProcessEvents, SecurityEvent 4688, ASIM process parser 2
Egress DeviceNetworkEvents, ASIM network parser 2

Using the tool:

  1. Choose the log source for each stage. A stage with no source is left out of the query and the score.
  2. Set the thresholds, the session windows (SessionMax and SessionGap), MinScore and the stage weights. Two buttons load the scheduled rule values or broad values for a first hunting pass over seven days.
  3. Use the simulated attack controls to choose which stages the attacker performs and the minutes between them. The 3D view and the table show which session each stage falls into and where the rule fires. These controls are not written to the query.
  4. Press Save. The tool generates the KQL for the selected sources and values. Copy it or download it as a .kql file.

Reading the 3D view: the tower is the victim web server and the red cluster is the agent swarm. Each sphere is a stage, sized by its weight. Distance from the tower is elapsed time, and the blue ring is SessionMax. A dashed red link is a gap longer than SessionGap. Lime rings mark the session that reaches MinScore.

Prerequisites:

  • The tables for the sources you select, collected to the Sentinel workspace.
  • A watchlist with the alias ArtexExcludedHosts, where SearchKey holds the short hostname of each server to exclude. The query fails if the watchlist does not exist. The exclusion can be turned off in the tool.
  • For App Service and Application Gateway logs, an optional ArtexWebHostMap watchlist that maps each site host name to a device name. Those logs carry no device name to correlate on.

Limitations:

  • The generated query has not been validated against production data. Test it in a lab workspace before deploying it.
  • The egress destination list and the secret file patterns are not from the Microsoft post. The post names the categories without listing values. Adjust both lists.
  • The stage weights are a starting point and are not derived from measured data.
  • The query covers the web server path only. The Microsoft post includes separate queries for service principal sign-ins and for application credential changes followed by role assignments.