title: PHP2Shell - PHP File Written to a Windows Web Root by PHP or the Web Server
id: 6f1b9d42-8c3e-4a75-91d0-2e7a4c6b8f51
status: experimental
description: |
  Windows counterpart of the Linux web root rule: php.exe, php-cgi.exe, httpd.exe, w3wp.exe or a shell
  writing .php / .phtml / .phar files under IIS, XAMPP or WAMP web roots (possible web shell).
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
author: Cybaverse
date: 2026-10-26
tags:
  - attack.persistence
  - attack.t1505.003
  - cve.2026-109618
  - cve.2026-109619
logsource:
  product: windows
  category: file_event
detection:
  webroot:
    TargetFilename|contains:
      - '\inetpub\wwwroot\'
      - '\htdocs\'
      - '\www\'
  ext:
    TargetFilename|endswith:
      - '.php'
      - '.phtml'
      - '.phar'
  writer:
    Image|endswith:
      - '\php.exe'
      - '\php-cgi.exe'
      - '\httpd.exe'
      - '\w3wp.exe'
      - '\cmd.exe'
      - '\powershell.exe'
      - '\curl.exe'
  condition: webroot and ext and writer
falsepositives:
  - CMS self-updates and template caches
level: medium
