# Sumo Logic: hunt requests in Apache access logs

Use [ai_file_requests.sumo](ai_file_requests.sumo) in Sumo Logic Log Search. Replace `YOUR_APACHE_ACCESS_CATEGORY` with the `_sourceCategory` assigned to your actual Apache access-log source, then choose the time range. The token is a source-selector placeholder, not a required Deception Check schema.

## Required data and setup

Use an account with Log Search access and permission to search the collected source; ingestion and retention consume your normal Sumo Logic log entitlement. These operators are documented for the current SaaS Log Search service as checked on November 1, 2026; no tenant or pinned server version was tested. Collect Apache Common Log Format or Combined Log Format lines through your installed collector/file source. See the [Sumo Apache collection guide](https://www.sumologic.com/help/docs/integrations/web-servers/apache/) and [Apache log format reference](https://httpd.apache.org/docs/2.4/logs.html).

The query parses `_raw` at search time. Each single-line event must start with client, ident, and user tokens, a bracketed timestamp, and a quoted `METHOD target HTTP/version` request, as in standard Apache access logs. It does not assume an app dashboard, extracted `url` field, or normalized HTTP schema. JSON, syslog wrappers, and virtual-host prefixes need a separately checked parser adjustment. The status parse uses `nodrop`; missing status does not suppress an otherwise matching request. The fields beginning `hunt_` are temporary query results, not ingestion prerequisites. Keep `_raw`, `_sourceHost`, `_sourceName`, and `_messageTime` with the returned event.

Operators: [parse regex and nodrop](https://www.sumologic.com/help/docs/search/search-query-language/parse-operators/parse-variable-patterns-using-regex/), [urldecode](https://www.sumologic.com/help/docs/search/search-query-language/search-operators/urldecode/), [case conversion](https://www.sumologic.com/help/docs/search/search-query-language/search-operators/tolowercase-touppercase/), and [matches](https://www.sumologic.com/help/docs/search/search-query-language/search-operators/matches/). Here `matches` uses literal wildcard strings: only the initial `*` is a wildcard; dots in filenames are literal.

## 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.
