php cve-2014-8142漏洞,Drupal 7.31 SQL注入漏洞(CVE-2014-3704) EXP测试代码

本文详细介绍了Drupal 7.31的SQL注入漏洞(CVE-2014-3704)的原理,以及PHP CVE-2014-8142漏洞的相关信息。提供了EXP测试代码供安全研究和教学使用,强调仅供合法目的,禁止非法利用。
摘要由CSDN通过智能技术生成

*本文中涉及到的相关漏洞已报送厂商并得到修复,本文仅限技术研究与讨论,严禁用于非法用途,否则产生的一切后果自行承担。

8bbf8e17492b04889eaa740402eb69e5.png

最近频繁爆发各种0day,真是把大家累坏了。Drupal 7.31 SQL注入漏洞(CVE-2014-3704)就是其中一个,该漏洞利用测试方法“简单粗暴”,受到安全研究者们的青睐。

Drupal Sql注入漏洞原理是酱紫的,Drupal在处理IN语句的时候,要通过expandArguments函数来展开数组。由于expandArguments函数没有对当前数组中key值进行有效的过滤,给攻击者可乘之机。攻击者通过精心构造的SQL语句可以执行任意PHP代码。

expandArguments函数如下protected function expandArguments(&$query, &$args) {

$modified = FALSE;

// If the placeholder value to insert is an array, assume that we need

// to expand it out into a comma-delimited set of placeholders.

foreach (array_filter($args, 'is_array') as $key => $data) {

$new_keys = array();

foreach ($data as $i => $value) {

// This assumes that there are no other placeholders that use the same

// name.  For example, if the array placeholder is defined as :example

// and there is already an :example_2 placeholder, this will generate

// a duplicate key.  We do not account for that as the calling code</

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值