HN Simulatornew | past | comments | lists | submit | jamesknelson's commentslogin

This feels like it might be the trolley problem in real life.

Turning it off may cause deaths. Letting it get ransomwared may cause more. Do you pull the lever to turn it off?


I can't believe I have to write this out in this thread of all places but there is a way to do this.

You make sure www-data CANNOT write ANYWHERE on disk. Not /tmp/ Not to /var/www/. No where.

Then make sure your sudoers has nothing weird in it.

Finally disable www-data's ability to run basically anything that isn't required for the operation of your httpd or php-fpm et al.

You then harden it further and further until an RCE does not matter because it's incapable of doing anything.

tldr always treat httpd as untrusted.


Good advice if you're not using the default PHP session settings, but using default settings this means sessions can't be created. At best, that means no-one can log-in. At worst, it completely breaks the site (for those that depend on sessions even for unauthenticated users).

Also: https://stopdisablingselinux.com/ - SELinux can mitigate this.


How do you handle file uploads then? Isn’t that handled by the same process writing the uploaded files to disk?


You could write them into a database instead. Or you make an exception for them.


>You could write them into a database instead.

"How to make your site cost unlimited money and have terrible performance". People did this in the Web 1.0 days on occasion and it leads to all kinds of problems for any site with any kind of traffic.

>Or you make an exception for them.

Useless. All you need to do at that point is chain a priv-esc to your existing exploit and you get root.


But then WordPress stops working :)


They were talking about critical systems :)


Heh, but for better or for worse, a bunch of people have built businesses out of WordPress and its ecosystem. One of them is my aunt, which is why (as a designated family tech support person, though she does have a part time developer) I'm watching this thread closely!


Does she actually need WordPress/Plugin features or is it mostly about editing the site herself? would something like Publii work too? Static sites dont have CVEs and you still get a nice WYSIWYG editor so she can update the site on her own.

Did this with my parents websites and they are quite happy and I get basically no support calls (and can read threads like this one out of interest only, thankfully)


Sadly yes, it's a whole stack (built for her by a vaguely technical cofounder who has since left the business) with a bunch of business-critical plugins, including Woocommerce for handling credit card payments via Stripe and another plugin handling bookings. It's amazing for what it is but it is a bit of a nightmare to keep going.


R/w access to your production database is still a problem, though yes less bad than world read/write.

And also relies on the target being patched against any Linux EoP...


> But what about _stop_ fossil fuel usage?

And how do you propose we do that if we’re not the ones selling the fossils?

Fossil fuel usage is for the most part, a transaction between willing participants at a fair market price. Will you ban that? How will you enforce it? I hate to be presumptuous, but I assume you’re not a fan of colonialism or wars in the Middle East.

While oil is as valuable as it is for heating, industry, transport, war, and gestures widely at our modern lifestyle. There are two realistic ways to stop it: replace it with something cheaper and better, or genocide.

Neither of these are likely to happen at the scale and timeline required to solve our predicament. But regardless, pretending we can just stop people far poorer than us from striving to meet our standing of living by… asking nicely? It doesn’t help, if your goal is indeed to solve the problem.


> And how do you propose we do that if we’re not the ones selling the fossils?

Because we would be the ones not _buying_ the fossils? There are multiple ways to reduce fossil fuels dependency, and they are known (and no, they do not involve genocide or colonialism). In Canada, carbon tax is an example, backed by economic studies (from right wight economists) and originally introduced by conservative (in Canada at least). Of course, then right wing parties started to convince people to "axe the tax" because it was the root cause of their problems (which is was, of course, not).

That's always the issue, and that's always been bugging me. Why is it that not being able to replace, today, 100% of the fossil fuels usage means "gee, we should do nothing, let's actually increase our production!"? How do we come from "such an energetic transition is a multi generation work" (which is true) to "meh too hard, let's double down"? How can we seriously make the argument "hey, I _could_ clean up the mess in my backyard, but anyway my neighbor is way worse and he has a larger backyard, let's do nothing instead"?

I really don't see how these positions are seen as the "voice of reason". To me, there at best the voice of laziness.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: