Php script against Web scanners

Source: Internet
Author: User
Tags http 200
It is difficult for us to ensure the security of a Web program, because the ghost knows what new vulnerabilities will emerge tomorrow, and the ghost knows whether a module is written by a security-free programmer. Most Web scanners (including the upload and Management backend scanners) determine whether a page exists by judging the HTTP 200 return, these scans start to scan vulnerabilities. Since internal logic cannot be strictly controlled, let's talk about the bottleneck of input/output. when incorrect passwords or permissions fail to be entered, we will return an HTTP message of 400 error to mislead the scanner to stop scanning (including which Manual intruders)
Take PHP as an example:

The code is as follows:


Ob_start ();
If ('password '! = $ _ GET ['password'])
Header ("HTTP/1.1 404 Not Found ");
?>



Sample




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.