psf-agentic-attack-check(8)

Script: /opt/psf-security-patches/threats/agentic-attacks/agentic-attack-check.sh. Tool page: AI attack frameworks. Script source. With the package installed: man psf-agentic-attack-check.

Overview

AI-driven attack frameworks: indicators of compromise on GNU/Linux hosts (v2) ARTEX, CAIRN, CyberStrikeAI, HexStrike AI, PentAGI, Strix, Hermes, RedAmon, Xalgorix, PentestSwarm and Agent Zero. No CVE: these are attack tools, not flaws.

Agentic attack frameworks hand an intrusion to a team of AI agents: a planner decides what to try, workers run nmap, curl, sqlmap, Metasploit and the rest, and every result feeds the next step. Built for authorized testing, they have been used since August 2026 by state-aligned and criminal groups (Google GTIG, Microsoft, CrowdStrike, Wiz, Datadog, the FBI's FLASH of 13 November 2026 on ARTEX). GTIG saw CAIRN against US aerospace targets and a customized PentAGI scanning organizations across Asia; CyberStrikeAI runs a Go command-and-control server with implants; HexStrike AI wires an AI client to 150 tools over MCP.

A GNU/Linux host meets them three ways, and this tool looks at each:
  - as an operator's host: a framework, its console, container or MCP server runs here, or a
    backdoored copy (the ARTEX images on Docker Hub hand the host to whoever planted them)
  - as a victim: what the agents leave behind (web shells, marker files, implants, accounts,
    scheduled jobs) and what they leave in logs (user agents, probe requests, source addresses)
  - as a target: the weaknesses the agents look for first on a host

Command reference

The original help text below includes the command syntax, options, environment variables and exit codes supplied with this tool. Review the source and test any change before applying it to a production system.

Original command-line help
AI-driven attack frameworks: indicators of compromise on GNU/Linux hosts (v2)
ARTEX, CAIRN, CyberStrikeAI, HexStrike AI, PentAGI, Strix, Hermes, RedAmon, Xalgorix,
PentestSwarm and Agent Zero. No CVE: these are attack tools, not flaws.

If this software is helpful, consider a donation to our 501c3 nonprofit:
https://privacysafe.foundation
Help and documentation: https://privacysafe.app/docs/security-patches/threats/agentic-attacks/

Agentic attack frameworks hand an intrusion to a team of AI agents: a planner decides what to
try, workers run nmap, curl, sqlmap, Metasploit and the rest, and every result feeds the next
step. Built for authorized testing, they have been used since August 2026 by state-aligned and
criminal groups (Google GTIG, Microsoft, CrowdStrike, Wiz, Datadog, the FBI's FLASH of 13
November 2026 on ARTEX). GTIG saw CAIRN against US aerospace targets and a customized PentAGI
scanning organizations across Asia; CyberStrikeAI runs a Go command-and-control server with
implants; HexStrike AI wires an AI client to 150 tools over MCP.

A GNU/Linux host meets them three ways, and this tool looks at each:
  - as an operator's host: a framework, its console, container or MCP server runs here, or a
    backdoored copy (the ARTEX images on Docker Hub hand the host to whoever planted them)
  - as a victim: what the agents leave behind (web shells, marker files, implants, accounts,
    scheduled jobs) and what they leave in logs (user agents, probe requests, source addresses)
  - as a target: the weaknesses the agents look for first on a host

Usage:
  ./agentic-attack-check.sh [command] [arguments]

  check (default)  Read-only. Images and containers (docker, podman) of the
                   frameworks; consoles answering on this host's own ports (page
                   title, page text and favicon hash, asked over loopback);
                   running processes whose command line or environment names a
                   framework; framework files and folders; files whose SHA-256
                   or MD5 is a published one; AI clients (Claude, Cursor, Codex,
                   VS Code, goose) wired to an offensive MCP server; and the
                   weaknesses the agents use (source maps in web folders, MySQL
                   logs written into a web folder, an empty secure_file_priv).
                   Exit 0 = nothing, 1 = a finding or something to look at,
                   2 = the indicator file could not be read.
  hunt             Read-only. Web access logs (user agents, probe requests,
                   headers, source addresses), the auth log and the journal
                   (addresses, domains), web folders (web shells, marker files
                   and strings), shell histories, cron and systemd units, and
                   what runs now: shells under web and database services, and
                   connections to published addresses. Exit 0 = nothing,
                   1 = leads, 2 = no log could be read.
  list             The indicators by framework, type and confidence. (The list writes
                   every dash as a plain hyphen; pages are compared the same way.)
  export TYPE      Prints indicators for other tools, one per line: ips,
                   domains, user-agents, hashes, images or strings. Add
                   --min high|medium|low (default medium). Changes nothing.
  version          Prints the script version.

Confidence: a high-confidence indicator is a finding; a medium one is a lead to look at; a
low one (shared with ordinary tools) is counted, never acted on. No match proves nothing:
addresses rotate within minutes and the agents choose many names at run time.

Env overrides:
  INDICATORS_FILE    the indicator list (default: indicators.tsv beside this script)
  FRAMEWORKS="cairn pentagi"   only these frameworks (default: all)
  WEB_ROOTS="/var/www /srv /usr/share/nginx /opt /home/*/public_html /home/*/www"
  SEARCH_ROOTS="/root /home /opt /srv /app /usr/local /tmp /var/tmp /dev/shm"
  MAX_DEPTH=6        how deep SEARCH_ROOTS and WEB_ROOTS are searched
  HOME_DIRS="/root /home/*"   home folders read for framework folders and AI client settings
  HASH_MAX_FILES=5000  most files hashed in check
  HUNT_LOG_FILES     access logs, instead of the Apache, nginx and Caddy defaults
  HUNT_SYS_LOG_FILES system logs, instead of auth.log, secure, syslog and messages
  HUNT_DAYS=120      how far back logs are read
  PROBE_PORTS        extra local ports to ask for a console page
  MYSQL_CNF_DIRS="/etc/mysql /etc/my.cnf.d /etc"   MYSQL_QUERY=1   (0 skips the live query)
  SCAN_CONTAINERS=1  0 skips docker and podman

Output and automation (every command):
  --output jsonl      JSON Lines for programs and language models: a start record,
                      an event for each finding, a text record for any other line
                      and a verdict, written when the command ends (format in
                      automation/README.md; psf-report turns it into Markdown, HTML
                      or PDF). --output text, the default, is the output above.
  PSF_READ_ONLY=1     has nothing to refuse here: this tool never changes the host.

The Security Patches software and this documentation are dedicated to the public domain under CC0 1.0 Universal. Other pages on privacysafe.app/docs are CC BY-SA 4.0 unless the page says otherwise.