Rule : ARTEX-like Incremental Probe Artifacts
Execution ARTEX Probe Artifacts
Query
let lookback = 7d;
let file_hits = DeviceFileEvents
| where Timestamp > ago(lookback)
| where FileName matches regex @"(?i)artex[-_]?probe[-_]?\d{3,}" or FileName contains "ArtexProbe" or FolderPath contains "artex-probe-"
| project Timestamp, DeviceId, DeviceName, EvidenceType="File", Artifact=FileName, Context=FolderPath, Account=InitiatingProcessAccountName;
let process_hits = DeviceProcessEvents
| where Timestamp > ago(lookback)
| where ProcessCommandLine contains "artex-probe-" or ProcessCommandLine contains "ArtexProbe"
| project Timestamp, DeviceId, DeviceName, EvidenceType="Process", Artifact=FileName, Context=ProcessCommandLine, Account=AccountName;
union file_hits, process_hits
| order by Timestamp descAbout this query
Explanation
This query is designed to detect suspicious activities related to the ARTEX offensive framework, which is known for dropping files with specific naming conventions on compromised systems. Here's a simplified breakdown of the query:
-
Purpose: The query aims to identify files and command lines that match known patterns associated with the ARTEX framework. These patterns include filenames or command lines containing "artex-probe-" or "ArtexProbe".
-
Data Sources: It examines two types of events:
DeviceFileEvents: Looks for files with names matching the ARTEX pattern.DeviceProcessEvents: Looks for command lines that reference the ARTEX pattern.
-
Time Frame: The query searches for events from the past 7 days.
-
Detection Logic:
- It filters file events for names or paths that match the ARTEX pattern.
- It filters process events for command lines that include the ARTEX pattern.
- It combines these findings into a single timeline, providing context about the device, account, and artifact involved.
-
Severity and Tuning: The rule is marked as high severity, but it should be fine-tuned to reduce false positives, such as excluding known testing environments or authorized red-team activities.
-
Triage Steps: If a potential threat is detected, further investigation steps include:
- Verifying the file path and process responsible.
- Analyzing the process tree and recent activity on the device.
- Checking for any suspicious network activity or Active Directory queries.
- Hashing the suspicious file and searching for it across the network.
-
Note: The query is a starting point for threat hunting and should be adapted based on specific environments and threat landscapes.