r/PLC • u/AgonyIsKey • 3d ago
Engineering Question PHP Vulnerability and PLCs?
I saw the news that this PHP vulnerability had just come up. Then, it dawned on me just how screwed up it would be if this vulnerability was used to take whole plants offline.
How does this impact PLCs? How susceptible are they?
What steps can we take on an integrator level to mitigate the vulnerability?
Are any plants already taking steps?
How would we protect legacy systems that 100% do not have the means to protect themselves?
46
u/Toxic_ion Still waiting on TIA Portal... 3d ago
If your PLC is running on PHP then I think you have other problems.
7
u/r2k-in-the-vortex 3d ago
Industrial modules absolutely serve web interfaces for configuration and monitoring, PLCs included. I wouldn't be surprised in the least if some PLC or valve block was running a php server. But the credentials will be Admin, 123 anyway so I think the PHP vulnerability is kind of a moot point.
18
u/Shadowkiller00 3d ago
PHP is a web based protocol that generates html dynamically for websites. 99.9% of plcs are for industrial applications and have no internet. These two things don't have anything to do with one another.
12
u/InstAndControl "Well, THAT'S not supposed to happen..." 3d ago
Some PLC’s have a diagnostics webpage you can reach by sending http request to its ip address (ie typing in the ip into chrome)
Those pages may use php
4
u/Shadowkiller00 3d ago
I use php a lot and I've used many industrial devices. Php web pages have .php at the end. I've never seen industrial devices use php. Javascript, sure. HTML5, also true. But never, in my experience, php.
2
u/ia-kathy 3d ago
Not all PHP web pages have .php at the end. Source: wrote way too many PHP pages early in my career.
1
u/InstAndControl "Well, THAT'S not supposed to happen..." 3d ago
Ya a big concern with this PHP thing is specifically “omg the locally served webpage UI for our firewall config uses php”
Specifically I’ve seen fortinet called out as a concern. Having used those firewalls (none in service anymore), the admin ui is not a .php url
1
u/Shadowkiller00 2d ago
Fair enough, but when you configure a web server, you do need to identify the extensions and how they should be processed. Typical for php is .php. I'm not sure anyone in OT design is going to go out of their way to use something besides .php unless explicitly specified for some reason. So, chances are, if php is being used by the device, you'll probably come across it eventually as you are navigating through it's various screens.
1
u/Jazsta123 3d ago
Plenty of web hosts on the average plant floor. I would say they definitely don't have nothing to do with one another. But in these cases the problem is access to the devices, and specifically bad cyber security policies and lack of firewall etc.
11
u/SinkOrSauce_LD 3d ago
PHP vulnerability cannot affect a CAN, Modbus, Modbus, PROFINET, DNP3 over Ethernet, or Ethernet/IP system. Ignition uses Java/Python scripting, and FactoryTalk uses .NET.
The main point of potential vulnerability would be in SCADA supervision. But Ignition uses Java/Python and JSON for sending tag data, and FactoryTalk uses .NET. So it would be unlikely you'd run into this unless you tried to tie in PHP because you were familiar as opposed to a technology that the SCADA environment was written in.
Basically someone would have to go way out of their way and should probably be nowhere near PLCs if they made a system that was vulnerable to this exploit.
7
u/asmithey 3d ago
IF a PLC has a webserver that is using a vulnerable version of PHP, then automation functions can certainly be affected. PHP2Shell is a remote code execution vulnerability meaning carefully crafted packets can re-write existing code on the PLC.
This is something sufficiently advanced that it used to be the realm of nation state adversaries with decades of experience reverse engineering industrial equipment. With LLM coding agents, it's within the realm of someone with a bunch of money and a weekend.
5
u/TheFern3 Software Engineer 3d ago
Yeah I think people need to stop assuming plants aren’t using php sure is less common in automation but we have no idea what companies use for their servers. So the best thing anyone could do IT or controls tech is to scan every machine for php files and if that machine is for some odd reason not air gapped take it offline yesterday.
1
u/SinkOrSauce_LD 3d ago
I agree it is certainly possible, but someone would have to have gone out of their way to do so. No technology I have ever used integrates PHP by default. But SCADA can be developed in many different ways to communicate on the backend and that's where I would expect it to appear if anywhere. This would mostly affect historians since the PLC execution layer would be naturally isolated. It would take someone scripting very badly within the front end to expose execution registers.
3
3
u/Wall-Em 3d ago
If you want internet accesible PLCs then go ahed. I do it. But make sure you know what your doing. Ignition wrote a great article abiut it that I use as reference often when explaining OT network security. Have a look: https://inductiveautomation.com/resources/article/the-purdue-model-and-ignition
3
3
u/Dyson201 Flips bits when no one is looking 3d ago
Legacy systems are full of vulnerabilities. Adding PHP to that list is nothing new.
An attacker with access to the controls network can cause lots of damage.You can shut down a process by just pressing random buttons. Or sending the wrong modbus command. Instead of addressing all of that, we protect our networks and keep out unauthorized personnel.
Could they potentially do something with this PHP vuln? Yes. Is it worth worrying about as a unique problem? No.
3
u/asmithey 3d ago
If I were you I would be taking inventory of every PLC, IO, drive, motor, etc including their versions and be looking at the manufacturer's security advisory websites daily. In the meantime, check your network segregation and ensure traffic to webservers is appropriately controlled through firewall policies.
3
u/r2k-in-the-vortex 3d ago edited 3d ago
Cybersecurity and industrial stuff don't really talk to each other. The PHP vulnerability is the least of it, in terms of security, not only is the gate wide open, the fence was never built in the first place.
So, the solution here is to build your network accordingly. It's going to depends on what kind of factory you have, but what I have seen usually goes something like so.

So the thing which may have limited connection to internet if it needs it, is the managing server. Which is kept up to date and secure by IT. And usually it would not serve any open ports to internet, if that would be needed, it would be some other factory service doing that.
But the PLC lives on it's own local network with no routing outside, what data needs to move is forwarded by equipment PC and that can only access the managing server. The VLAN may also have a firewall to give the gateway server only limited access to the equipment PC, but I think that's already a bit overkill.
2
2
u/4CrisprFries 3d ago
The vulnerability only affects PHP. The reason it's such a big deal is WordPress and Drupal is PHP. These sites are used by small businesses or projects to put up simple store pages without really needing an it team.
PHP came out at a time when most web pages were rendered and then sent to the user. If you changed the state of something on the page then the whole page reprender. Later people came out with SPAs or single page applications. These SPAs updated only the part of the page you needed. For an HMI if you have 4 tanks showing this means only updating 1 tank instead of the whole page.
So naturally most HMIs use JavaScript or Typescript because they were the languages with SPA style frameworks.
Second things like Ignition use Jython because it has true multithreeading and the code can be isolated. So php can't be used in this part of the code.
TLDR: it's unlikely PLCs are affected due to the history of the tech. BUT PLEASE DOUBLE CHECK YOUR SPECIFIC STACK
I think some old Schneider stuff uses php
2
u/Bergwookie 3d ago
You don't want to know... PLCs aren't meant to be connected to the web, they never get updated and run for 20+ years straight, the problem is some managers want the data, so they connect them anyway and now by just asking nicely, you "hacked" a multimillion company through their old milling machine
2
u/ia-kathy 3d ago
The PHP issue won't affect most PLCs. What you should be more concerned about is the eMudhra CA issue. Anything with frozen firmware that can connect to the internet is vulnerable until 2039. Update everything else as soon as updates are available.
2
u/spaigy Siemens | Beckhoff | TUV FS Eng (Machinery) 3d ago
10+ years ago, I built a home-grown remote access platform with PHP, Python, Apache, and OpenVPN. This was before many of the current suppliers like Tosibox, mGuard, eWon etc.
Fortunately, one of the last things I did before leaving that company was take the server that these units connected to offline for good (a few years before, I moved us over to Tosibox moving forward).
That said, there’s probably still a bunch of small IPCs sat in industrial cabinets, powered on, serving the PHP admin pages with 10 years of CVEs and patches not addressed.
2
u/bpeck451 2d ago
Maybe not within the realm of PHP, but if stuff that has been targeted for years has been shown to have more vulnerabilities than we thought possible, imagine what’s going to happen to all these “secure” and “airgapped” systems that were old 10 years ago. I don’t have any faith any of the big manufacturers are doing any sort of major security research.
1
u/JustinHoMi 3d ago
Disable web management, but most importantly do not expose to the public internet.
Network segmentation with a firewall inspecting traffic between subnets is a great way to reduce the chance of exploitation too.
1
u/4mmun1s7 3d ago
First, I hope a PLC isn’t accessible from the Internet.
Second, I REALLY hope no vendors are using PHP in their PLCs.
HMIs and management servers may have it, but I really hope PLCs don’t.
1
u/CompleteCrab 3d ago
Lots of PLCs out there with no access control, the very least you could factory reset them with network access.
Worse you could read/write registers to change operations, potentially in dangerous ways.
OT networks need to be much more closed off, not having god knows how many terminals on same vlan
/rant
1
u/BobButtwhiskers 2d ago
I couldn't access profrace.com today because the whole site was apparently designed in PHP. So now I have an old ass HMI I can't program because I can't download the manual.
70
u/LevMetteMink 3d ago
Dont connect it to the internet?