Join our Newsletter — 33% off our NHI Course
Home› FAQ› Threats, Abuse & Incident Response› How do I detect PHP2Shell exploitation?
Threats, Abuse & Incident Response

How do I detect PHP2Shell exploitation?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated November 3, 2026 Domain: Threats, Abuse & Incident Response

Start with web server, PHP and application logs for unusual unauthenticated requests to PHP endpoints. Then look for follow-on activity: unexpected processes or shell commands started by the web server or PHP workers, new or changed files in web directories, new accounts, and outbound connections from web hosts. Review activity since the first advisories on 21 October 2026, not just the last few days.

What to look for in logs when PHP2Shell is being used

Detection starts with the request trail. Review web server, PHP and application logs for unauthenticated or unusual requests to PHP endpoints, especially requests that do not fit normal application paths, user agents or parameter patterns. The goal is to separate ordinary traffic from request patterns that align with exploitation attempts and the first stage of payload delivery.

Use the earliest plausible exposure window, not just the most recent logs. For PHP2Shell, that means reviewing activity since the first advisories on 21 October 2026 so you do not miss a low-and-slow compromise that began before the incident was recognised.

A useful anchor for that timeline is the CISA Known Exploited Vulnerabilities Catalog, which is the right place to confirm whether your triage window should include active exploitation handling rather than routine patch tracking.

What host-level signs suggest exploitation succeeded

If the initial request path is suspicious, shift quickly to host evidence. Look for unexpected processes or shell commands spawned by the web server or PHP workers, because PHP exploitation often moves from an inbound request to command execution on the server. Also check for changes in web directories, dropped files, temporary scripts, modified application content and unfamiliar scheduled activity.

File-system and process evidence are stronger than request logs alone because they show whether the attack progressed from probing to execution. That matters when the attacker used a short-lived payload, cleared web logs or blended into normal application behaviour after the first request.

For a broader exploitation workflow, the NIST Cybersecurity Framework 2.0 is a useful detection-and-response reference for turning those signs into a repeatable hunt and containment process.

How to confirm scope and follow-on activity

After the first signs of compromise, expand the hunt beyond the web tier. Check for new accounts, privilege changes, lateral movement indicators and outbound connections from web hosts to unknown destinations. Egress traffic is especially important because PHP-based exploitation often turns a local execution event into remote staging, exfiltration or interactive control.

Correlate authentication events, service changes and outbound sessions across the same time window. If the web server began making unusual external connections shortly after suspicious PHP requests, treat that as possible post-exploitation activity even if the application still appears to function normally.

When you need a practical prioritisation model for confirmed exploitation, the SSVC Guide and the Zero-Day and Exploited Vulnerabilities Guide help frame whether to move from monitoring to emergency response and post-patch hunting.

Risk and Threat Considerations

PHP2Shell-style exploitation is risky because the initial signal can be small while the blast radius is large. A single web request can lead to command execution under the web server context, after which the attacker may modify files, create accounts, establish persistence or pivot outward from the compromised host.

Failure mechanism: The attacker abuses a PHP-facing weakness to move from unauthenticated request handling into server-side execution, then uses that foothold to alter web content, spawn processes and create outbound control channels.

Impact: Successful exploitation can expose application data, disrupt the web service, enable further compromise of adjacent systems and leave behind artefacts that are easy to miss if you only review the most recent logs.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK addresses the attack and risk surface, while NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0DE.CM-01 — Monitoring for Anomalies and EventsDetect suspicious PHP requests and follow-on host activity.
RS.AN-01 — Investigations Are PerformedThe question is about validating exploitation and scoping compromise.
Recommendation — Monitor web, PHP and host logs for anomalous requests and execution traces. Investigate correlated request, process, file and egress evidence to confirm scope.
CIS Controls v8CIS-8 — Audit Log ManagementLog review is central to detecting PHP2Shell exploitation.
Recommendation — Centralise and review web, PHP and host logs for exploit indicators.
MITRE ATT&CKT1190 — Exploit Public-Facing ApplicationPHP2Shell begins with exploitation of a web-exposed PHP application.
T1059 — Command and Scripting InterpreterSuccessful exploitation often leads to shell command execution.
Recommendation — Map suspicious requests and payload delivery to public-facing application exploitation. Hunt for spawned shells and script interpreters after suspicious PHP requests.

Practitioner Guidance

What to prioritise: Start with the earliest suspicious request window, then pivot immediately to process creation, file changes and egress traffic on the same host. If you only inspect web logs, you may confirm probing but miss the actual compromise.

What to verify: Confirm whether suspicious PHP requests were followed by shell activity, new files in web roots or new local accounts. If those follow-on events exist, treat the case as a host compromise, not just an exploit attempt.

Practitioner takeaway: The best PHP2Shell hunt joins request evidence to host evidence, because exploitation is only operationally important once the request has turned into execution, persistence or outbound control.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 3, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org