当前位置:Gxlcms > PHP教程 > php中allow_url_include的应用分析

php中allow_url_include的应用分析

时间:2021-07-01 10:21:17 帮助过:5人阅读

  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扩展。

人气教程排行