Abusing PHP's Easter Eggs: Revealing PHP Versions

1:09 PM

PHP Comes with some easter eggs for fun. today, I will try to share the way I use to identify the PHP version of a website as an alternative way. This way is useful for information gathering when the traditional nmap scanning & X-Powered-By headers get filtered.

If you add the value "?=PHPE9568F36-D428-11d2-A769-00AA001ACF42"  to the end of any URL that is a PHP page, you will see a funny picture on *most* servers. Note this trick does not work on big sites like Facebook.

There is a hidden function in PHP, which is NOT documented in php.net online manual. php_egg_logo_guid().
The function is defined as a macro preprocessor in php-src/ext/standard/info.h around line 54,

 


The easter egg on april 1 (april fool's) will replace the PHP logo on any phpinfo() page. If the php directive expose _php is set to "off" in php.ini, then the PHP eggs will not show. it is "on" by default. 3 of the web hosting servers I have tried, all of them, did not change it.


?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 is interesting. Below are 6 different images that will be displayed depending on the PHP version.


If the first brown dog appeared, PHP Version 4.3.0 - 4.3.10
If the black dog appeared, PHP Version is PHP Versions 4.3.11 - 4.4.6; and 5.0.4 - 5.1.2
If colored php logo, PHP Version 5.1.3 - 5.2.13
The guy with breadsticks means, PHP Version 4.0.0 - 4.2.3
If the bunny appeared, PHP Version 5.0.0 - 5.0.3
Or else, if the elephant appeared, PHP Version 5.3.0 - current

And easy as that, we have our PHP version range.
the easter eggs also contain, ?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 for PHP credits.
which is almost very similar interface of the phpinfo() page.
Also?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 to identify the zend engine php uses, which is an alternative way of version identification depending on the logo.




Out of Topic, People need to listen to this amazing song. I loved it.

Happy Hacking :)

You Might Also Like

17 comments

  1. Awesome article. thanks for sharing.

    ReplyDelete
  2. Bluehost is the best web-hosting provider with plans for all of your hosting needs.

    ReplyDelete
  3. Nice it seems to be good post... It will get readers engagement on the article since readres engagement plays an vital role in every blog.. i am expecting more updated posts from your hands.
    iOS Training in Chennai
    Android Training in Chennai
    php Training in Chennai

    ReplyDelete
  4. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...
    PHP training in chennai

    ReplyDelete
  5. Thanks, great post. I find your opinion quite interesting, but the other day I stumbled upon a completely different advice from another blogger, I need to think that one through, thanks for posting.
    earn money online without investment

    ReplyDelete
  6. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...

    Android App Development Company

    ReplyDelete
  7. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    web design Company
    web development Company
    web design Company in chennai
    web development Company in chennai
    web design Company in India
    web development Company in India

    ReplyDelete
  8. I am expecting more interesting topics from you. And this was nice content and definitely it will be useful for many people.
    iOS App Development Company
    iOS App Development Company

    ReplyDelete
  9. All are saying the same thing repeatedly, but in your blog I had a chance to get some useful and unique information, I love your writing style very much, I would like to suggest your blog in my dude circle, so keep on updates…
    Web Designing Training in Chennai|Java Training in chennai |Python Training in Chennai

    ReplyDelete
  10. I wondered upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

    Fitness SMS
    Fitness Text
    Salon SMS
    Salon Text
    Investor Relation SMS
    Investor Relation Text

    ReplyDelete
  11. it is really amazing...thanks for sharing....provide more useful information...
    Mobile app development company

    ReplyDelete
  12. iam regular reader of your blog and no doubt it all stuff is awesome. The best thing about your sharing and posting is that you always provide content that is helpful for both the newbie and experts. Looking for more stuff and tutorials.

    White Label Website Builder

    ReplyDelete
  13. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    web design Company
    web development Company
    web design Company in chennai
    web development Company in chennai
    web design Company in India
    web development Company in India

    ReplyDelete
  14. very helpful post for those who are new and thinking to start a blog site.Your posts are very helpful and creative. I have atlast opened a blog site being inspired from your articles…


    IOT Application Development Company
    artificial intelligence company India
    best automation company India
    machine learning company India
    Deep Learning company in India
    Data science company in India

    ReplyDelete
  15. Being new to the blogging world I feel like there is still so much to learn. Your tips helped to clarify a few things for me as well as giving..
    Texting API
    Text message marketing
    Digital Mobile Marketing
    Sms API
    Sms marketing

    ReplyDelete