Lurker News
Made this because I'm curious if anyone out there has figured out how to actually use this PHP RCE we spent the last few days panicking over. Have fun!

Comments (451) 119 threads

Show all comments

Showing thread 2 of 119

cloudlandsdev9 replies#
Update: Did not expect the amount of traffic! Every time I scale the VPS, y'all immediately blow through the extra compute. Should be up again, hopefully will be more stable once this drops off the front page.

Any attempt at logging so I can make a blog about the successful solve is gonna be best effort, don't have disk capacity to keep up with the traffic (at peak it was rotating every 12 min...). If you win the challenge, write-ups are definitely welcome.
For those who are saying that the nginx config is unfairly difficult, intention was just to replicate a fairly normal config that was more realistic than you'd get in a lab environment. If we get to 24 hr+ with no solves I'll see about making it easier. In the meantime, seems like you can perhaps mitigate PHP2Shell with the right nginx config, so that's pretty neat!

rustyhancock1 reply#
It would be nice to see what terms would be if not claimed, specifically, if not claimed in X days (how about 28 since there could be little claim of protecting an exploit at that point) will the money go to the charity you mention?

I ask because I think that would incentive a few more people bumping the bounty.

cloudlandsdev1 reply#
Will give it some thought. I have some initial reservations about staking any claim on what happens to the money / don't want to solicit donations. From my perspective, the goal was to leave $500 on a street corner with a sign saying "Take Me!" and see how long it lasts. If someone puts their own money on the same street corner that's on them. But if the pot ever got really big and I couldn't maintain the site for whatever reason, some sort of plan is probably worth having.
PcChip3 replies#
i see several dollar amounts mentioned here

you say $500, some comments say $1000, and the web page says $2000

Continue this thread — 3 replies

LiveOverflow2 replies#
I believe it's not exploitable. People say that it's obviously easy when you know the exact config. So can you proof it's even possible? I am pretty outspoken about php2shell being realistic to exploit, so I am happy to independently verify to everybody that it is a realistic setup. You can reach me @LiveOverflow on Twitter or so.
malfist1 reply#
Wait what? You're saying you believe php2shell is "realistic to exploit" but that the site owner has to be the one to do the exploit to prove to you that you're correct?

Shouldn't you be the one doing the proving here?

LiveOverflow7 replies#
OP confirmed that it wasn't exploitable, because it was not even running PHP code.

Continue this thread — 7 replies

LiveOverflow1 reply#
OP confirmed that the server was initially serving only an index.html. In that configuration, the vulnerable code path is never reached — it requires a .php file.

OP added php-version.php roughly 18–19 hours into the experiment (I'm not sure of the exact timing), so that period should be subtracted from the publicly displayed challenge duration.
Based on my external fingerprinting, I now believe the setup should actually be exploitable!
However, the server is being absolutely hammered with requests and crashes. Making it significantly harder to pull off. This is imo still an unrealistic target. If you are not taking the top 1% PHP websites, then they will have long periods (1 minute) of no traffic.
If someone manages to pull off a working exploit under these conditions, that would be crazy to me.

cloudlandsdev2 replies#
Yes! Was serving pure html through PHP before 13:00-ish UTC when I added that page. From the traffic, it seems plausible that some people have an theoretical exploit path through PHP's HTML server itself, without relying on PHP functions, but no one has pulled it off quite yet.

Continue this thread — 1 reply

Lockal1 reply#
Aaand it is down again, and I have never seen it alive.

The experiment looks like "Steal my compute/storage scaling money and uptime", and it barely matters that there is some Bitcoin behind it: a company could lose more than $2000 if agents constantly break its website.

kennywinker#
DDoS doesn’t require agents, so it’s not really a new threat
brador2 replies#
LAMP stack with a cloudflare frontend if you really want to test this “real world”.

Post updates on bsky not your actual site as they will be dropping malware once they bop your BTC. Be ready to shut it down fast.

asadhaider#
Pretty sure that would be against Cloudflare terms on both sides and would get your account terminated.
himata41131 reply#
Cloudflare protects websites against exploits already.
charcircuit#
ASLR protects against exploits already too.
NorwegianDude1 reply#
What is the normal config? Could you publish the setup on GitHub or anything like that? I see some say that it is hardened, others saying it doesn't run PHP etc.

Would be fun to see what it's actually running. :)

NorwegianDude1 reply#
This was presented as a normal setup of PHP, but in reality was something completely different. Nobody runs PHP like this. This used the dev server in PHP and proxied requests from nginx to the php http dev server. Literally the first thing in the php docs about the dev server is:

"Warning This web server is designed to aid application development. It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server. It should not be used on a public network."
It's also singel threaded and very slow, so that explains why the site was so damn unusable.
It's a shame, as a realistic setup would be much more informative.

rustyhancock#
Well the bitcoins were taken about 4 hours after he made the setup more realistic.

Those 4 hours the server was barely up due to repeated segfaults from so many people attacking it at once!
I imagine if it'd been setup and there werent so many attackers it probably wouldn't have lasted more than 1-2 hours.

cloudlandsdev2 replies#
Update 2: Someone is definitely popping a segfault; still no RCE yet but I think it explains some of the instability people are experiencing. Will set the php server to restart after extended outages instead of configuring FPM or something that changes the surface area of the challenge.

Can't _prove_ that the server is running PHP, but I added a `/php-version.php` page to help calm the conspiracists. Still no changes to the default nginx configuration since it seems we've got a few people getting close with those segfaults, but aware people think it'd be easier if I made those.

geraldwhen#
The segfaults won’t get them close. They aren’t currently exploitable given the nginx config.
mariofdistrust3 replies#
kimi claims it has a working sub-1 MiB RCE chain locally. alas, it can't exploit your website due to pesky pesky ASLR. in the words of kimi: "I need either the ZendMM or libc base plus a calibrated delta". would you be so kind as to give them, or disable ASLR?

edit: don't worry folks, kimi says a subagent "found a credible path to a real pointer leak". everything's under control and kimi will exploit the website in T-(?) minutes.

zkldi#
This is one of the funniest posts on Hacker News
jijijijij#
While you are at it, could you also enable ssh on port 22 and slip in my keys for user root? It's what I use in my test setup and my RCE POC relies on it.
Kondr3d#
my kimi says that i need to ask admin to add to index.php. Please do so while on it.
xmcp1234 replies#
Reddit saying you turned off post requests? Is this accurate?

Edit: he turned off request body parsing. This breaks the exploit.

Continue this thread — 4 replies

Continue this thread — 2 more replies