|
|
|
|
Dan Q
Hero Member ⚓︎
    
 

I have no idea what I am doing ⛺︎ My Room
RSS: 
Guild Memberships: Artifacts:
  
|
 |
« Reply #2 on: Today at @410 » |
|
There's definitely weaponised code out there already. If you run PHP on an Internet-facing server, here's what I would personally recommend (and it's what I did on half a dozen servers earlier today):
- Put the mitigation line in your php.ini and restart your php-fpm process (I've assumed you're running FPM and not CGI, because it's 2026, not 2006), unless for some reason you absolutely can't (e.g. you're depending the upload-progress feature for something critical) - If you're running AppArmor (and you should be), check that you're already denying PHP permission to run arbitrary executables; if you're for-some-reason depending on this functionality (god help you), at least restrict which binaries it's allowed to run down to only the ones you actually need
Either one of those two is probably sufficient to prevent an exploit today. But obviously the next step is:
- Later today, install the update (you may then undo the php.ini mitigation line if you like, e.g. if you're using upload-progress indication but it's only a "nice to have")
In general, if you haven't already, I recommend that you reduce your visibility:
- Ensure that your webserver strips headers that advertise that you run PHP, especially if you expose the version number: there's generally no reason to expose this to the world - While you're in there, consider masking your webserver version too: you don't HAVE to return a Server: header at all, and if you do then it might as well just say the name of the software and not its version number, or make it say something fun!
|
|
|
|
|
Logged
|
Artifact Swap:  
|
|
|
|
|
|
|
Dan Q
Hero Member ⚓︎
    
 

I have no idea what I am doing ⛺︎ My Room
RSS: 
Guild Memberships: Artifacts:
  
|
 |
« Reply #5 on: Today at @471 » |
|
Or run the server from within a sandbox so it cannot affect the whole system and run any necessary binaries from within the sandbox too. This is good advice in general, but doesn't protect you from all of the harms that this vulnerability can cause. E.g. if your sandbox gets owned, it can be used as a spam relay or as part of a DDoS network for example.
A sandbox is good defence-in-depth. But overall it's better to mitigate and patch.
|
|
|
|
|
Logged
|
Artifact Swap:  
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|