Possible PHP Reverse Shell (via process_creation)

This rule detects use of the PHP CLI with the "-r" flag which enables it to run inline PHP code. The rule looks for calls to the "fsockopen" function which enables the creation of sockets. Attackers frequently abuse this in combination with functions such as "exec" or "fopen" to initiate a reverse shell connection.

SigmahighLinuxv1
Full detection rule

Unlock this rule to view and copy it

Rule logic is available with an unlock credit. The public page keeps its context, mappings and implementation details visible.

Sign in to unlock

Known false positives

  • Unknown

Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.