Introduction to PHP egg information and methods to prevent leakage (hidden function)

Source: Internet
Author: User
This article mainly introduces the introduction of PHP eggs and how to prevent leaks. PHP eggs refer to some hidden functions. If you do not pay attention to this issue, they will be exploited by hackers. For more information, see

This article mainly introduces the introduction of PHP eggs and how to prevent leaks. PHP eggs refer to some hidden functions. If you do not pay attention to this issue, they will be exploited by hackers. For more information, see

Easter Eggs (Easter Eggs) outsiders probably don't know about it. The online explanation of Easter Eggs is: used to hide functions or information in computer, video game, computer game, video album, or other interactive multimedia. PHP contains a security vulnerability that may result in unauthorized information disclosure. If you are running PHP, you may find the PHP version and other sensitive information. I think it is necessary to solve this problem to ensure the security of your website.

How PHP egg works

You can add the following string after the domain name to access any webpage on the server running PHP:

The Code is as follows:


? = PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 (PHP info List)
? = PHPE9568F34-D428-11d2-A769-00AA001ACF42 (php logo)
? = PHPE9568F35-D428-11d2-A769-00AA001ACF42 (Zend LOGO)
? = PHPE9568F36-D428-11d2-A769-00AA001ACF42 (php logo blue elephant)

Of course, if the vulnerability exists, you can view the information above. Currently, most websites are blocked. However, if expose_php is enabled, PHP will generate a page to send the PHP version information, in this way, some "bad guys" will know your version number to use known version vulnerabilities for attacks.

How to stop eggs

In general, if your server supports editing the php. ini file, we can set expose_php in php. ini to Off to block it. If you cannot operate the php. ini file, you can also set. htaccess to block it.

The Code is as follows:


RewriteCond % {QUERY_STRING} \ = PHP [0-9a-f] {8}-[0-9a-f] {4}-[0-9a-f] {4}-[0-9a-f] {4}-[0-9a-f] {12} [NC]
RewriteRule. *-[F]


Through the above two methods, we can shield some PHP information. Some servers enable expose_php by default, so it is best for my friends to close this article.

Really appreciate it Jeff Starr's post expose_php, Easter Eggs, and. htaccess.

Example:

The Code is as follows:





,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.