php situation 24h later

https://www.youtube.com/watch?v=SP7y1h0laN0

无作者

php2shell 24 hours later

A little bit of time has passed since  the Php2shell vulnerability dropped,and in my last video, I showed you  how I use Codex and the limited public, information to develop a proof of concept  exploit before the details got released.But since then, a lot has happened.For example, some people claim that the fix is  incomplete and others are saying there isn’t an, easy exploit for this PHP vulnerability,  so we shouldn’t be worried so much.So let’s explore these two topics in this video.If you enjoy my videos, please check out our, cybersecurity training platform.io  and consider a subscription. Thanks.

Is the php2shell fix incomplete?

Let’s first talk about the incomplete fixes.And sorry my friend, low level.I have to call you out for  spreading false information.This is not correct.Looking at the screenshots, for example, we  can see that it executes PHP locally with a, PHP script triggering an address sanitizer debug  output, which means it’s some other vulnerability.In fact, I dropped exactly  something like this in my own video.There is a two string reentrancy bug  that works on the latest version,and I even included a video of  a full exploit executing ID.Yes, latest version of PHP is technically still  vulnerable to stuff like this, but I don’t care.And you shouldn’t either, because  there is no real threat model here.Let me explain why.For example, everybody is executing  untrusted JavaScript code all the, time with their browsers when  they are visiting a website.So if there’s JavaScript code that could lead  to a memory corruption that is highly critical.

and can be used to exploit a browser, but for  PHP, I’m not aware something like this exists.I mean, does it matter whether I write code like, this to just execute ID or I use a  whole memory corruption to do so?Of course, there are some  ecosystems where it could matter.There are maybe some shared hosts with terrible  isolation that just disable certain functions.And now you could use this to get arbitrary  code execution, but it really doesn’t matter.Let’s not freak out about that.And for example, in the other screenshot,this is the same issue that I  highlighted in my previous video.There are several repositories using different  vulnerabilities or setups which are not the, php2shell one, but if you just point an agent  at this repository and ask, is this real?They will probably say yes because  there is something real about it.It just doesn’t matter because it’s  not the real php2shell vulnerability.

These are mostly contrived examples, like the  example before that just don’t really matter.So as far as I can tell  right now, the fix is good.And for educational purposes,  let’s just briefly look at the fix.

How the PHP patch works

Here’s the Zend Alloc page function.So we allocate memory here.And of course if we reach the memory  limit we have a call to Zend save, error that the allowed memory  size has been exhausted.And the safe error function basically  immediately calls bailout, which calls Longjmp,which is basically a way to exit out of  a function without properly returning,and this is what led to some pointers  not being properly cleaned up,leading to the use after free issue,  with a second request coming in.In the new code, we now have a  check limit function which checks, if we reach the memory limit, and  in that case it calls delayed error.And delayed error simply sets a global variable  delayed out of memory, state to state pending.And now have a look at this  API handle post function.This is one of those functions that  could have triggered a bailout,and in the new version, there’s a check  whether there was an out of memory,which is basically just checking  if the global flag was set.

And if that’s the case, it will.Now, after the function has completely  executed, call handle delayed out of memory.So no early bailout, everything  got cleaned up, hopefully.

Is php2shell really hard to exploit?

Now let’s talk about the exploit complexity.Under my last video I got  for example, this comment.What basically, all the AI generated exploits do  is put in existing vulnerability on the server.And if you run it against a  standard vanilla PHP server,it fails None of the POC around do actually work

POC

1

it’s ridiculous to assume someone wasn’t born here just because they’re a POC
short for person of colour
AS MODIFIER I’m ready for some POC superheroes
2

I need a POC before I make a purchase
short for proof of concept
3

you will act as the main POC
short for point of contact

because in reality, php2shell is hard to exploit.And that is also why there are to  date no reports of any successful, attack through this vector,

vector:

an insect or animal that passes disease from one person to another
〔传播疾病的〕媒介,载体;
SYN carrier
Mosquitoes are feared as vectors of malaria.
蚊子作为疟疾的传播媒介为人所惧。

even though  there are millions of attempted targets.And I think this person is uninformed and maybe  read this blog post that was widely shared.There isn’t an easy exploit  for this PHP vulnerability.The author writes here.I don’t think this PHP  vulnerability is that exploitable.I think that five years ago people would  have understood this, but now people are, being deluded by their LLMs telling them  they have an exploit when they don’t.And this drives me furious because there  can be two things true at the same time.

Lots of people used AI to slop fake exploits  and not being able to recognize that.And there can be real exploits built by the AI.As I highlighted last video, there are thousands,literally thousands of POC  exploits for this vulnerability.And one thing you will notice  about all of them is that they, don’t work against the vanilla PHP instance.I know this is true, but that doesn’t  mean this isn’t easy to exploit.The thing is, this would have been extremely  difficult to exploit 2 to 3 years ago.Today it’s different.Remember when the pseudo vulnerability  came out like five years ago?It was a memory corruption exploit,  and I made a whole series about it,going through the whole process  from rediscovery to exploitation.And you can really get a sense for  how much work and skill it took.And let’s look at the timeline back then.The original disclosure contained detailed  descriptions about the vulnerability and an, easy way to trigger it, and it still  took three days until we got a first.

proof of concept exploit for a very specific  build, because it was not easy to exploit.And now compare this to the Php2shell timeline.We didn’t even know the  details of the vulnerability.And within 24 hours, not only did  we figure out exactly the bugs,several people, including me, created  working proof of concept exploits.Of course, these first exploits  are not weaponized in the sense, that you can just point it at just any PHP server.And many of them were also partial  without an aslr bypass like mine.But it’s just the first 24 hours.If you don’t recognize that this is insane,I think you suffer from like a  reverse AI psychosis or something.I mean, how can you write?Go ahead, stand up PHP server you think is  vulnerable in Docker and then run a POC yourself.Don’t get your LLM to do it. No.Run the script yourself.The exploits won’t work.Yes, many of these random exploits don’t  work, but why not let your LLM do it?That’s exactly what is different in 2026.

You can take just a docker image and then  let the AI do it for any version you like.My guess is this person doesn’t  really have exploitation experience, or has experience with exploitation  before AI, but it’s different now.And you would recognize this if you  would use AI to do stuff like this.

AI exploit development methodology

So let me share with you my  progress since the last video.So basically the last 24 hours.And yes, it’s going to be a slob again, but  there’s still a process and methodologies to this,which makes the difference between a  fake AI slob exploit and a real one.So in the last video, I showed you how  my agent cheated and used proc mem to, peek into the container to look at the addresses.And that was a mistake in my setup.So that was the first thing that I changed.I got a new VM host and intentionally  didn’t use SSH keys and used the password.So the agent has no way of  accessing the server easily.And then on the server, I created a lab with  various different vulnerable PHP setups,which of course is a bad idea  now that the exploit is public.So I used firewall rules to only allow my  client IP and another Linux VM to access it.And now to prove that an exploit actually  works, I placed a flag in the index PHP file.

Of course here it’s just a test flag, but I  changed it by hand so the agent cannot cheat.Then I gathered all the facts  that we got so far and provided, a lab document about the goal  with the flag, and I tell it,it can use another Linux VM for testing, but  it has to prove it against the actual lab host.I also give it a bit more guidance  to focus on the memory leak first,because this will be a crucial step,  and we were kind of lacking before.And then I’m just sending it.And actually I sent two  agents, one with GPT 5.6 sol,because that’s what I have the  most experience with right now.And it works so well.But I’m also using a GPT six sole agent because  I don’t have that much experience yet with it.And maybe it has a different  approaches and capabilities.And so maybe they can help  each other by dumping their, notes into a shared folder and a progress file.And so this thing ran and it just took  under two hours and we got a flag.

The agent exploited the first service  port 83, which was simply a Docker image.

Exploiting PHP/Apache and WordPress

PHP 8.5.4 Apache.Let’s see it in action.We just start a Docker container  with that image and run the exploit.This takes a bit, and this output here  is already a later version that I’ve been, working on to make it more reliable and work with  more versions, but eventually it will succeed.There we go.Remote code execution.Go ahead, stand up.A PHP server you think is vulnerable in Docker,and then run the POC yourself  by letting your LLM do it.It will just work.So let’s do a real example with WordPress.Here’s a vulnerable example.Image from WordPress. No problem.It will exploit it.So of course it is easy, but there’s  also some hard parts about it.It is still a Use-After-Free that requires careful  heap grooming and offsets for every target.And a few other details.And there are over 400 vulnerable  PHP Apache images alone,but it literally is just one prompt and a bit  of time for an agent to just go through every.

single image and figure out the parameters  for it, and it will do all this work while, you can do other stuff like Shitpost about AI  Slob on Twitter or in the YouTube comments.This is why, in my opinion,this is an easy exploit in 2026 and  why you should take it seriously.Also, by the way, for those that are  interested in more technical videos,explaining stuff just takes time and  I’m still working on the lip details.I’ve actually the next episode  ready where we dive deeper.But now I got sidetracked  with the PHP disclosure topic.But don’t worry about it.Two things can be true at the same time.We use AI professionally and use it  for exploitation because it’s 2026.While we still can be interested in the layers  below and trying to understand how stuff works,if you enjoy my videos, please check out our, cybersecurity training platform.io  and consider a subscription. Thanks!