LLM-Driven Penetration Testing Framework User Agent


Description

Detects a user agent that identifies an LLM-driven penetration testing framework. ARTEX, its AntiFox and ScopeWeaver forks, CyberStrikeAI, and HexStrike embed these strings in web requests.

Query · esql

from
    logs-aws.cloudtrail-*,
    logs-aws.eks_audit-*,
    logs-nginx.access-*,
    logs-apache.access-*,
    logs-apache_tomcat.access-*,
    logs-iis.access-*,
    logs-traefik.access-*,
    logs-zeek.http*,
    logs-network_traffic.http*,
    logs-azure.signinlogs-*,
    logs-azure.graphactivitylogs-*,
    logs-azure.aadgraphactivitylogs-*,
    logs-o365.audit-*,
    logs-kubernetes.audit_logs-*,
    logs-gcp.audit-*,
    logs-gcp_vertexai.auditlogs-*,
    logs-anthropic.audit-*,
    logs-openai_chatgpt_enterprise.auth_log-*,
    logs-okta.system-*
    metadata _id, _version, _index
| where user_agent.original is not null
| eval Esql.ua_lower = to_lower(user_agent.original)
| eval Esql.framework = case(
    Esql.ua_lower like "artex-*" or Esql.ua_lower like "mozilla/* artex*" or Esql.ua_lower like "norma/0.4*", "ARTEX",
    Esql.ua_lower like "*antifox*", "AntiFox",
    Esql.ua_lower like "*scopeweaver*", "ScopeWeaver",
    Esql.ua_lower like "*cyberstrikeai*", "CyberStrikeAI",
    Esql.ua_lower like "*hexstrike-http-framework*" or Esql.ua_lower like "*hexstrike-browseragent*", "HexStrike",
    "other"
)
| where Esql.framework != "other"
| keep
    _id,
    _version,
    _index,
    @timestamp,
    Esql.framework,
    Esql.ua_lower,
    user_agent.original,
    source.ip,
    data_stream.dataset,
    data_stream.namespace,
    host.name

Investigation fields

Pivot points the source recommends for triage.

  • @timestamp
  • Esql.framework
  • user_agent.original
  • source.ip
  • data_stream.dataset
  • host.name

Known false positives

  • An authorized penetration test or red-team exercise that runs ARTEX, AntiFox, ScopeWeaver, CyberStrikeAI, or HexStrike will match. Confirm the engagement window, the principal, and the source address before closing the alert.

Analyst notes

Investigating LLM-Driven Penetration Testing Framework User Agent

This rule matches user agents that name an LLM-driven offensive framework. The strings are the defaults those tools send, not generic HTTP libraries.

  • ARTEX — artex-agent and artex-judge-* (Dragos saw artex-judge-r121 in CloudTrail while stolen AWS keys were checked for liveness), plus artex-enrich/* and norma/0.4 on web requests. AntiFox still sends norma/0.4.
  • AntiFox — antifox-enrich/1.0, the renamed ARTEX enrichment agent.
  • ScopeWeaver — user agent scopeweaver. ExtraHop also saw artex-enrich/1.0 from this fork, which matches as ARTEX.
  • CyberStrikeAI — CyberStrikeAI-WebShell/1.0 on webshell command and file requests.
  • HexStrike — HexStrike-HTTP-Framework/1.0 and HexStrike-BrowserAgent/1.0.

Esql.framework names which family matched. These agents self-identify on only a fraction of their traffic, so a hit is a lead to the rest of the activity from the same principal or address, which will use ordinary clients.

Possible investigation steps

  • Read user_agent.original, Esql.framework, source.ip, data_stream.dataset, and host.name. Open the source event for the principal and the action. Nginx access logs and GCP audit logs do not share user.name, event.action, and event.outcome, so those fields are not on the alert.
  • On CloudTrail, identify the access key or role and list the other API calls from that principal in the same hour. Key-liveness calls are often followed by S3, Secrets Manager, Parameter Store, Bedrock, and IAM changes.
  • On a web server, review the URL and method. A CyberStrikeAI webshell user agent on one path is command traffic, not a scan.
  • Search the same source address for curl, python-requests, Boto3, and Kali user agents that this rule does not alert on.

False positive analysis

  • Sanctioned use of these frameworks during a test window. Exclude the engagement source or principal, not the user agent.

Response and remediation

  • If the activity is unauthorized, revoke the access key or session and confirm the next request fails. These frameworks return from a new address after a block, so an address block alone does not remove their access.
  • On a webshell user agent, isolate the host and remove the shell.
  • Rotate any secret the principal could already read.
Raw source LLM-Driven Penetration Testing Framework User Agent · Elastic TOML
Esc
Published by elastic/detection-rules ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[metadata]
creation_date = "2026/11/20"
integration = [
    "apache",
    "apache_tomcat",
    "anthropic",
    "aws",
    "azure",
    "gcp",
    "gcp_vertexai",
    "iis",
    "kubernetes",
    "network_traffic",
    "nginx",
    "o365",
    "okta",
    "openai_chatgpt_enterprise",
    "traefik",
    "zeek",
]
maturity = "production"
updated_date = "2026/11/23"

[rule]
author = ["Elastic"]
description = """
Detects a user agent that identifies an LLM-driven penetration testing framework. ARTEX, its AntiFox and
ScopeWeaver forks, CyberStrikeAI, and HexStrike embed these strings in web requests.
"""
false_positives = [
    """
    An authorized penetration test or red-team exercise that runs ARTEX, AntiFox, ScopeWeaver, CyberStrikeAI, or
    HexStrike will match.
    Confirm the engagement window, the principal, and the source address before closing the alert.
    """,
]
from = "now-9m"
language = "esql"
license = "Elastic License v2"
name = "LLM-Driven Penetration Testing Framework User Agent"
note = """## Triage and analysis

### Investigating LLM-Driven Penetration Testing Framework User Agent

This rule matches user agents that name an LLM-driven offensive framework. The strings are the defaults those tools
send, not generic HTTP libraries.

- **ARTEX** — `artex-agent` and `artex-judge-*` (Dragos saw `artex-judge-r121` in CloudTrail while stolen AWS keys were
  checked for liveness), plus `artex-enrich/*` and `norma/0.4` on web requests. AntiFox still sends `norma/0.4`.
- **AntiFox** — `antifox-enrich/1.0`, the renamed ARTEX enrichment agent.
- **ScopeWeaver** — user agent `scopeweaver`. ExtraHop also saw `artex-enrich/1.0` from this fork, which matches as ARTEX.
- **CyberStrikeAI** — `CyberStrikeAI-WebShell/1.0` on webshell command and file requests.
- **HexStrike** — `HexStrike-HTTP-Framework/1.0` and `HexStrike-BrowserAgent/1.0`.

`Esql.framework` names which family matched. These agents self-identify on only a fraction of their traffic, so a hit
is a lead to the rest of the activity from the same principal or address, which will use ordinary clients.

### Possible investigation steps

- Read `user_agent.original`, `Esql.framework`, `source.ip`, `data_stream.dataset`, and `host.name`. Open the source
  event for the principal and the action. Nginx access logs and GCP audit logs do not share `user.name`,
  `event.action`, and `event.outcome`, so those fields are not on the alert.
- On CloudTrail, identify the access key or role and list the other API calls from that principal in the same hour.
  Key-liveness calls are often followed by S3, Secrets Manager, Parameter Store, Bedrock, and IAM changes.
- On a web server, review the URL and method. A CyberStrikeAI webshell user agent on one path is command traffic, not a scan.
- Search the same source address for curl, python-requests, Boto3, and Kali user agents that this rule does not alert on.

### False positive analysis

- Sanctioned use of these frameworks during a test window. Exclude the engagement source or principal, not the user agent.

### Response and remediation

- If the activity is unauthorized, revoke the access key or session and confirm the next request fails. These frameworks
  return from a new address after a block, so an address block alone does not remove their access.
- On a webshell user agent, isolate the host and remove the shell.
- Rotate any secret the principal could already read.
"""
references = [
    "https://www.dragos.com/blog/ai-supply-chain-security-canary-tokens",
    "https://www.elastic.co/security-labs/threat-command/agentic-offensive-frameworks-detection-artex",
    "https://www.microsoft.com/en-us/security/blog/2026/10/21/storm-0940-uses-artex-agentic-ai-connectwise-supply-chain-compromise/",
    "https://github.com/BaaRai/ARTEX",
    "https://github.com/AIPentest/CyberStrikeAI",
    "https://github.com/0x4m4/hexstrike-ai",
    "https://pentestit.com/ai-pentesting-frameworks-abuse-lineage-fingerprints/",
    "https://labs.cloudsecurityalliance.org/research/csa-research-note-artex-agentic-pentest-frameworks-in-the-wi/",
]
risk_score = 73
rule_id = "5a773283-3663-42ba-8862-287823c69750"
severity = "high"
tags = [
    "Domain: Cloud",
    "Domain: Identity",
    "Domain: Network",
    "Domain: Containers",
    "Use Case: Threat Detection",
    "Tactic: Initial Access",
    "Tactic: Reconnaissance",
    "Tactic: Persistence",
    "Data Source: AWS",
    "Data Source: Amazon Web Services",
    "Data Source: AWS CloudTrail",
    "Data Source: Azure",
    "Data Source: Microsoft 365",
    "Data Source: Microsoft Entra ID Sign-In Logs",
    "Data Source: Microsoft Graph Activity Logs",
    "Data Source: Google Cloud Platform",
    "Data Source: GCP",
    "Data Source: GCP Audit Logs",
    "Data Source: Kubernetes",
    "Data Source: Network Packet Capture",
    "Data Source: Network Traffic",
    "Data Source: Zeek",
    "Data Source: Okta",
    "Data Source: Okta System Logs",
    "Data Source: Anthropic Audit Logs",
    "Data Source: OpenAI ChatGPT Enterprise",
    "Data Source: Nginx",
    "Data Source: Apache",
    "Data Source: Apache Tomcat",
    "Data Source: IIS",
    "Data Source: Traefik",
    "Resources: Investigation Guide",
    "Rule Type: ES|QL",
    "Threat: Web Application Attack",
    "Threat: Web Shell",
    "Platform: AWS",
    "Platform: Azure",
    "Platform: Entra ID",
    "Platform: GCP",
    "Platform: Kubernetes",
    "Platform: Okta",
    "Platform: Anthropic",
    "Platform: OpenAI",
    "Service: AWS EKS",
    "Service: Nginx",
    "Service: Apache HTTP Server",
    "Service: Apache Tomcat",
    "Service: IIS",
]
timestamp_override = "event.ingested"
type = "esql"
query = '''
from
    logs-aws.cloudtrail-*,
    logs-aws.eks_audit-*,
    logs-nginx.access-*,
    logs-apache.access-*,
    logs-apache_tomcat.access-*,
    logs-iis.access-*,
    logs-traefik.access-*,
    logs-zeek.http*,
    logs-network_traffic.http*,
    logs-azure.signinlogs-*,
    logs-azure.graphactivitylogs-*,
    logs-azure.aadgraphactivitylogs-*,
    logs-o365.audit-*,
    logs-kubernetes.audit_logs-*,
    logs-gcp.audit-*,
    logs-gcp_vertexai.auditlogs-*,
    logs-anthropic.audit-*,
    logs-openai_chatgpt_enterprise.auth_log-*,
    logs-okta.system-*
    metadata _id, _version, _index
| where user_agent.original is not null
| eval Esql.ua_lower = to_lower(user_agent.original)
| eval Esql.framework = case(
    Esql.ua_lower like "artex-*" or Esql.ua_lower like "mozilla/* artex*" or Esql.ua_lower like "norma/0.4*", "ARTEX",
    Esql.ua_lower like "*antifox*", "AntiFox",
    Esql.ua_lower like "*scopeweaver*", "ScopeWeaver",
    Esql.ua_lower like "*cyberstrikeai*", "CyberStrikeAI",
    Esql.ua_lower like "*hexstrike-http-framework*" or Esql.ua_lower like "*hexstrike-browseragent*", "HexStrike",
    "other"
)
| where Esql.framework != "other"
| keep
    _id,
    _version,
    _index,
    @timestamp,
    Esql.framework,
    Esql.ua_lower,
    user_agent.original,
    source.ip,
    data_stream.dataset,
    data_stream.namespace,
    host.name
'''

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1078"
name = "Valid Accounts"
reference = "https://attack.mitre.org/techniques/T1078/"

[[rule.threat.technique.subtechnique]]
id = "T1078.004"
name = "Cloud Accounts"
reference = "https://attack.mitre.org/techniques/T1078/004/"

[rule.threat.tactic]
id = "TA0001"
name = "Initial Access"
reference = "https://attack.mitre.org/tactics/TA0001/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1595"
name = "Active Scanning"
reference = "https://attack.mitre.org/techniques/T1595/"

[[rule.threat.technique.subtechnique]]
id = "T1595.002"
name = "Vulnerability Scanning"
reference = "https://attack.mitre.org/techniques/T1595/002/"

[rule.threat.tactic]
id = "TA0043"
name = "Reconnaissance"
reference = "https://attack.mitre.org/tactics/TA0043/"

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1505"
name = "Server Software Component"
reference = "https://attack.mitre.org/techniques/T1505/"

[[rule.threat.technique.subtechnique]]
id = "T1505.003"
name = "Web Shell"
reference = "https://attack.mitre.org/techniques/T1505/003/"

[rule.threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

[rule.investigation_fields]
field_names = [
    "@timestamp",
    "Esql.framework",
    "user_agent.original",
    "source.ip",
    "data_stream.dataset",
    "host.name",
]

[rule.alert_suppression]
group_by = ["source.ip", "user_agent.original", "data_stream.dataset"]
missing_fields_strategy = "doNotSuppress"

[rule.alert_suppression.duration]
unit = "h"
value = 1

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.