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

I used to be a fan of outgoing firewall control, but alarm fatigue became a major issue, and I just accept everything, which just game a false sense of security.

Nowadays, I just use Windows built-in firewall.


From my understanding, the PHP bug is memory disclosure.

The RCE exploit is application dependent: it requires exploitable PHP code already deployed in the server. However, that exploitable code path is widely deployed by the most popular PHP software: WP, Drupal, Joomla, etc, so in practice most PHP deployments are vulnerable to the RCE attack.


From my understanding, the vulnerability is a use-after-free, i.e. PHP allocates memory, stores pointer to it, frees it, maybe re-uses the memory for something new and then accesses the pointer. So totally exploitable.

Note that use-after-free would be prevented in memory-safe languages such as Java, Go or Rust.


PHP itself is a memory safe language, this is a bug in the language implementation and VM. Which happens in other memory safe languages like Java or C#. This is sort of the equivalent of a Rust compiler bug that allows unsafe behavior to slip through, which also exist.


No, PHP interpreter is written in C where such things happen every 100 lines of code. If PHP interpreter was written in Rust, this vulnerability wouldn't exist.

To be fair, C has simplicity as an attractive feature (compared to other languages) but being memory-unsafe is unacceptable, so we need either memory-safe C or stop using it.


Most interpreters or runtimes are written in unsafe languages. Including V8 (Chrome and Node), C#, and others. Also PHP is not really interpreted, it works just like C# or Java where it's compiled to bytecode that runs on a virtual machine.


Not all UAF are explotiable. It really depends on what code that uses the stale pointer does with it and how controllable the freed/re-used data are. Although when evaluating I'd count much more on the first condition, rather than the second one, which may not be so easy to ascertain.


> Note that use-after-free would be prevented in memory-safe languages such as Java, Go or Rust.

There are also hardened malloc/free implementations for C based runtimes. Of course none of that is perfect, the famous heartbleed exploit for example bypassed any outside memory protection as the library agressively reused already allocated buffers, none of the languages you named would protect against that.


> So totally exploitable.

Great, so show us a working exploit.


https://github.com/9bie/php2shell-bypass-aslr-exp

Buy 5$ on deepseek and have it write a script to grind out the right offsets to use for the most popular docker images.

I got it working just now; shell on any docker image i pull.

GG this dumb ass blog-post and thread.


Yeah? You got it working? Then why can't it pawn my webserver running php-5.6 and drupal 7? Should be pretty easy, those are both unpatched ancient versions.


Probably because you're too cheap to spend $5 on DeepSeek tokens? Its specifically labeled for a 8.4 version IIRC.

I'm not sure what your question is or what you're getting at. The only time-sink for general purpose exploit is to churn through previous PHP versions to get the right offsets/struct sizes and common memory configurations.

Do you think security is done by running obscure configurations?


Or because they understand its not worth spending the money on, since the person making the assertion should demonstrate it.

The question we are getting at is - is this easily exploitable? I haven't see evidence of that.


I don't understand what you mean with demonstrate. You want me to post the php2shell for their set-up?

Its not "if" this is easily exploitable; its what you two want to define as easily exploitable.

It already is by my definition - that is also the clear majority opinion (unless you want to appeal to specific authorities that agree with your alternative definition).

As far as i can tell i've already posted more than enough proof with that github link for anybody that is a bit curious and with passing knowledge of exploits.

I'm stuck guessing at what more you want or expect of me in a random HN thread. I'm inclined to just wait 24h and there will be a public version that hacks this hypothetical php-5 set up as well.

You both clearly have a different definition of easily exploitable; and until somebody tells me what that definition is and what background knowledge I can assume I have very little I can do here except guess at what you're both ignorant off.


> I don't understand what you mean with demonstrate.

I was quiet clear I thought. I wanted a working exploit. Someone to demonstrate that my (or someone else's) server can be hacked with this exploit. So far what you've provided is a tightly constrained lab example where you have to control the amount of memory given to a server (significantly I might add), modify the apache and php configuration way outside sane values (exactly 1 worker, 8MB memory limits), have knowledge of the exact php build used on the server and how it is being ran (mod_php here).

In a standard webserver, you're not going to know any of that or have control to make any of that happen. Nobody is running a PHP website on a 128MB ram VPSs, nobody is running with exactly one apache worker. You're not going to know ahead of time which build of php they're using, or if they built from source.


Finally!

I had to keep guessing at how much you actually know about this stuff, but given you brought up the workers as a constraint means you are either completely clueless and/or have absolutely 0 intention to think for yourself.

No 'proofs' like "demonstrate on someone else's server" or explanation of the exploit chain will ever be enough to convince you.

You dont want "a working exploit" - and we could have all saved some time if you were honest: You don't know what you're talking about and only after being given a complete exploit you can run against any target will you consider it easy by your standards.

Good talk. By your definition of easy, i can easily agree this exploit is not very easy. Though the settings dont matter/can be bisected remotely, you're right that - afaik - nobody has figured out how to avoid guessing the compile settings and version. Thus compiling it with custom settings is going to keep you safer in practice, while using a container is more dangerous.


Feel free to prove it, theres $500 if you can: https://stealmybitcoin.com/


Do you stand by your blaze attitude?


Why write? Put your unpatched PHP server to the Internet and someone will show you working exploit.


Oh it's live and nobody's bothered it


NAS/SAN still make sense when you need to share storage between multiple DBs for cost efficiency: most application DBs are tiny compared to the size of an SSD.


It's all about trade off.

Do you want to spend thousands of dollar upfront for that DB server with sweet sweet NVME SSDs, of which your application might not even use 1% before the app get scraped?


Back in the old days we chucked it all on one box. Then scaled up when we needed to.

If you can’t afford to throw down enough money on a single box to bring a business up then you’re fucked anyway.

I know whole businesses that make a lot of money and never needed more than that box. (And a hot spare)


I would have argued against you a couple of years ago, because I've also built stuff this way and it required a developer or two to care at least a little bit about database administration, and few of the one's I've met do.

However, these days, I notice my DBA skills atrophying because LLMs have encoded most of the answers and diagnostics I need in their weights. Coupled with something like Nix, spinning up new servers including backups and everything, it's easier easier than ever to run your own production database instance.


Don't LLMs make it easier to write all the low level/boring stuff that makes managing a database deployment directly viable without the middleman?


Sure, so long as you have processes in place to verify the result.

It would really suck to learn that your LLM-generated disaster recovery plan isn't viable when attempting to use it to recover from an actual disaster.

This isn't a whole lot different than what you should be doing to ensure systems not managed by LLMs are designed and operating properly, of course, which I guess is sort of my point.


It's easy doing a lot of stuff you don't understand quickly these days. But when the shit hits the fan and you have customers you need to know what you're doing.

Hiding behind the LLM, or even a cloud service like RDS makes you think you can get out of a corner, but you are nowhere near that. Practice, drills, experience are the only solution here. The illusion of that is dangerous.

I spent a couple of days recently digging one of our associated businesses out of the shit because they killed a postgres on RDS instance (AWS bug!) and couldn't google or LLM their way out of it. It hit the trade press and did a lot of damage to them.

If you're not going to do the work, don't take on customers.


An LLM can absolutely do the harder stuff too. I wonder what model you have used where you think it's only for the easy stuff.

Of course you need understanding for when shit hits the fan, but that applies regardless of whether it's a human or an LLM writing the code.


We've had the best people using the best and most expensive models. They confidently produce shit they thought they understood but didn't.

LLMs remove personal exploration from tasks and that's where you really get to know things.


We've all seen best people confidently produce shit throughout the history, before the LLMs.


Now they can do it faster than ever and to the detriment of everyone. Which is the problem.

When you optimise for fast and not correct, things are fucked.


Then they've been fucked since C beat Lisp, and that hasn't been enough to cause Silicon Valley to implode.


That is a completely different argument.


No it's not. If "bad software delivered faster" is a problem, it's a problem long before LLMs. But the history of software-based products has shown that "delivered faster" is consistently more important, as bad software that attains significant usage will be made into good software one way or another.


I'm not skeptical of the idea that LLMs will be useful tools to cost-effetively develop high-quality software. I am, however, skeptical that the input to these LLMs will remain mostly informal and conversational.


> when the shit hits the fan and you have customers you need to know what you're doing. [...] don't take on customers.

I think you overestimate the level of DBA skills smaller startups have in house.

If you have found a way for a company to hold off on taking on customers until they can afford a proper DBA, I'd love to hear more about it. But it sounds backwards to me. In my experience, it typically goes the other way around: only after taking on enough customers to be decently profitable can a company afford a real DBA.

Until then, the choice used to be between managed database services or striking luck with a developer that had some database interest. These days, it's between managed database services, striking luck, or giving the developers access to an LLM. The LLM doesn't replace DBA skills that used to be there. There weren't any DBA skills there to begin with.


I haven't seen a small company hire for a dedicated DBA in over 15 years. It was unnecessary then, it's unnecessary now. As "agile" and "devops" took over, many of the more specialized roles disappeared.


This is incidentally exactly why I never buy any products unless they've been around 10 years. It's a risk.


It's all good while it works.

The day it broke, it's a PITA.

You need that RAID card which is not available anywhere around you.

You need to visit your Data Center, but you suddenly have issues with security and you need to arrange all that stuff.

You need to buy DDR stick but you need to wait a month for delivery.

The guy who knows how to insert a stick took a vacation week ago, and everyone else is too afraid to touch big iron box.

With cloud, you either don't notice that, because they have scale and they have spare parts and they have personnel 24/7. Or worst case you order identical server and deploy your app, hopefully in a few hours restoring from backup.

And for some people it might never broke. But it's all the uncertainty and fear that leads people to cloud solutions. You don't plan for average outcome, you plan for worst outcome.


That exact line of thinking is how our costs increased 8x over 2 years.

And you're not immune from those issues in AWS. What happens when you run out of EBS IOPS or have to change instance type and it won't boot? What happens when your instance fails? What happens if you hit a quota limit in the middle of a failover?

AWS support is fucking awful unless you pay $5k a month or 10% of your total spend (whatever is greater) and then it's only mediocre.


> You need that RAID card which is not available anywhere around you.

If you're small enough to not be able to justify spares, then rent servers instead. It's still cheaper than the big cloud providers.

> You need to visit your Data Center, but you suddenly have issues with security and you need to arrange all that stuff.

You rarely do. Anywhere beyond the cheapest third-rate colo provider provides "remote hands" services.

Even when managing several racks worth of hardware, I'd go into the colo facilities a couple of times a year at most.

> and they have spare parts and they have personnel 24/7

Even tiny colo-providers still have personnel 24/7, and you can buy fractional devops services for small retainers from any number of providers (like me).


Yes, you will need to keep a spare running. And have written (and tested!) procedures around how to switch to the spare when members of your team are away.


All additional concerns and requirements that you need money, time, and people for. I'm not claiming a server-as-a-service / cloud has zero skill requirements, but it's a lot less than managing your own hardware.

I can't comment on total costs / costs over time though.


In my experience cloud deployments also need documentation and processes. It is of course a different set of documentation and processes, but cloud's not magically free of these requirements.


I do devops work for people, and clients using cloud services consistently have more devops issues than those on dedicated hardware.


Single boxes now are also insanely powerful compared to what we had back in the day too. Unless you are genuinely running the next Google, you might not even need to scale beyond one. As you said you might get a second box purely as a hot spare.

I remember we ran a pretty large UK website on 5 x Pentium II boxes, using a Perl stack which is not exactly memory efficient. Later we ran a chat server for hundreds of thousands of school kids on a single server which was (if I remember this right) a Pentium III with 128 MB (yes, megabytes) of memory and a spinning hard disk.


I used to run a webmail service that we had ~2 million user accounts on. It took several racks of equipment. The combined capacity (RAM, IO capacity, disk storage, CPU) was all below the 250 GBP mini PC under my desk...


I built my own server for home last year, all consumer hardware (AMD Ryzen, 96GiB RAM, NVME SSD, HDDs etc). Total cost was ~£3,000 at the time - £6000 up front cost for a business seems reasonable; and you could get away with less.

However, the main cost would be colocation - it's risen quite a bit.


Just buy one off Hetzner or something.

I wouldn't use Ryzen on a production server myself.


Nothing wrong with Ryzen for a server, you can get AM5 server boards from Asrock and they support ECC. If you need more they make AM5 Epyc CPUs that are just Ryzen parts with Epyc written on the box and IHS


AMD will sell you an Epyc AM4/AM5 CPU with the same specs at the same MSRP for most of their Zen4/Zen5 chips (not the APUs and I think there may be a couple missing skus on the Epyc side).

I doubt there's much of a meaningful difference other than a jumper for the brand. Retail pricing and availability might differ.


Just out of curiosity why not?


No ECC support on current models, dubious ECC support on previous models, thermal performance issues, crap chipsets, not enough PCIe lanes.


Uh, its only the models with builtin GPU (the G series) that lack ECC. The rest seems to support it as long as the motherboard does.


if you do the same type of governance, cloud is still cheap too (everything on one server)

Where the money gets wasted, is doing a different server per project, putting everything in different resource groups, and then overprovisioning those servers many times over. So much wasted capacity because of simple project structure preferences.

And then there is also the fact some features are locked behind more expensive models, which is also rarely cost efficient.

All I am saying is, if you simply create 1 database server on the cloud, with a database per app, and different schema's, isolated users, ... it can stay super cheap. But good look getting through an enterprise cybersecurity audit or ISO27000+SOC2 certification.


I've led and completed SOC2 and 27001 cert on own hardware.

It's absolutely fine. Everyone has just gone stupid recently.


You can rent bare metal server for that. The real advantage of cloud solution is a cohesive offer, ease of scalability, and many other things which boils down to "we take care of things for you". It can be worth the $, i can also be a huge waste of $.


Ease of scalability - "it starts at 0.01x, but adding extra increments of 0.01x is easy, provided your app is designed for horizontal scalability"


Far lower than 0.01x. Batching can get like a 30x boost, and horizontal scaling makes that impossible, so your upper limit is basically 0.03x. Then you throw it on a volume with 1/1000 the IOPS of a basic consumer drive. So more like 0.00001x, and you can pay through the nose to bring it up to 0.01x maybe.

People have zero concept of how incredibly absurdly fast even a slow computer is. Storage is literally 1000x faster than it was 15 years ago. My first job was firmware for enterprise storage arrays and IIRC we were aiming for 3M IOPS. That's not much more than what kids can put in their PS5 now, and these were arrays running companies like Walmart and JPMC.


You also fail to realize that even managing a physical DB server is much easier now with AI, enabling people to more easily understand what their infrastructure needs are, what maintenance is needed, how things can be automated.


True. We do have to remember that this is only possible in the last few months. The costs to manage more and more infrastructure is steadily going down.


No, you can just rent a VPS with local NVMe storage if even renting bare metal is too much.


So like, 0.5 extra salary months to make sure the whole company's app is fast?


Why are you paying for hardware that might not even be used ? If you get an unexpected burst of demand that's not the worst problem to have. You can even jump on a cloud for a few months.


Being set up to be able to quickly "jump on a cloud" is the best way of ensuring it's even less cost efficient for you to actually use the cloud most of the time.

Which is to say, it's good advice.

It lets you load your dedicated servers far higher than what you can safely do if you don't have the option of using a cloud provider for burst traffic, but in practice most people will very rarely need it.


Renting (either just the hardware or a dedicated box at a hosting provider), leasing, lease to own, or just plain regular payment plans are all options that tend to work out at a fraction of the big cloud providers.

In 30 years of hosting on-prem or in colo facilities, I've never once bought hardware up front for corporate accounts.


Sounds cheaper than AWS :)


And yet we do multi year purchase commitment contracts with cloud providers that break that "flexibility" premise.

With the multi million dollars A MONTH purchase commitment contracts I've seen in my previous employers, you could use a single month budget to buy hardware that could serve our applications for years.


scraped -> scrapped

totally different words


Not even close, Quantum Computer are still far from being able to do any cryptography cracking.


Yeah, sadly data and command intermingling are also one of the main things that make these "AI" appear so human.

Humans are also susceptible to prompt injection all the time, we just call it differently: social engineering or scam.


Incorrect. If every sentence you hear is indistinguishable from your inner monologue and you can’t tell the difference between your uncle saying something and thinking it yourself, seek help.


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

Search: