Home > Backend Development > PHP Tutorial > PHP Security - Backdoor URL

PHP Security - Backdoor URL

黄舟
Release: 2023-03-05 21:26:02
Original
1910 people have browsed it



Backdoor URL

A backdoor URL refers to a resource that can be accessed directly through the URL without being directly called. For example, the following WEB application may display sensitive information to logged-in users:

<?php
 
  $authenticated = FALSE;
  $authenticated = check_auth();
 
  /* ... */
 
  if ($authenticated)
  {
      include &#39;./sensitive.php&#39;;
  }
 
  ?>
Copy after login

Since sensitive.php is located in the main directory of the website, the browser can skip the verification mechanism and access the file directly. This is because all files in the main directory of the website have a corresponding URL address. In some cases, these scripts may perform an important operation, which increases the risk.

To prevent backdoor URLs, you need to make sure to save all included files outside of your website's home directory. All files saved in the home directory of the website must be directly accessed through URL.

The above is the content of PHP Security-Backdoor URL. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!


Related labels:
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