# CrowdStrike: hunt ingested Apache requests with CQL

Use [ai_file_requests.cql](ai_file_requests.cql) in Falcon LogScale, or a Falcon Next-Gen SIEM CQL search with access to the same ingested Apache logs and compatible functions. Select the repository or view containing those logs, choose the time range, and confirm `#logtype="apache-access-log"` returns your Apache access events before running the complete query.

## Required data and setup

This hunt requires separately ingested inbound web-server access logs. A Falcon endpoint sensor or network-connection event does not supply the required HTTP request targets. Your account needs LogScale or Next-Gen SIEM search access, a third-party log-ingestion entitlement, and permission for the selected repository/view. Confirm entitlement and retention with your administrator; endpoint licensing alone is insufficient.

The documented [apache/http-server package](https://library.humio.com/integrations/integrations-apache-http-server.html) includes an access-log parser. Its documentation lists package version 1.0.1 and minimum LogScale 1.42.0; that is the package minimum, not a verified minimum for this hunt. Administrators must confirm that their deployment supports the listed CQL functions. Follow its [ingestion guide](https://library.humio.com/integrations/integrations-apache-http-server-configure.html) and [generated fields](https://library.humio.com/integrations/integrations-apache-http-server-parsers.html). The shipped selector uses that integration's `#logtype` access tag. If your approved ingestion uses another tag, replace the selector after verifying it identifies only the intended access-log source. Do not simply apply it to endpoint records.

The hunt parses preserved `@rawstring` at search time rather than depending on a parser's normalized URL field. Each single-line event must start with Apache Common or Combined Log Format: client, ident, user, bracketed timestamp, and a quoted `METHOD target HTTP/version`. JSON envelopes, syslog wrappers, virtual-host prefixes, and a discarded original event require a separately reviewed parser adjustment. The explicit target-existence guards exclude missing parses. The status parse has `strict=false`, so missing status does not suppress a matching request. All `hunt_` fields are temporary search results, not a custom telemetry product. Retain `@rawstring`, event time, and repository/source identity when investigating results.

References: [regex and strict behavior](https://library.humio.com/crowdstrike-query-language/functions-regex.html), [urlDecode](https://library.humio.com/crowdstrike-query-language/functions-urldecode.html), [lower with explicit English locale](https://library.humio.com/crowdstrike-query-language/functions-lower.html), [text:endsWith](https://library.humio.com/crowdstrike-query-language/functions-text-endswith.html), and [case clauses](https://library.humio.com/crowdstrike-query-language/syntax-conditional.html). Each clause compares an exact slash-prefixed ending; unmatched events are dropped.

## Read the result

`hunt_group` separates the Claude credential filename from the nine configuration filenames. These are case-insensitive hunts for the same ten slash-prefixed path endings as the Sigma rules. Nested deployments match; backup suffixes, trailing slashes, directory-only requests, and filenames appearing only in a query do not. Configuration files may be intentionally public. A request, including a failed request, does not establish file existence, retrieval, secret content, or compromise. Use the investigation steps in the [pack README](../README.md).

## Validation and limits

Experimental, manually authored hunt starters. The exact shipped suffix predicates and request-parser expressions were checked with local positive, negative, and missing-data fixtures. Native query compilation and execution in vendor or customer tenants were not performed. Local Python fixtures are a reference check of selected logic; they do not validate a vendor parser, ingestion pipeline, URL decoder, query engine, performance, or alert configuration.

The decoded variants split at the first literal `?` before one URL-decode pass, retaining the original target. No repeated decoding is performed. Double encoding, escaped access-log representations, semicolon parameters, server rewrites, and prior ingestion decoding can change coverage. Malformed percent encodings and `+` handling require a native test; cross-platform decoder parity is not asserted. Start with a small time range, verify a known safe request in your own access logs, and inspect the original event before promoting the hunt to an alert. Respect platform result limits and narrow the time window when results reach them.

Decoded variants accept origin-form request targets beginning with `/`. Absolute-form proxy targets, authority-only CONNECT targets, and `*` targets require separate handling. This avoids treating a host name as a file path. The Elastic literal variant instead uses the integration's parsed path.

Before the full hunt, run only the source selector and inspect roughly 20 events for the required raw request or ECS fields. In an authorized test location with no such files, verify a request for `/.claude/.credentials.json`, an ordinary page, and `/?name=/.claude/.credentials.json`; only the first should match. Test a failed status as well. Request targets can contain sensitive query values: retain originals in the SIEM, and redact them before sharing a result.
