php中allow-url-include的应用分析
来源:才华咖 本文已影响3.09W人
来源:才华咖 本文已影响3.09W人
php常因为它可能允许URLS被导入和执行语句被人们指责。这是导致称为Remote URL Include vulnerabilities的php应用程序漏洞的最重要的原因之一。就跟随本站小编一起去了解下吧,想了解更多相关信息请持续关注我们应届毕业生考试网!
php常因为它可能允许URLS被导入和执行语句被人们指责。
这是导致称为Remote URL Include vulnerabilities的php应用程序漏洞的最重要的原因之一。
也因为如此,有些安全人员建议在配置中禁用指向allow_url_fopen。
不过,这样会破坏很多的应用并且并不能保证100%的解决remote URL includes以及他带来的不安全性。
通常,用户要求在他们使用其他的文件系统函数的`时候,php允许禁止URL包含和请求声明支持。
鉴于此,计划在PHP6中提供allow_url_include。在这些讨论之后,这些特性在php5.2.0 中被backported。现在大多数的安全研究人员已经改变了他们的建议,只建议人们禁止allow_url_include。
allow_url_fopen和allow_url_include并不是导致问题的原因。一方面来说在应用中包含本地文件仍然是一件足够危险的事情,因为攻击者经常通过sessiondata, fileupload, logfiles,...等方法获取php代码………
另一方面allow_url_fopen和allow_url_include只是保护了against URL handles标记为URL.这影响了http(s) and ftp(s)但是并没有影响php或date(new in php5.2.0) urls.这些url形式,都可以非常简单的进行php代码注入。
例1: Use php://input to read the POST data
复制代码 代码如下:
<?php
// Insecure Include
// The following Include statement will
// include and execute everything POSTed
// to the server
include "php://input";
?>
例2: Use data: to Include arbitrary code
复制代码 代码如下:
<?php
// Insecure Include
// The following Include statement will
// include and execute the base64 encoded
// payload. Here this is just phpinfo()
include "data:;base64,PD9waHAgcGhwaW5mbygpOz8+";
?>
把这些放到运算里将会发现既不是url_allow_fopen也不是url_allor_include 被保障。
只是因为过滤器很少对矢量进行过滤。如果要完全解决这个URL include vulnerabilities的方法则需要应用Suhosin扩展。
英语美文:Olympic Fund Scratchcard Launched
英语四级作文Young People Should Have Ideals
英语短文Do Old Folks Still Appreciate Humor?
Unit1Willpeoplehaverobots的初二年级下册英语知识点
英语阅读推荐:How to protect cultural identity
初三英语《The worlds population Lesson》教案设计
初中英语《Unit 1 Will people have robots》教学设计
英语翻译the world‘s population
Module 3 Unit 2 I love my pocket calculator说课稿
Perseverance will make you successful英语作文
评教研课Unit One Will people have robots?范文
英语阅读范文参考:LovePeopleInAllKindsOfWeather
高中英语作文:My approach to difficulties in learning
英国文学I wondered lonely as a cloud的赏析整理
英语阅读:Covergirl unveils empowering brand update
Health in developing countries大学六级英语写作范文
英语作文:Gulangyu,A fairyland in the world
水利中的土石坝施工技术应用分析
英语阅读:Why Apple says it's slowing down older iPhone
On the losing of Traditional Culture英语四级作文
英语阅读:Dollar Hit by Trump Tax Plan Doubts
Unit3Onlinetravel(SpeakupandStudyskills)学案
php中file-get-contents与curl性能分析
四年级上册Module8 UNIT1 What did she play说课稿
allow的用法和例句
英语作文 Complaint about the Noise Pollution
Jolie drops battle over perfume named Shilohy英语作文
高中英语作文:Wonderful life in winter holiday
php中file-get-contents与curl性能比较分析
PHP中include和require的区别
Is Money All-powerful英语作文
Wonderful life in winter holiday作文(精选14篇)
php的file-get-contents与curl性能分析
学个词 Learn A Word:1285 uphold
JavaScript中null和undefined的异同
BP神经网络实现函数逼近的应用分析
How To Control The Population英语作文
Unit 1 London is the capital of England说课稿
php中file-get-contents与curl性能比较分析的内容
关于新目标英语八年级下学期Unit 1 Will people have ?