How to use 'PHP” easter eggs to obtain sensitive information_PHP Tutorial

WBOY
Release: 2016-07-21 14:59:31
Original
928 people have browsed it

Perhaps many old PHPers have already known or heard about the term "PHP Easter Egg". It seems that there were Easter eggs as early as the PHP4 version. It is quite fun. It may have been gradually forgotten by people in recent years. In fact, The Easter egg function is enabled by default in the PHP script engine.

Write phpinfo(); and then access it, plus the following GET value to view it
Let’s use the Discuz official forum to do a test:
http://www. discuz.net/?=PHPE9568F34-D428-11d2-A769-00AA001ACF42
http://www.discuz.net/?=PHPE9568F35-D428-11d2-A769-00AA001ACF42
http://www.discuz.net/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://www.discuz.net/?=PHPB8B5F2A0 -3C92-11d3-A3A9-4C7B08C10000
The red part of the four links above is the GUID value defined in the PHP source code/ext/standard/info.h, as shown in the figure below


Regarding the PHP easter egg, this method has been used by some foreign web vulnerability scanners (such as HP WebInspect) to detect what web development language the scanned website uses. In fact, during the penetration testing process, it is often difficult to identify which web development language is used on some websites, because some websites use dynamic scripts to generate purely static HTML pages or use URL rewriting to implement pseudo-static pages. If the website uses PHP If you are developing, you can try to use the Easter egg detection method. In many cases, you can pinpoint the identification, because the Easter egg function is enabled in php.ini by default. Of course, if you don’t want others to obtain the website through Easter eggs. For sensitive information, just set expose_php = Off in php.ini!

After reading the above, some people may say that since expose_php = On in php.ini, then it is OK to just capture the packet and look at the http header information. However, some large site web servers have reverse directions in front of them. Proxy server, so it cannot completely rely on capturing the information in the http header.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/328144.htmlTechArticlePerhaps many old PHPers have already known or heard about the "PHP Easter Egg", it seems that it was as early as PHP4 There are Easter eggs in the version, which are quite fun. They may have been gradually forgotten by people in recent years...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!