Step 1: Authentication: The attacker must first authenticate to the Nagios XI web interface. This requires valid credentials.
Step 2: Payload Delivery: The attacker crafts a malicious request to schedulereport.php. The id parameter within this request is crafted to include shell metacharacters and the desired OS command (e.g., id; whoami).
Step 3: Command Injection: The schedulereport.php script processes the request. Due to the lack of input validation, the shell metacharacters in the id parameter are not escaped or filtered.
Step 4: Command Execution: The script constructs and executes a system command that includes the attacker-supplied id parameter. The shell interprets the metacharacters, executing the attacker's command.
Step 5: Result Retrieval (Optional): Depending on the command, the attacker might retrieve the results of their command execution, potentially through a file write, network connection, or other means.