{"id":"d81871ef-5738-47ab-9797-7a9c90cd4bfb","title":"Php Inline Command Execution","description":"Detects execution of php using the \"-r\" flag. This is could be used as a way to launch a reverse shell or execute live php code.","author":"Nasreddine Bencherchali (Nextron Systems)","status":"test","level":"medium","date":"2023-01-02","modified":"","tags":["attack.execution","attack.t1059"],"technique_ids":["T1059"],"logsource":{"category":"process_creation","product":"windows"},"falsepositives":["Unknown"],"references":["https://www.php.net/manual/en/features.commandline.php","https://www.revshells.com/","https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet"],"source_path":"rules/windows/process_creation/proc_creation_win_php_inline_command_execution.yml","source_sha256":"8e9f91352f02b40fafb25c2f925b9523344a80e66a43811a7cff6ad03907597c","source_url":"https://github.com/anpa1200/sigma/blob/b249e9683190cffdcaf188ccbfb90bf4759844e1/rules/windows/process_creation/proc_creation_win_php_inline_command_execution.yml","license":"Detection Rule License 1.1","license_url":"https://github.com/SigmaHQ/Detection-Rule-License/blob/main/LICENSE.Detection.Rules.md","yaml":"title: Php Inline Command Execution\nid: d81871ef-5738-47ab-9797-7a9c90cd4bfb\nstatus: test\ndescription: Detects execution of php using the \"-r\" flag. This is could be used as a way to launch a reverse shell or execute live php code.\nreferences:\n    - https://www.php.net/manual/en/features.commandline.php\n    - https://www.revshells.com/\n    - https://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet\nauthor: Nasreddine Bencherchali (Nextron Systems)\ndate: 2023-01-02\ntags:\n    - attack.execution\n    - attack.t1059\nlogsource:\n    category: process_creation\n    product: windows\ndetection:\n    selection_img:\n        - Image|endswith: '\\php.exe'\n        - OriginalFileName: 'php.exe'\n    selection_cli:\n        CommandLine|contains: ' -r'\n    condition: all of selection_*\nfalsepositives:\n    - Unknown\nlevel: medium\n","validation":"yaml_parsed_not_backend_compiled_or_live_validated","techniques":[{"key":"enterprise/T1059","id":"T1059","name":"Command and Scripting Interpreter","page":"techniques/enterprise/T1059/"}],"data_path":"data/detection-rules/d81871ef-5738-47ab-9797-7a9c90cd4bfb.json","kind":"sigma"}
