heroui logo

Potential PHP Reverse Shell

Sigma Rules

View Source
Summary
This rule aims to detect potential PHP reverse shell attacks by monitoring the execution of PHP scripts through the PHP Command Line Interface (CLI) with the '-r' flag, which enables the execution of inline PHP code. The rule focuses specifically on calls to the 'fsockopen' function, a commonly used function in reverse shells to establish socket connections. The detection logic captures instances where the 'fsockopen' function is invoked alongside the '-r' argument in command line executions, which could indicate malicious activity attempting to create a backdoor or reverse shell. This type of behavior is often combined with other commands like 'exec' or 'fopen' to manipulate system processes and connect to an attacker's server. Given that PHP is prevalent in web environments, especially on Linux servers, this detection rule is critical for identifying and mitigating potential threats before they can escalate.
Categories
  • Linux
  • Web
  • Endpoint
Data Sources
  • Process
Created: 2023-04-07