首頁 >後端開發 >php教程 >php中allow_url_include的應用分析

php中allow_url_include的應用分析

WBOY
WBOY原創
2016-07-25 09:05:41977瀏覽
  1. // Insecure Include

  2. // The following Include statement will
  3. // include and execute everything POSTed
  4. // to the server

  5. include "php://input";

  6. ?>

复制代码

例2: Use data: to Include arbitrary code

  1. // Insecure Include
  2. // The following Include statement will
  3. // include and execute the base64 encoded
  4. // payload. Here this is just phpinfo()

  5. include "data:;base64,PD9waHAgcGhwaW5mbygpOz8+";

  6. ?>
复制代码

把这些放到运算里将会发现既不是url_allow_fopen也不是url_allor_include 被保障。 只是因为过滤器很少对矢量进行过滤。如果要完全解决这个URL include vulnerabilities的方法则需要应用Suhosin扩展。



陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn