Detect Laravel Livewire Code Injection (CVE-2025-54068) in Microsoft Sentinel
Detects exploitation of CVE-2025-54068, a code injection vulnerability in Laravel Livewire. This KEV-listed vulnerability allows attackers to inject and execute arbitrary PHP code through Livewire component handling, potentially leading to remote code execution on affected Laravel applications.
MITRE ATT&CK
- Tactic
- Initial Access Execution Persistence
KQL Detection Query
union DeviceNetworkEvents, DeviceProcessEvents, DeviceFileEvents
| where TimeGenerated > ago(24h)
| where (ActionType in ("HttpRequestReceived", "NetworkConnectionFound") and (RemoteUrl contains "/livewire/message" or RemoteUrl contains "/livewire/upload-file")) or (FileName endswith ".php" and FolderPath contains "livewire" and InitiatingProcessCommandLine contains "eval(")
| extend SuspiciousPayload = extract(@"(eval\(|base64_decode\(|system\(|exec\(|shell_exec\(|passthru\()", 0, tostring(AdditionalFields))
| where isnotempty(SuspiciousPayload) or (ActionType == "HttpRequestReceived" and toint(ResponseCode) between (200 .. 299) and (RequestBody contains "eval(" or RequestBody contains "base64_decode(" or RequestBody contains "__construct" or RequestBody contains "$this->" and RequestBody contains "system("))
| project TimeGenerated, DeviceName, ActionType, RemoteUrl, RemoteIP, InitiatingProcessAccountName, SuspiciousPayload, AdditionalFields
| order by TimeGenerated desc Detects HTTP requests to Laravel Livewire endpoints containing code injection payloads and suspicious PHP function calls indicative of CVE-2025-54068 exploitation.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate Livewire component updates containing complex PHP object serialization
- Security scanners or penetration testing tools probing Livewire endpoints
- Development environments with debug-mode Livewire payloads
Other platforms for CVE-2025-54068
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1CVE-2025-54068 Basic eval() Injection via Livewire Message Endpoint
Expected signal: HTTP POST to /livewire/message with base64-encoded payload containing system() call; PHP process may log eval() warning; web server logs capture anomalous request body.
- Test 2CVE-2025-54068 Shell Command Execution via Livewire Injection
Expected signal: Process creation event: php or php-fpm spawning /bin/sh with argument 'id > /tmp/pwned'; file creation event at /tmp/pwned; web server access log entry for the crafted POST.
- Test 3CVE-2025-54068 Webshell Deployment Simulation
Expected signal: File creation event for shell.php in public/ directory initiated by php-fpm or web server process; subsequent HTTP GET requests to /shell.php with command parameters.
Unlock Pro Content
Get the full detection package for CVE-2025-54068 including response playbook, investigation guide, and atomic red team tests.