{
  "version": "2026-10-23-R5",
  "title": "Research detection appendix",
  "status": "EXPERIMENTAL_HUNT_STARTERS",
  "intro": "Start with the shared download address, vector-bearing command lines, and libredtail-http requests. Then check PHP and Apache child processes and worker failures. Each hunt names the telemetry it needs; input, runtime, network, and error-log observations have different meanings. These are investigation leads, not proof that either PHP2Shell CVE triggered.",
  "validation_summary": "YARA compiled and passed inert fixtures. Sigma parsed and passed local predicate checks. Snort and platform queries received static syntax/schema review; their engines and tenants were not exercised. Supplemental local checks cover destination/direction predicates and error text, not platform execution. Download both fixture files and the validator with the rules.",
  "support_files": [
    "README.txt",
    "fixtures.json",
    "supplemental-fixtures.json",
    "validate.py"
  ],
  "entries": [
    {
      "id": "sigma-http-label",
      "source_labels": ["Sigma field taxonomy","Sigma rule specification"],
      "title": "Sigma: PHP2Shell labels in HTTP",
      "language": "yaml",
      "filename": "sigma-web-php2shell-label.yml",
      "purpose": "Find requests whose caller-supplied User-Agent names PHP2Shell.",
      "telemetry": "Parsed web-server or reverse-proxy request logs. Map the incoming User-Agent value to Sigma cs-user-agent; verify category webserver in the conversion pipeline.",
      "logic": "Case-insensitive substring php2shell covers the three observed labels. This is a probe/research lead and can also match authorized testing.",
      "validation": "Parsed with pySigma 2.0.1. This rule passed seven inert local predicate fixtures. Backend conversion, target-engine execution, and alert deployment were not performed.",
      "false_positives": "Authorized scanners, copied headers, research, and replayed logs.",
      "blind_spots": "Missing or changed User-Agent, including the observed downloader request with no UA. A match does not establish exploitation, execution, or operator identity.",
      "sources": [
        "https://sigmahq.io/sigma-specification/specification/sigma-appendix-taxonomy.html",
        "https://sigmahq.io/sigma-specification/specification/sigma-rules-specification.html"
      ]
    },
    {
      "id": "sigma-php-child",
      "source_labels": ["Sigma field taxonomy","Sigma log-source guidance"],
      "title": "Sigma: Linux PHP worker starts a shell or downloader",
      "language": "yaml",
      "filename": "sigma-linux-php-worker-child.yml",
      "purpose": "Find generic runtime behavior that deserves investigation after a PHP request.",
      "telemetry": "Linux process-creation events with full Image and direct ParentImage paths; preserve process identifiers, command lines, and host context.",
      "logic": "A php-fpm or php-cgi basename, optionally followed by numeric version components, directly parents sh, bash, dash, ksh, zsh, curl, or wget. The regexes match executable-path fields rather than request text.",
      "validation": "Parsed with pySigma 2.0.1; 13 inert local predicate fixtures passed. No Sigma backend conversion or production telemetry execution.",
      "false_positives": "Applications and maintenance tasks intentionally launching these tools. Baseline per service and investigate command lines.",
      "blind_spots": "Generic behavior, not CVE-specific. Misses PHP CLI, Apache mod_php, renamed workers/tools, wrappers, busybox, grandchildren, absent ancestry, and execution without these children.",
      "sources": [
        "https://sigmahq.io/sigma-specification/specification/sigma-appendix-taxonomy.html",
        "https://sigmahq.io/docs/basics/log-sources.html"
      ]
    },
    {
      "id": "yara-offline",
      "source_labels": ["YARA rule syntax","YARA hash module"],
      "title": "YARA: offline input triage and exact filler correlation",
      "language": "yara",
      "filename": "php2shell-offline-triage.yar",
      "purpose": "Triage locally retained text or decoded HTTP requests; keep filler correlation separate from suspicious-input signals.",
      "telemetry": "Offline files, ideally one decoded request/body per file. Text rules inspect ASCII tokens and cap input at 2 MiB. The exact-artifact rule uses file size and SHA-256.",
      "logic": "Three roles: weak php2shell text label; stronger co-occurrence of upload-progress, a PHP opening tag, and system/shell_exec/passthru function tokens; exact correlation of the two verified repetitive filler files. Co-occurrence does not bind code to a multipart field.",
      "validation": "Compiled without warnings using yara-python 4.5.4. Fourteen inert match fixtures passed, including reconstructed filler hashes, one-byte mutations, ordinary repeated filler, and the size guard. This is offline fixture validation, not exploit testing.",
      "false_positives": "Research documents, source-code uploads, and training examples can match text rules. Exact filler bytes may be reused by unrelated tests.",
      "blind_spots": "No PHP parser or decoding of JSON escapes, HTML entities, archives, or encryption. Concatenated logs can combine unrelated tokens. Filler matches are not malware classifications and do not establish surrounding-request safety.",
      "sources": [
        "https://yara.readthedocs.io/en/stable/writingrules.html",
        "https://yara.readthedocs.io/en/stable/modules/hash.html"
      ]
    },
    {
      "id": "snort-http",
      "source_labels": ["Snort service matching","Snort HTTP headers","Snort HTTP body buffers","Snort PCRE syntax"],
      "title": "Snort 3: visible HTTP labels and body-token combinations",
      "language": "snort",
      "filename": "php2shell-snort3.rules",
      "purpose": "Find a PHP2Shell User-Agent label or a multipart request containing upload-progress/PHP/command-function tokens.",
      "telemetry": "Snort 3 HTTP inspection over plaintext HTTP or an authorized decrypted feed. Ordinary encrypted HTTPS does not expose these buffers.",
      "logic": "SID 1000618 searches the User-Agent sticky buffer. SID 1000619 requires multipart Content-Type and co-occurring tokens in http_client_body. It does not parse the multipart field relationship or establish execution.",
      "validation": "Official Snort 3 header, service, body, content, and PCRE syntax reviewed; four inert local body-predicate fixtures passed. Snort compilation, PCAP replay, HTTP normalization, and stream/depth behavior were not tested.",
      "false_positives": "Authorized probes, copied labels, and source/training uploads containing the combined tokens.",
      "blind_spots": "TLS visibility, HTTP inspector and request-body depth, truncation, encodings, changed labels, and altered code tokens. Check local SID collisions and HOME_NET. Keep as an investigation alert until locally validated.",
      "sources": [
        "https://docs.snort.org/rules/options/general/service",
        "https://docs.snort.org/rules/options/payload/http/header",
        "https://docs.snort.org/rules/options/payload/http/body",
        "https://docs.snort.org/rules/options/payload/pcre"
      ]
    },
    {
      "id": "defender-runtime",
      "source_labels": ["DeviceProcessEvents schema","DeviceInfo schema","Kusto matches regex operator"],
      "title": "Microsoft Defender XDR: PHP worker child processes",
      "language": "kusto",
      "filename": "defender-php-worker-child.kql",
      "purpose": "Translate the runtime hunt to Defender Advanced Hunting.",
      "telemetry": "DeviceProcessEvents: InitiatingProcessFileName is the parent basename, FileName is the child basename. DeviceInfo supplies DeviceId and OSPlatform for Linux scoping. Requires applicable onboarded endpoint telemetry.",
      "logic": "Seven-day Linux device set and ProcessCreated records; exact PHP-worker basename pattern plus the seven shell/downloader basenames. Returns process IDs, command lines, device, and event identifiers.",
      "validation": "Field names and query operators checked against official documentation; tenant compilation/execution not performed. The shared process predicate has local fixtures, not a Defender-engine test.",
      "false_positives": "Expected application shell/download tasks; investigate the service baseline and process command line.",
      "blind_spots": "Missing/stale DeviceInfo, renamed processes, absent ancestry, wrappers, grandchildren, and execution without these child tools. Defender endpoint tables are not a universal HTTP request-body schema.",
      "sources": [
        "https://learn.microsoft.com/en-us/defender-xdr/advanced-hunting-deviceprocessevents-table",
        "https://learn.microsoft.com/en-us/defender-xdr/advanced-hunting-deviceinfo-table",
        "https://learn.microsoft.com/en-us/kusto/query/matches-regex-operator"
      ]
    },
    {
      "id": "splunk-http",
      "source_labels": ["Splunk CIM Web fields"],
      "title": "Splunk CIM: PHP2Shell User-Agent",
      "language": "spl",
      "filename": "splunk-web-php2shell-label.spl",
      "purpose": "Translate the HTTP label hunt to Splunk CIM Web data.",
      "telemetry": "CIM Web-tagged events with http_user_agent, src, dest, http_method, url, and status. Add verified index/sourcetype restrictions for your deployment.",
      "logic": "Search seven days of tag=web records for the case-insensitive php2shell substring in http_user_agent; retain request context.",
      "validation": "CIM field mapping and SPL search form reviewed against official documentation. Splunk parser/tenant execution was not performed.",
      "false_positives": "Authorized testing, research scanners, copied labels, and log replay.",
      "blind_spots": "Absent CIM extraction/tags, unlabelled requests, and body-only behavior. A status code does not prove exploitation.",
      "sources": [
        "https://help.splunk.com/en/data-management/common-information-model/6.3/data-models/web"
      ]
    },
    {
      "id": "splunk-runtime",
      "source_labels": ["Splunk CIM Endpoint fields"],
      "title": "Splunk CIM: PHP worker child processes",
      "language": "spl",
      "filename": "splunk-php-worker-child.spl",
      "purpose": "Translate the runtime predicate to CIM Endpoint.Processes fields.",
      "telemetry": "CIM process/report tags with parent_process_path and process_path. The process field is the command line. Verify and apply your deployment's Linux os values or restrict to a known Linux process source; the provided query does not apply an OS filter.",
      "logic": "Seven-day event search with case-sensitive full-path basename regexes for a direct PHP worker and the seven child tools. Returns host, user, process IDs, paths, and command line.",
      "validation": "Official CIM process tags and fields reviewed; shared local predicate fixtures passed. SPL compilation and tenant execution were not performed.",
      "false_positives": "Legitimate process-launch features. Without local Linux scoping, similar Unix process paths may also match.",
      "blind_spots": "Unmapped tags/paths, missing parent telemetry, wrappers, renamed files, grandchildren, and non-child execution. An empty search is not evidence that the service was safe.",
      "sources": [
        "https://help.splunk.com/en/splunk-cloud-platform/common-information-model/6.0/data-models/endpoint"
      ]
    },
    {
      "id": "falcon-runtime",
      "title": "CrowdStrike Falcon LogScale: PHP worker child processes",
      "language": "logscale",
      "filename": "falcon-php-worker-child.logscale",
      "purpose": "Translate the runtime hunt to native Falcon process telemetry.",
      "telemetry": "ProcessRollup2 with event_platform=Lin; ParentBaseFileName is the parent basename and ImageFileName is the child path. Requires a Falcon repository retaining these native fields.",
      "logic": "Case-sensitive PHP-worker parent and shell/downloader child regexes; returns aid, device name, parent/child IDs, path, and command line. Choose the hunt interval in the time picker.",
      "validation": "Official Falcon/LogScale field and query examples reviewed. Local shared process fixtures are not a LogScale parser test; Falcon tenant execution was not performed.",
      "false_positives": "Known PHP service behavior that intentionally launches shells or download utilities.",
      "blind_spots": "Missing or transformed native fields, absent ancestry, renamed tools, wrappers, grandchildren, and the table limit of 1,000 results. This is LogScale syntax, not legacy Falcon Splunk Event Search.",
      "sources": [
        "https://library.humio.com/integrations/integrations-crowdstrike-fltr-core-crowdstrike-fltr-core.html",
        "https://library.humio.com/integrations/integrations-crowdstrike-fltr-tutorial-crowdstrike-fltr-tutorial.html"
      ],
      "source_labels": [
        "Falcon process-query examples",
        "Falcon process fields and event tags"
      ]
    },
    {
      "id": "sumo-http",
      "source_labels": ["Sumo Apache access parser","Sumo Apache field extraction","Sumo matches operator"],
      "title": "Sumo Logic: Apache access-log User-Agent",
      "language": "sumo",
      "filename": "sumo-web-php2shell-label.sumo",
      "purpose": "Translate the HTTP label hunt using Sumo's documented Apache access parser.",
      "telemetry": "Apache access logs compatible with public/apache/access. The query uses user_agent, src_ip, method, url, and status_code. Adapt the example source selectors to your own logs and set the hunt time range.",
      "logic": "Parse the access record, then match the case-insensitive php2shell substring only in user_agent; return request context.",
      "validation": "Parser fields and matches syntax checked against official Sumo documentation. Sumo tenant parsing/execution was not performed.",
      "false_positives": "Authorized scanners, copied labels, research, and log replay.",
      "blind_spots": "Missing UA or incompatible log format; the Apache parser does not supply request bodies or EDR ancestry. This translation covers HTTP telemetry; it does not query endpoint process events.",
      "sources": [
        "https://www.sumologic.com/help/docs/search/get-started-with-search/suggested-searches/apache-access-parser/",
        "https://www.sumologic.com/help/docs/manage/field-extractions/fer-templates/apache-access-logs/",
        "https://www.sumologic.com/help/docs/search/search-query-language/search-operators/matches/"
      ]
    },
    {
      "id": "splunk-shared-outbound",
      "source_labels": ["Splunk CIM Network Traffic fields","Splunk search comments"],
      "title": "Splunk CIM: traffic to the shared download address",
      "language": "spl",
      "filename": "splunk-shared-loader-outbound.spl",
      "purpose": "Find destination-IP matches across protocols and ports without dropping records with missing direction.",
      "telemetry": "CIM Network Traffic events tagged network and communicate with dest_ip. Scope to relevant network/egress sources. Direction is relative to the reporting device and may be absent or n/a.",
      "logic": "Seven-day exact destination-IP match. The outbound filter is commented out; enable it only after validating local direction mapping. Review direction, action, and bytes_out; inbound or unknown-direction rows can match, and a result does not prove /sh was downloaded or run.",
      "validation": "CIM fields and SPL comment syntax checked against official documentation; synthetic fixtures cover the default and optional outbound predicates separately. No Splunk tenant or network replay test.",
      "false_positives": "Authorized investigation or testing, shared hosting, address reassignment, and stale indicators. Confirm the time window and ownership context.",
      "blind_spots": "Missing CIM tags/dest_ip extraction, NAT or proxy destinations, rotated addresses, and unlogged traffic. Enabling the optional filter excludes missing direction. The address is an observed submitted destination, not a confirmed C2 role.",
      "sources": [
        "https://help.splunk.com/en/data-management/common-information-model/6.3/data-models/network-traffic",
        "https://help.splunk.com/en/splunk-enterprise/search/search-manual/9.4/using-the-search-app/add-comments-to-searches"
      ]
    },
    {
      "id": "defender-shared-network",
      "source_labels": ["DeviceNetworkEvents schema"],
      "title": "Microsoft Defender XDR: shared-address network events and process context",
      "language": "kusto",
      "filename": "defender-shared-loader-network.kql",
      "purpose": "Pivot from the shared address to the device, initiating process, parent, and command line.",
      "telemetry": "DeviceNetworkEvents from applicable Defender for Endpoint devices. This table supplies RemoteIP and initiating-process context; it does not provide a universal HTTP User-Agent or response-body field.",
      "logic": "Seven-day exact RemoteIP match without filtering platform or action. Inspect ActionType using the portal schema to establish event direction and outcome; failed or inbound events can also be returned.",
      "validation": "Fields reviewed against Microsoft documentation; six inert local destination predicates passed. No Defender tenant compilation or execution.",
      "false_positives": "Authorized investigation, security tests, shared infrastructure, and address reassignment. Review the originating process and event outcome.",
      "blind_spots": "Unonboarded devices, unavailable Linux network events, proxies, rotated addresses, missing process fields, and retention gaps. A matching event does not establish a completed download, execution, or malware family.",
      "sources": [
        "https://learn.microsoft.com/en-us/defender-xdr/advanced-hunting-devicenetworkevents-table"
      ]
    },
    {
      "id": "sigma-loader-vector",
      "source_labels": ["Sigma rule specification"],
      "title": "Sigma: loader pipeline or SCP remote path",
      "language": "yaml",
      "filename": "sigma-linux-loader-pipe-vector.yml",
      "purpose": "Find the vector-bearing curl/wget-to-sh pattern or the SCP remote operand present in retained command text.",
      "telemetry": "Linux process-creation events with complete CommandLine. The pipeline is usually in a shell -c event; a downloader child may omit it. The SCP branch can match the scp process command line.",
      "logic": "Match either a curl/wget pipe to sh -s with apache, ssh, telnet, or php2shell, OR scp with a dlr@HOST:sh remote operand. The SCP account and basename are constrained; the host is unrestricted. SCP token boundaries exclude suffix lookalikes and do not cross command separators, but cannot establish transfer direction; uploads can also match. The pipeline remains a text pattern, not shell parsing.",
      "validation": "Parsed with pySigma 2.0.1 and checked against inert positive/negative strings. Retained incoming command text checks verify pattern coverage, not process execution. No Sigma backend conversion, shell execution, or EDR tenant test.",
      "false_positives": "Authorized installers, SCP transfers using the same account/basename, quoted command examples, tests, and log replay. This is text correlation, not shell parsing.",
      "blind_spots": "Truncation, child-only pipeline records, alternate shells, encoding, renamed tools, changed flags/vector names, and alternate SCP user/path/URI/IPv6 forms. Neither branch identifies an operator, CVE, or successful transfer.",
      "sources": [
        "https://sigmahq.io/sigma-specification/specification/sigma-rules-specification.html"
      ]
    },
    {
      "id": "sigma-libredtail-http",
      "source_labels": ["Sigma rule specification"],
      "title": "Sigma: libredtail-http User-Agent",
      "language": "yaml",
      "filename": "sigma-web-libredtail-user-agent.yml",
      "purpose": "Find the caller-supplied label seen in the linked HTTP traversal requests.",
      "telemetry": "Parsed incoming web-server or reverse-proxy User-Agent mapped to cs-user-agent; the same field mapping as the PHP2Shell label rule.",
      "logic": "Case-insensitive libredtail-http substring match within the parsed User-Agent. Return source, method, and path for review.",
      "validation": "Parsed with pySigma 2.0.1; six inert local predicate fixtures passed. No Sigma backend conversion or tenant test.",
      "false_positives": "Authorized research, copied headers, security testing, and replay. A label alone cannot establish RedTail family identity.",
      "blind_spots": "Absent or changed User-Agent, incompatible log parsing, and body-only activity. This rule does not cover the later PHP-tagged downloader, whose User-Agent was absent.",
      "sources": [
        "https://sigmahq.io/sigma-specification/specification/sigma-rules-specification.html"
      ]
    },
    {
      "id": "sigma-apache-child",
      "source_labels": ["PHP OOM advisory","Sigma log-source guidance"],
      "title": "Sigma: Apache starts a shell or downloader",
      "language": "yaml",
      "filename": "sigma-linux-apache-child.yml",
      "purpose": "Add a separate, noisier Apache runtime hunt for deployments that may use mod_php.",
      "telemetry": "Linux process-creation events with full Image and direct ParentImage paths. Confirm mod_php separately through inventory; apache2/httpd names alone do not identify a loaded module.",
      "logic": "An apache2 or httpd parent directly creates sh, bash, dash, ksh, zsh, curl, or wget. Kept separate from the PHP-worker rule because Apache's legitimate subprocess behavior differs.",
      "validation": "Parsed with pySigma 2.0.1; eight inert local predicate fixtures passed. No backend conversion, EDR deployment, or exploit test.",
      "false_positives": "CGI handlers, expected application subprocesses, piped log helpers, and administration. Baseline by server and application before alerting.",
      "blind_spots": "Wrappers, grandchildren, renamed executables, busybox, missing ancestry, and execution without a new child. A result is generic process behavior, not proof of mod_php exploitation.",
      "sources": [
        "https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w",
        "https://sigmahq.io/docs/basics/log-sources.html"
      ]
    },
    {
      "id": "splunk-worker-errors",
      "source_labels": ["PHP stale-state advisory","PHP-FPM configuration","FPM child-exit logging source","Apache child-exit logging source","Splunk comparison functions","Splunk bin command","PHP 7.4.33 allocator source","PHP 8.4.26 allocator source","PHP 8.4.27 FPM startup source"],
      "title": "Splunk: PHP memory errors, timeouts, and worker exits",
      "language": "spl",
      "filename": "splunk-php-worker-errors.spl",
      "purpose": "Review PHP memory-limit/allocator messages, timeouts, FPM signal-11 or code-255 exits, and Apache child segmentation faults.",
      "telemetry": "Raw PHP/FPM/Apache error-log records with _raw, _time, host, and source. The source globs are examples; replace them with verified local sources and include journald or container logs where applicable.",
      "logic": "Classifies six message patterns into distinct families and counts messages in five-minute bins per host and source. Code 255 is generic, not an OOM or request-startup diagnosis. Compare bins with normal behavior and nearby requests; no universal alert threshold is applied.",
      "validation": "SPL syntax and message forms checked against PHP/Apache source, with synthetic predicate tests. Allocated-form OOM text is verified in PHP 7.4.33 (without bytes) and 8.4.26 (with bytes); both forms are covered. These are source-supported fixtures, not observed runtime messages from this research; real-log parsing, source selection, binning, and aggregation need tenant validation.",
      "false_positives": "Application bugs, expensive legitimate requests, memory pressure, extension faults, normal load changes, and duplicated log forwarding.",
      "blind_spots": "Disabled, truncated, or differently formatted logs; uncollected container/kernel events; bare OOM and newer hard-limit wording; failures before logging. Versions/builds differ. Counts are messages, not distinct crashes; no CVE or exploitation verdict.",
      "sources": [
        "https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp",
        "https://www.php.net/manual/en/install.fpm.configuration.php",
        "https://raw.githubusercontent.com/php/php-src/PHP-8.5/sapi/fpm/fpm/fpm_children.c",
        "https://raw.githubusercontent.com/apache/httpd/2.4.x/server/mpm_unix.c",
        "https://help.splunk.com/en/splunk-enterprise/search/spl-search-reference/9.4/evaluation-functions/comparison-and-conditional-functions",
        "https://help.splunk.com/en/splunk-enterprise/search/spl-search-reference/9.4/search-commands/bin",
        "https://raw.githubusercontent.com/php/php-src/php-7.4.33/Zend/zend_alloc.c",
        "https://raw.githubusercontent.com/php/php-src/php-8.4.26/Zend/zend_alloc.c",
        "https://raw.githubusercontent.com/php/php-src/php-8.4.27/sapi/fpm/fpm/fpm_main.c"
      ]
    }
  ]
}
