Repository navigation
Conversation
Detects a host with three or more Elastic Defend behavior alerts in an hour whose command line, parent command line, or executable path carries an agentic-framework intent ID. The ID is the unpadded counter ARTEX-family harnesses embed in filenames and comments, shaped like i42463_dbg.b64 or i43345sys. A single match is too common. The rule counts alerts on one host.id inside the one-hour lookback.
|
Starting the rule tests ... |
There was a problem hiding this comment.
🟡 Changes recommended
The rule’s regexes allow bypassing the documented 16-character suffix limit, and its 9.4.0 minimum unnecessarily excludes supported 8.19 installations.
2 open issues
What changed in this PR
Adds a cross-platform ES|QL correlation rule to identify possible ARTEX-family activity from Elastic Defend behavior alerts containing agentic intent IDs.
Changes:
- Requires at least three matching alerts from two distinct behavior rules on one host within an hour.
- Runs every five minutes and suppresses repeat alerts for the same host for one hour.
- Includes investigation guidance, false-positive advice, and MITRE ATT&CK Execution mappings.
| File | Description |
|---|---|
rules/cross-platform/execution_multiple_endpoint_alerts_agentic_intent_id.toml |
Adds the correlation query, scheduling, suppression, and investigation guidance. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Starting the rule tests ... |
|
Starting the rule tests ... |
|
Starting the rule tests ... |
An underscore was both a token character and a trailing separator, so a long suffix could still match. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Starting the rule tests ... |
|
Starting the rule tests ... |
A command line with three or more echo === labels is the same harness shape. Diagnostic rules stay out of the count. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Starting the rule tests ... |
A label followed by && is an admin playbook. The harness form is echo ===label===; Co-authored-by: Cursor <cursoragent@cursor.com>
|
Starting the rule tests ... |
|
Starting the rule tests ... |
| Esql.file_path_values = values(file.path), | ||
| Esql.user_name_values = values(user.name) | ||
| by host.id | ||
| | where Esql.alert_count >= 10 or Esql.rule_name_count_distinct >= 2 |
There was a problem hiding this comment.
Just double checking, I expect we want these numbers rather than the ones in the PR summary?
eric-forte-elastic
left a comment
There was a problem hiding this comment.
Looks good to me 👍
| // Lucene RLIKE is a whole-string match and has no lookaround. | ||
| // i + 4-7 digits + at most 16 token characters. Underscore stays inside the token. | ||
| // Three or more echo "===section===" banners, each ending in ;. A label followed by && does not match. | ||
| | where process.command_line rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | ||
| or process.parent.command_line rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | ||
| or process.executable rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | ||
| or process.parent.executable rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | ||
| or file.path rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | ||
| or process.command_line rlike "((.|\n|\r)*echo[^A-Za-z0-9\n\r]{0,3}={3}[^=\n\r]{1,80}={3}[^A-Za-z0-9\n\r;]{0,3};(.|\n|\r)*){3}" |
There was a problem hiding this comment.
| // Lucene RLIKE is a whole-string match and has no lookaround. | |
| // i + 4-7 digits + at most 16 token characters. Underscore stays inside the token. | |
| // Three or more echo "===section===" banners, each ending in ;. A label followed by && does not match. | |
| | where process.command_line rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.parent.command_line rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.executable rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.parent.executable rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or file.path rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.command_line rlike "((.|\n|\r)*echo[^A-Za-z0-9\n\r]{0,3}={3}[^=\n\r]{1,80}={3}[^A-Za-z0-9\n\r;]{0,3};(.|\n|\r)*){3}" | |
| // Lucene RLIKE is a whole-string match and has no lookaround. | |
| // Arm 1: i + 4-7 digits + at most 16 token characters (e.g. i42693_logon.txt). | |
| // Arm 2: Wiz-style anchored bare IDs (e.g. probe_i21481, artex-i42463). | |
| // Arm 3: path-shaped bare IDs (e.g. /tmp/i21481/, Temp\i44184\). Not fully open bare iNNNN. | |
| // Three or more echo "===section===" banners, each ending in ;. A label followed by && does not match. | |
| | where process.command_line rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.command_line rlike ".*(artex|pentest|probe|canary)[-_]?i[0-9]{4,7}([^A-Za-z0-9].*)?" | |
| or process.command_line rlike ".*[/\\\\]i[0-9]{4,7}([/\\\\].*)?" | |
| or process.parent.command_line rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.parent.command_line rlike ".*(artex|pentest|probe|canary)[-_]?i[0-9]{4,7}([^A-Za-z0-9].*)?" | |
| or process.parent.command_line rlike ".*[/\\\\]i[0-9]{4,7}([/\\\\].*)?" | |
| or process.executable rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.executable rlike ".*(artex|pentest|probe|canary)[-_]?i[0-9]{4,7}([^A-Za-z0-9].*)?" | |
| or process.executable rlike ".*[/\\\\]i[0-9]{4,7}([/\\\\].*)?" | |
| or process.parent.executable rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or process.parent.executable rlike ".*(artex|pentest|probe|canary)[-_]?i[0-9]{4,7}([^A-Za-z0-9].*)?" | |
| or process.parent.executable rlike ".*[/\\\\]i[0-9]{4,7}([/\\\\].*)?" | |
| or file.path rlike "(.*[^A-Za-z0-9])?i[0-9]{4,7}[A-Za-z_][A-Za-z0-9_]{0,15}([^A-Za-z0-9_].*)?" | |
| or file.path rlike ".*(artex|pentest|probe|canary)[-_]?i[0-9]{4,7}([^A-Za-z0-9].*)?" | |
| or file.path rlike ".*[/\\\\]i[0-9]{4,7}([/\\\\].*)?" | |
| or process.command_line rlike "((.|\n|\r)*echo[^A-Za-z0-9\n\r]{0,3}={3}[^=\n\r]{1,80}={3}[^A-Za-z0-9\n\r;]{0,3};(.|\n|\r)*){3}" |
wdyt?
| @@ -0,0 +1,140 @@ | |||
| [metadata] | |||
| creation_date = "2026/11/26" | |||
There was a problem hiding this comment.
| creation_date = "2026/11/26" | |
| creation_date = "2026/11/30" |

Detects a host with three or more Elastic Defend behavior alerts in an hour whose command line, parent command line, or executable path carries an agentic-framework intent ID. The ID is the unpadded counter ARTEX-family harnesses embed in filenames and comments, shaped like i42463_dbg.b64 or i43345sys. A single match is too common. The rule counts alerts on one host.id inside the one-hour lookback.