Don’t let overlooked obligations become incidents. Learn how.
Utility navigation bar redirect icon
Portal LoginSupportContact
Search
Close search
Huntress Logo in Teal
  • Platform Overview
    Managed EDR

    Get full endpoint visibility, detection, and response.

    Managed EDR

    Get full endpoint visibility, detection, and response.

    Managed ITDR

    Protect your Microsoft 365 and Google Workspace identities and email environments.

    Managed ITDR

    Protect your Microsoft 365 and Google Workspace identities and email environments.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed SIEM

    Managed threat response and robust compliance support at a predictable price.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Managed Security Awareness Training

    Empower your teams with science-backed security awareness training.

    Managed ISPM

    Continuous Microsoft 365 and identity hardening, managed and enforced by Huntress experts.

    Managed ISPM

    Continuous Microsoft 365 and identity hardening, managed and enforced by Huntress experts.

    Managed ESPM

    Proactively secure endpoints against attacks.

    Managed ESPM

    Proactively secure endpoints against attacks.

    Integrations
    Integrations
    Support Documentation
    Support Documentation
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
    See Huntress in Action

    Quickly deploy and manage real-time protection for endpoints, email, and employees - all from a single dashboard.

    Huntress Cybersecurity
  • Threats We Stop
    Phishing
    Phishing
    Business Email Compromise
    Business Email Compromise
    Ransomware
    Ransomware
    Infostealers
    Infostealers
    View Allright arrowView Allright arrow
    Industries We Serve
    Education
    Education
    Financial Services
    Financial Services
    State and Local Government
    State and Local Government
    Healthcare
    Healthcare
    Law Firms
    Law Firms
    Manufacturing
    Manufacturing
    Utilities
    Utilities
    View Allright arrowView Allright arrow
    Tailored Solutions
    MSPs
    MSPs
    Resellers
    Resellers
    SMBs
    SMBs
    Compliance
    Compliance
    What Gets Overlooked Gets Exploited

    Most days, nothing happens. But one day, something will.

    Huntress Cybersecurity
    Cybercriminals Have Evolved

    Get the intel on today’s cybercriminal groups and learn how to protect yourself.

    Huntress Cybersecurity
  • Pricing
  • Community Series
    The Product Lab

    Shape the next big thing in cybersecurity together.

    The Product Lab

    Shape the next big thing in cybersecurity together.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Fireside Chat

    Real people. Real perspectives. Better conversations.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    Tradecraft Tuesday

    No products, no pitches – just tradecraft.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    _declassified

    Exposing hidden truths in the world of cybersecurity.

    Resources
    Upcoming Events
    Upcoming Events
    Ebooks
    Ebooks
    On-Demand Webinars
    On-Demand Webinars
    Videos
    Videos
    Whitepapers
    Whitepapers
    Datasheets
    Datasheets
    Cybersecurity Education
    Cybersecurity 101
    Cybersecurity 101
    Cybersecurity Guides
    Cybersecurity Guides
    Threat Library
    Threat Library
    Real Tradecraft, Real Results
    Real Tradecraft, Real Results
    2026 Cyber Threat Report
    2026 Cyber Threat Report
    The Huntress Blog
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    Huntress Lands on the Microsoft Marketplace
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    How Huntress & DEFCERT Are Streamlining CMMC Assessment Prep
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
    Live Hacking Into Microsoft 365 with Kyle Hanslovan
    Huntress Cybersecurity
  • Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    Why Huntress

    Go beyond AI in the fight against today’s hackers with Huntress Managed EDR purpose-built for your needs

    Huntress Cybersecurity
    The Huntress SOC

    24/7 Security Operations Center

    The Huntress SOC

    24/7 Security Operations Center

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Reviews

    Why businesses of all sizes trust Huntress to defend their assets

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Case Studies

    Learn directly from our partners how Huntress has helped them

    Community

    Get in touch with the Huntress Community team

    Community

    Get in touch with the Huntress Community team

    Compare Huntress
    Bitdefender
    Bitdefender
    Blackpoint
    Blackpoint
    Breach Secure Now!
    Breach Secure Now!
    Crowdstrike
    Crowdstrike
    Datto
    Datto
    SentinelOne
    SentinelOne
    Sophos
    Sophos
    Compare Allright arrowCompare Allright arrow
  • HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    HUNTRESS HUB

    Login to access top-notch marketing resources, tools, and training.

    Huntress Cybersecurity
    Partners
    MSPs

    Join our partner community to deliver expert-led managed security.

    MSPs

    Join our partner community to deliver expert-led managed security.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Resellers

    Partner program designed to grow your cybersecurity business.

    Tech Alliances

    Driving innovation through global technology Partnerships

    Tech Alliances

    Driving innovation through global technology Partnerships

    Microsoft Partnership

    A Level-Up for Your Business Security

    Microsoft Partnership

    A Level-Up for Your Business Security

  • Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Press Release
    Huntress Announces Collaboration with Microsoft to Strengthen Cybersecurity for Businesses of All Sizes
    Huntress Cybersecurity
    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Our Story

    We're on a mission to shatter the barriers to enterprise-level security.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Newsroom

    Explore press releases, news articles, media interviews and more.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Meet the Team

    Founded by former NSA Cyber Operators. Backed by security researchers.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Careers

    Ready to shake up the cybersecurity world? Join the hunt.

    Awards
    Awards
    Contact Us
    Contact Us
  • Portal Login
  • Support
  • Contact
  • Search
  • Get a Demo
  • Start for Free
Portal LoginSupportContact
Search
Close search
Get a Demo
Start for Free
HomeThreat LibraryMalware
PHP Webshell

PHP Webshell Malware

Published date: 10/07/2025

Written by: Lizzie Danielson

Glitch effectGlitch effect

A PHP webshell is a malicious script that gives attackers a back door into your web server. Once uploaded, it acts as a command-and-control interface, letting threat actors browse your file system, upload more malware, steal data, or even take over the server completely. It’s a sneaky and dangerous tool used to maintain persistent access and escalate attacks.


What is PHP Webshell Malware?

A PHP webshell is a type of malware that provides attackers with remote administration of a web server. It's not a virus or a specific named strain but rather a malicious tool written in the PHP programming language. Because PHP powers a huge percentage of websites (think WordPress, Joomla, and Drupal), PHP webshells are a widespread and persistent threat.

Once an attacker successfully uploads a webshell script to a server, they can access it through a web browser. This gives them a powerful, web-based interface to execute commands, manipulate files, and pivot deeper into a network. Popular webshells like C99, R57, and B374K offer extensive features, turning a compromised server into a launchpad for further malicious activities. The threat level is high because a successful webshell attack can lead to complete server compromise, data exfiltration, and lateral movement across an organization's infrastructure.


When was PHP Webshell First Discovered?

Webshells aren't a new phenomenon; they've been around for as long as web servers have existed. The concept dates back to the late 1990s and early 2000s, evolving alongside web technologies. Early versions were simple scripts, but they have since become highly sophisticated, with obfuscated code and advanced functionalities. There isn't a single "discovery" date for PHP webshells as a category, but their use has been documented by security researchers for over two decades.


Who Created PHP Webshell?

There is no single creator of PHP webshells. They are tools developed by countless individual attackers, penetration testers, and cybercriminal groups. Many popular webshells are open-source or traded on underground forums, allowing any attacker to download, modify, and deploy them. The anonymity of the internet makes it nearly impossible to attribute a specific webshell to a single person or group, though some advanced versions have been linked to state-sponsored threat actors.


What Does PHP Webshell Target?

PHP webshells target any web server running PHP-based applications. This includes a massive range of systems, from personal blogs to large enterprise websites and e-commerce platforms. Content Management Systems (CMS) like WordPress, Joomla, and Drupal are especially frequent targets due to their widespread use and the availability of vulnerable plugins and themes.

Attackers aren't picky; they target any industry or geography with a vulnerable web presence. The goal is to establish a foothold for various nefarious purposes, including:

  • Data theft: Stealing sensitive customer information, financial data, or intellectual property.

  • Hosting malicious content: Using the compromised server to host phishing pages or distribute other malware.

  • DDoS botnets: Enlisting the server into a network of bots to launch Distributed Denial-of-Service attacks.

  • Cryptomining: Hijacking server resources to mine for cryptocurrencies.


PHP Webshell Distribution Method

Attackers use several common methods to upload a PHP webshell onto a target server. The initial infection vector almost always involves exploiting a weakness in the web application or server configuration.

Common distribution methods include:

  • Application Vulnerabilities: Exploiting flaws like SQL injection, Remote File Inclusion (RFI), or Local File Inclusion (LFI) to trick the server into executing code that downloads the webshell.

  • Unrestricted File Uploads: Many websites allow users to upload files (like profile pictures or documents). If not properly configured, attackers can upload a malicious .php file disguised as an image or another benign file type.

  • Weak Credentials: Brute-forcing or using stolen administrator credentials to log into the CMS or server backend and manually upload the webshell.

  • Compromised Plugins or Themes: Using nulled or outdated third-party plugins and themes that contain backdoors or known vulnerabilities.


Technical Analysis of PHP Webshell Malware

Once a PHP webshell is on a server, it lies dormant until the attacker accesses it via a specific URL. The script then executes on the server, presenting the attacker with a control panel in their browser. The webshell runs with the same permissions as the web server's user account (e.g., www-data, apache), which often has broad access to read, write, and execute files within the web root directory.

Attackers often use obfuscation techniques to hide their webshells from detection. This can involve encoding the script in Base64, splitting the code into multiple files, or using innocent-looking filenames like settings.php or cache.php to blend in with legitimate application files. The ultimate goal is persistence—maintaining access for as long as possible without being discovered.


Tactics, Techniques & Procedures (TTPs)

PHP webshells are directly associated with several MITRE ATT&CK techniques, primarily under Persistence and Execution.

  • T1505.003 - Server Software Component: Web Shell: This is the primary technique. The adversary places a webshell on the server to maintain persistent access and execute commands.

  • T1190 - Exploit Public-Facing Application: This technique is often used as the initial access vector to upload the webshell in the first place.

  • T1059 - Command and Scripting Interpreter: Webshells provide an interface to execute shell commands, scripts (like Python or Perl), or PHP functions directly on the server.

  • T1105 - Ingress Tool Transfer: Attackers use the webshell to upload additional tools, backdoors, or ransomware onto the compromised system.


Indicators of Compromise (IoCs)

Detecting webshells can be tricky because they often mimic legitimate traffic. However, there are several IoCs to watch for:

  • Unusual Files: Suspiciously named .php files in upload directories or files with recent modification timestamps that don't correspond to any known development activity.

  • Abnormal Network Traffic: Outgoing connections from the web server to unknown IP addresses or an unusual amount of POST requests to a single PHP file.

  • High Server Resource Usage: Unexplained spikes in CPU or memory usage could indicate the server is being used for activities like cryptomining.

  • Suspicious Log Entries: Web server logs (like Apache's access.log) may show repeated POST requests to a non-standard PHP file from a single IP address.

  • Common Webshell Filenames: Files named c99.php, r57.php, WSO.php, or other known webshell variants.


Malware Guide

Our malware guide shows you how to shut down those infiltration paths before they ever become a crisis.

Read the Malware Guideright arrow

How to Know if You’re Infected with PHP Webshell?

Besides looking for specific IoCs, several symptoms might suggest your server has been compromised with a webshell:

  • Your website is suddenly blacklisted by search engines for hosting malware.

  • You notice new, unauthorized user accounts in your CMS backend.

  • Your website's files have been modified or defaced.

  • You receive complaints from users about strange redirects or pop-ups.

  • Performance is sluggish, and server resources are consistently maxed out.


PHP Webshell Removal Instructions

Removing a webshell requires more than just deleting the malicious file. Attackers often leave behind other backdoors or modified files to regain access.

  • Isolate the Server: Take the compromised server offline immediately to prevent further damage or lateral movement.

  • Identify the Webshell: Use file integrity monitoring tools, malware scanners, or manual inspection to locate the webshell script(s). Check web server logs for suspicious POST requests to pinpoint the file.

  • Analyze and Remove: Before deleting, make a copy of the webshell for analysis. This can help you understand how the attacker got in. Once you've identified all malicious files, remove them.

  • Patch the Vulnerability: This is the most critical step. Identify and fix the security hole that allowed the attacker to upload the webshell. This could mean updating a plugin, changing weak passwords, or fixing a code vulnerability.

  • Restore from a Clean Backup: The safest method is often to wipe the server and restore it from a known-good backup created before the infection occurred.

  • Use a Professional Tool: For guaranteed removal and future protection, lean on a solution like Huntress Managed EDR. Our 24/7 ThreatOps team can hunt for, isolate, and remediate threats like webshells so you don't have to.


Is PHP Webshell Still Active?

Absolutely. PHP webshells are more active than ever in 2025. As long as there are vulnerable PHP applications on the internet, attackers will continue to use webshells as a go-to tool for compromising servers. They are constantly evolving, with new obfuscation techniques and features appearing all the time. They remain a fundamental tool in the arsenal of both low-skilled hackers and sophisticated APT groups.


Mitigation & Prevention Strategies

Don't wait for an infection to happen. A proactive defense is your best bet against webshells.

  • Keep Everything Updated: Regularly patch your CMS, plugins, themes, and server software. This closes the known vulnerabilities attackers love to exploit.

  • Harden Your Server: Implement strong file permissions to prevent the web server process from writing to unauthorized directories. Disable unnecessary PHP functions that could be abused.

  • Use Strong Passwords and MFA: Enforce multi-factor authentication and complex passwords for all administrative accounts.

  • Validate File Uploads: If your site allows file uploads, strictly validate file types and scan all uploads for malicious code.

  • Implement a Web Application Firewall (WAF): A WAF can help filter out malicious requests and block attempts to exploit common vulnerabilities.

  • Continuous Monitoring: The best defense is a good offense. Employ a 24/7 managed detection and response solution like Huntress ITDR to monitor for suspicious activity, detect webshells, and stop attackers in their tracks. Our human-led ThreatOps team hunts for threats that automated tools alone can't find.


PHP Webshell FAQs

PHP Webshell is a malicious script written in PHP that attackers use to gain unauthorized access to web servers. It allows them to execute commands, upload files, and manipulate server configurations remotely.

PHP Webshell typically infects systems through vulnerabilities in web applications, weak credentials, or by exploiting unpatched software. Attackers often use phishing emails or compromised websites to deliver the malware.

Yes, PHP Webshell remains a significant threat in 2025, as attackers continue to exploit it for unauthorized access and data theft. Regular updates and monitoring are essential to mitigate its risks.

Organizations can protect themselves by implementing strong access controls, regularly patching software, and using tools like Huntress for 24/7 monitoring and threat detection.

Glitch effectBlurry glitch effect

Protect What Matters

Secure endpoints, email, and employees with the power of our 24/7 SOC. Try Huntress for free and deploy in minutes to start fighting threats.
Try Huntress for Free
Huntress Managed Security PlatformManaged EDRManaged EDR for macOSManaged EDR for LinuxManaged ITDRManaged SIEMManaged Security Awareness TrainingManaged ISPMManaged ESPMBook a Demo
PhishingComplianceBusiness Email CompromiseEducationFinanceHealthcareManufacturingState & Local Government
Managed Service ProvidersResellersIT & Security Teams24/7 SOCCase Studies
BlogResource CenterCybersecurity 101Upcoming EventsSupport Documentation
Our CompanyLeadershipNews & PressCareersContact Us
Huntress white logo

Protecting 215k+ customers like you with enterprise-grade protection.

Privacy PolicyCookie PolicyTerms of UseCookie Consent
Linkedin iconTwitter X iconYouTube iconInstagram icon
© 2025 Huntress All Rights Reserved.

Join the Hunt

Get insider access to Huntress tradecraft, killer events, and the freshest blog updates.

By submitting this form, you accept our Terms of Service & Privacy Policy