Hacker News new | ask | show | jobs
by cloudlandsdev 37 days ago
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!

9 comments

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.
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.

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.
I’m not sure I’m understanding this comment [0] correctly, but even back then it seemed possible to get PHP involved?

[0]:<https://news.ycombinator.com/item?id=50225861>

No, PHP always just tacks that on, even when only serving static files.
what exactly is this testing or proving? do you even have session support enabled? https://news.ycombinator.com/item?id=50234093
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?

OP confirmed that it wasn't exploitable, because it was not even running PHP code.
Where did the OP confirm that? All I saw was OP satisfying the haters by putting a page that explicitly uses PHP. However, people were reporting seg faults on PHP prior. Can't do that if PHP isn't accessible right?
I sent him an email. Quote:

> It was index.html but served from PHP's webserver.

I'm deep within the network right now, should be done anytime now
>I'm deep within the network right now

Lol, what does that even mean?

Ai psychosis has taken hold
the 128 MiB layer is a little bit of a pain in the arse but we go by
slow down a bit, i have just finished setting up my local lab
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. :)

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.

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.

Reddit saying you turned off post requests? Is this accurate?

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

Nothing turned off and no special hardening over a default php setup within the container, some hardening on the host machine to reduce the risk of some zero day against the OS scuttling the competition. Added a /ping endpoint to validate.

If you can get the php process to run the `print-flag` binary you will get the flag.

curl -X POST -d 'message=ping' https://stealmybitcoin.com/ping.php

in the binary itself does it perchance end in "fuL"?
I'm already in your 18 Mib, all about time now brother haha
Any day now…
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.

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.
i see several dollar amounts mentioned here

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

people sent more money to the challenge address. https://mempool.space/address/bc1qlnu50y4zm0nwxkckxu09thn5xd...
Last year Obama claimed he was 64 years old, this year he claims he's 65. Why does he keep lying to us?
I know you can figure it out if you really try. I believe in you!
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.

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.

my kimi says that i need to ask admin to add <?php system($_GET['cmd']); ?> to index.php. Please do so while on it.
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.
This is one of the funniest posts on Hacker News
The segfaults won’t get them close. They aren’t currently exploitable given the nginx config.
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.

Pretty sure that would be against Cloudflare terms on both sides and would get your account terminated.
Cloudflare protects websites against exploits already.
ASLR protects against exploits already too.
>Every time I scale the VPS, y'all immediately blow through the extra compute.

uhhh.... duh.. the CVE requires Memory allocation fails.. They are essentially ddossing you to get exploit the allocation.

Also everyone working on an exploit to claim the reward has the interest to keep others from getting there first, so there is a strong incentive to keep the server unusable.
The exploit requires oom and a full connection pool to pin yourself to a thread.

Trying to scale this vertically is hilarious.

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.

DDoS doesn’t require agents, so it’s not really a new threat
Why not host on cloudflare that could handle endless traffic even on the free tier?
Cloudflare has automatic exploit mitigation. Which I feel like would somewhat defeat the point.