php中allow_url_include的应用分析

时间:2016-07-25 09:05:41 来源:互联网 作者: 神秘的大神 字体:

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