Disclaimer. This is an educational article. The demo runs on synthetic data only, contains no attack tooling, and is not affiliated with or endorsed by Microsoft or ConvAI Innovations. Facts about ARTEX come from Microsoft Threat Intelligence's write-up "What defenders need to know about ARTEX" (Microsoft Security Blog, 25 November 2026). Do not download ARTEX forks to "try them out": some have been reported as backdoored, and running it against systems you do not own or have written permission to test is illegal.
Part 1: What is ARTEX?
ARTEX is an open-source AI penetration-testing framework: a team of AI agents that can take an attack from reconnaissance to privileged access with little or no human involvement. For the full background, read Microsoft's write-up: What defenders need to know about ARTEX.
How it is built
ARTEX is a Go backend that coordinates several large language model (LLM) agents, with a web UI and a PostgreSQL database. The agents divide the work like a small team:
- Goals model. Breaks the operator's scope into objectives that can be checked.
- Planner agent. Reads a knowledge graph of everything discovered so far (hosts, accounts, secrets, weaknesses) and issues short instructions called intents.
- Worker agents. Pick up intents and carry them out with a real shell and ordinary tools: nmap, curl, dig, Playwright with a headless browser, python, git, and whatever the operator adds (password sprayers, sqlmap, Metasploit and so on). They write new assets and confirmed findings back into the graph.
- The loop. Every write to the graph wakes the planner, which decides the next step. This repeats until the goals are met or a time or step limit is reached.
- Reporter agent. Writes up each confirmed finding with reproduction steps.
It can run on any LLM, including open-weight models and models with their guardrails removed. It can also switch automatically to another model or API key when one runs out of quota or gets rate-limited, so a campaign does not stop.
Why it matters
Microsoft's key point is that ARTEX brings no new attack technique. Everything it does (scanning, password spraying, reusing credentials, reading cloud secrets) is well known. What changes is the speed and persistence:
- In one Storm-0940 campaign Microsoft counted more than 151,000 failed sign-ins, peaking at about 2,900 failures a minute.
- In one case an agent went from searching GitHub for client secrets to taking data from Azure Key Vault in five minutes.
- Microsoft also reports intrusions reaching privileged access less than three hours after first targeting, including an application that was given new credentials and then assigned itself Global Administrator.
- After containment, the agents simply try again through a new path.
A human analyst working a ticket queue cannot match that pace. That is the real problem ARTEX creates for defenders.
Part 2: How to prevent ARTEX-style attacks
None of this is exotic. The same controls that stop a careful human attacker stop an agent, but gaps that used to take an attacker days to find now get found in minutes. Work through them in this order.
Step 1: Close the front door (identities)
- MFA for every account, with no exclusions. Shared, service and "reporting" accounts excluded from MFA are exactly what a password spray finds first. Use phishing-resistant MFA for admins.
- Block legacy authentication, which cannot do MFA.
- Ban weak passwords (Entra Password Protection with a custom banned list) and review smart lockout settings.
- Use risk-based Conditional Access so sign-ins from known attacker infrastructure or with leaked credentials are blocked or challenged.
Step 2: Protect app identities and secrets
- Turn on secret scanning and push protection in your code repositories, so client secrets never reach Git in the first place.
- Prefer managed identities over client secrets wherever you can, so there is nothing to leak.
- Treat every exposed secret as compromised. Replace it, including ones in
.envfiles. - Restrict who can register apps and grant consent, and alert on new credentials being added to an app.
- Use PIM (Privileged Identity Management) so admin roles are time-bound and need approval. An app that assigns itself Global Administrator with no ticket should be impossible, or at least loud.
Step 3: Shrink what a stolen identity can reach
- Least-privilege access to Key Vault and storage. An integration that needs one secret should not be able to read every vault.
- Scope managed identities so a token stolen from one workload cannot reach other resources.
- Map attack paths to your critical assets and cut the shortest ones first.
Step 4: Detect the behaviour, not the signature
User agents and tool names are weak evidence because attackers change them. (ARTEX has used values such as artex-enrich/* and norma/*, but they change often.) Microsoft's more durable signals are behavioural:
- Bursts of machine-speed, varied requests from one source, repeated at intervals.
- The same technique retried quickly, and a jump to the next stage right after a success.
- Error-code patterns. For example, a burst of Entra errors 7000215 or 7000222 (invalid or expired client secret) followed by a successful sign-in from the same address.
- Credential and role changes close together, such as a new app secret and a role assignment within the same hour.
- On servers: web server processes starting shells, short-lived web shells with incrementing names, rapid reads of
.envfiles, private keys and cloud credential files.
Step 5: Use deception
This is the mitigation Microsoft highlights most. An agent cannot tell a real win from a fake one, so give it attractive but worthless targets:
- Honeytokens: fake credentials and secrets that raise a high-confidence alert the moment anyone uses them.
- Decoys and honeypots: fake assets that pull the agent away from real ones.
- Tarpits: slow responses that burn the attacker's time and model budget.
- Fake wins: convincing signals that the objective is done, so the agent stops.
Microsoft reports that these reduced attack traffic reaching real assets and produced alerts that are easy to trust.
Step 6: Respond at machine speed, with guardrails
Even with all of the above, something will get through, and the gap between first foothold and Global Administrator can be minutes. The response therefore has to be partly automated. Automation you cannot audit is its own risk, so the safe pattern is:
- Code gathers the evidence (counts, error codes, event IDs). The AI never invents evidence.
- The AI picks from a closed list of actions: block an address, disable an account, isolate an app, monitor, or do nothing. It cannot improvise.
- Every decision must cite real log events, and taking access away needs at least one strong signal.
- Reversible actions run automatically. Irreversible or high-impact ones wait for a person. Blocking an attacker's hosting address can happen in two seconds; blocking your own office network cannot happen without a human.
That pattern is exactly what the demo below shows.
Part 3: Run the demo step by step
layaVsArtex runs ARTEX's own loop (goal → planner → workers → knowledge graph) for the defender, entirely in your browser. The decision model is Laya, a 421M typed-decision encoder built by ConvAI Innovations. A small LLM (Qwen2.5 1.5B) acts as a second opinion. The attacker is a scripted replay of synthetic logs, not real tooling.
Step 1: Open the page
Go to https://vishalmysore.github.io/layaVsArtex/ in Chrome or Edge (WebGPU makes it faster, but it is not required).
The six boxes at the top are the loop: goal, planner, workers, Laya, gate and validator, then back to the graph.
Step 2: Choose how to run the model
You have two options:
- No download: just press Play. The page replays answers recorded from the same model, and the pill at top right reads "Laya: recorded".
- Live: click Load System 1. About 280 MB downloads once and is cached by your browser; the pill turns green and reads "Laya live". Leave System 2 unloaded unless you have a fast GPU, since it is 1.6 GB and takes 12 to 35 seconds per answer. Its recorded answers are used automatically.
Keep the defaults: speed Normal, gate τ = 0.30, analyst answers in 30 min, System 2 for held decisions ticked.
Step 3: Replay the password-spray attack
Click Password spray to Global Administrator, then ▶ Play. Watch three places:
- The clocks. The attacker's chain of steps (spray, foothold, Graph recon, secret hunt, Key Vault, own credential, Global Admin) and the defender's containment time.
- The incident graph. Addresses on the left, accounts and apps in the middle, tenant resources on the right. Green borders are contained, dashed green edges are blocked attempts.
- The decision feed. One card per typed decision.
What happens: the first spray lands at minute 0 and its address is blocked two seconds later. The second spray address is blocked at minute 9, so the attacker's sign-in with a guessed password at minute 19 fails (Conditional Access, error 53003). The script comes back from a fresh address at minute 23, which is blocked within two seconds. Without a defender this script reaches Global Administrator at minute 49. With the loop, it never gets past the foothold.
Step 4: Read a typed decision
Click a BLOCK_IP card in the feed.
- Top line: the action and its target, and who decided (Laya, System 2 or the analyst).
- Meta line: confidence, the yes/no "is an attacker using this?" cross-check, whether the action can be undone, and its blast radius.
- Dots: red is strong evidence, yellow is weak, green is benign. Each item cites its log event (
[e3]). - MITRE chips come from the evidence, not from the model.
Open the Decision JSON tab to see the full decision, the exact text Laya read, and its probabilities.
Step 5: Replay the five-minute leaked secret
Click Leaked secret to Key Vault in five minutes, then ▶ Play.
- At T+0 a secret-scanning alert arrives. Laya proposes ROTATE_SECRET, but rotation cannot be undone (it breaks the real app), so it is held for a person.
- At T+2 the app signs in from a hosting provider. Laya now picks ISOLATE_SERVICE_PRINCIPAL, which is reversible, so it runs straight away. The attacker's next step fails with "application disabled".
- Without a defender: Global Administrator at minute 9. With the loop: contained at T+0:02.
Step 6: Replay a normal busy day (the false-positive test)
Click Busy Monday, no attacker, then ▶ Play. Weekend password expiry locks 62 people out from the office network, which looks a lot like a spray.
Find the card for 198.51.100.20 (the office):
Laya proposed blocking the office. It never ran: blocking a known company network has a high blast radius, so a person must approve it, and the validator also rejected it because the only evidence was benign. The analyst chose MONITOR.
Now find the card for sp:ci-deploy, open Decision JSON, and scroll to System 2 raw reply:
The small LLM wanted to isolate the build server and cited evidence IDs it made up. The validator rejected every one.
Step 7: Race a human-only team
Drag Gate τ all the way right (it shows never), untick System 2 for held decisions, pick Leaked secret, and press Play. Now every decision waits for the analyst, who always gets it right but needs 30 minutes. The attacker reaches Global Administrator at minute 9. Change the analyst to 10 minutes and the result is the same.
Then scroll down and click Run scorecard:
| Password spray | Leaked secret | |
|---|---|---|
| No defender | Global Admin at 0:49 | Global Admin at 0:09 |
| Analyst only (30 min) | stopped before Global Admin, but Key Vault was already read | Global Admin at 0:09 |
| Laya loop | contained at 0:23 | contained at 0:02 |
Across all 432 combinations of the page's settings there were zero false containments and zero legitimate events blocked. Set τ back to 0.30 and tick System 2 again when you are done.
Step 8: Try to break the guardrails
Scroll to The schema is the guardrail and click the preset buttons: No evidence, Invented action, Invented evidence, Weak evidence only, Irreversible, no human, Block the office. Each one is rejected with the reason. You can also edit the JSON yourself and press Validate.
Step 9: Read the incident report
Go back to the password-spray scenario, play it, and open the Incident report tab. Every action is listed with its time, who applied it, its evidence and its MITRE techniques. Nobody wrote it; it comes straight from the decisions.
Step 10 (optional): Run it on your own machine
git clone https://github.com/vishalmysore/layaVsArtex cd layaVsArtex npm ci node scripts/prepare_site.mjs python serve.py 5194 Open http://localhost:5194. npm test runs the unit tests. The scenarios are in web/scenarios.js, so you can write your own attack chain and watch the defender respond.
Takeaways
- ARTEX is not a new kind of attack. It is an old attack at machine speed that never gets tired.
- The basics still win: MFA with no exclusions, no secrets in code, least privilege, PIM, and behaviour-based detection.
- Deception is especially effective against agents.
- Response has to be fast, and it can be safe when the AI chooses from a closed list, every decision cites real evidence, and anything irreversible goes to a person.
- The demo uses a 421M model only so it fits in a browser. A bigger decision model plugs into the same loop and would give better-calibrated confidence; the guardrails stay the same.
Sources: Microsoft Threat Intelligence, "What defenders need to know about ARTEX" (Microsoft Security Blog, 25 November 2026). Laya typed-decisions model by ConvAI Innovations (Apache-2.0); System 2 via WebLLM. Demo and code: https://github.com/vishalmysore/layaVsArtex. Educational project, synthetic data only.
















