title: PHP2Shell - Cron File Written by PHP Worker or Web Server Account
id: 84cddda0-b406-4269-b52d-2899ba122c66
status: experimental
description: |
  Detects creation or modification of system or per-user cron files (/etc/crontab, /etc/cron.*, /var/spool/cron)
  by a PHP / web worker process or by the web server account, as persistence after CVE-2026-109618 /
  CVE-2026-109619 exploitation (CISA KEV, forensicTriage Yes). Behavioural only, no IOCs.
  UNVERIFIED FIELD: User in file_event is emitted by Sysmon for Linux but not by every source; file_event
  coverage of these paths depends on your sensor configuration. Shell children of a worker are not visible in
  file_event (no parent field), so pair with the crontab and worker-shell rules.
references:
  - https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
  - https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
  - https://www.cisa.gov/news-events/alerts/2026/10/21/critical-vulnerabilities-php-require-immediate-patching
  - https://www.cisa.gov/news-events/directives/bod-26-04-implementation-guidance-prioritizing-security-updates-based-risk
author: Cybaverse
date: 2026-10-26
tags:
  - attack.persistence
  - attack.t1053.003
  - cve.2026-109618
  - cve.2026-109619
logsource:
  product: linux
  category: file_event
detection:
  cron_path:
    - TargetFilename: '/etc/crontab'
    - TargetFilename|startswith:
        - '/etc/cron.d/'
        - '/etc/cron.hourly/'
        - '/etc/cron.daily/'
        - '/etc/cron.weekly/'
        - '/etc/cron.monthly/'
        - '/var/spool/cron/'
  web_process:
    Image|contains:
      - '/php-fpm'
      - '/php-cgi'
      - '/lsphp'
      - '/frankenphp'
      - '/httpd'
      - '/apache2'
  web_user:
    User:  # UNVERIFIED FIELD
      - 'www-data'
      - 'apache'
      - 'nginx'
      - 'http'
      - 'wwwrun'
      - 'nobody'
      - 'litespeed'
      - 'caddy'
  condition: cron_path and (web_process or web_user)
falsepositives:
  - Hosting panels or applications that install crontabs for the web user
level: high
