text
stringlengths
1
330k
Copyright (C) 2011 Motorola, Inc. All rights reserved.
Motorola Netopia Model NVG510 Wireless-N ADSL AnnexA Ethernet Switch
Running Netopia SOC OS version 9.0.6 (build h2d30)
ADSL capable
(admin completed login: Admin account with read/write access.)
From here, you can do a few different things. This shell is called nsh. If you want to get to a root shell, just type !. At that point, you can do exit to get back to nsh. Also, if you prefer the shell described in the FCC manual (and used by AT&T techs), you can type cshell after getting to the root shell.
How does it work?
I've found a vulnerability in the WebUI of the NVG510 (and other modems) that allows me to execute any command as root. You can utilize this by sending it a specially crafted HTTP request.
So, I use this to download the shell script at and execute it on the modem. What the shell script does is it will install a new service into inetd so that it starts a telnet shell, and I configure it using pfs to be persistent. Otherwise, it would go away after rebooting.
Uninstalling the backdoor
The backdoor installed should be fairly safe, being password protected, but if you're especially worried, then it can easily be uninstalled. Just telnet into the modem, get to the root shell by using !, and then type:
pfs -r /var/etc/inetd.d/telnet28
Note! This backdoor will not be uninstalled with a factory reset or firmware update!. Once you've installed it, it's there until you uninstall it! Again, there should be no risk in leaving it there, it will not be internet accessible. But, it's easy to uninstall as well.
Solving common problems
To confirm you're at nsh, you should see a prompt like this:
The nsh Console
This is the help text for the console, to help you understand:
Axis/124578433> help
help [command] : Get help.
history : Show command history.
get OBJ.ITEM : Get the value of OBJ.ITEM (ITEM is a
OBJ.params' or 'info OBJ.status' to get a
list of the OBJ's parameters and status.
set OBJ.ITEM VALUE : Set the value of OBJ.ITEM to VALUE.
(requires an 'apply')
aget OBJ.ITEM ATTR : Get the OBJ.ITEM's ATTR attribute.
name to set it).
names [OBJ] : Recursively show all object names.
OBJ specified.
apply : Apply changes to the database (changes are
NOT saved).
revert : Revert the database by discarding your
save : Save the database (rewrites config.xml).
defaults : Reset the system back to the factory
defaults (deletes config.xml).
database. Use the optional LEVELS parameter
to limit the depth of the database tree.
dirty [OBJ] : Displays which parameters are dirty.
(expert mode only!).
Without arguments, toggles on and off.
for more information.
may seen on CAPTURE-PORT. Specify "off" to
turn mirroring off.
The optional "all" argument will recursively
reset all children's stats as well. If only
reset all statistics starting at the root
metadata OBJ.PARAM : Returns metadata information about a given
reuse the last URL.
The optional "erase" will erase both current
and last saved crash dump contents.
2). "cancel" argument can be issued to
cancel a previous reboot command.
source FILE : Read and process commands from FILE.
. FILE : An alias for 'source'.
exit : Exit from this shell.
quit : An alias for 'exit'.
magic : Enter magic mode.
crash : Read and Write the Memory mapped registers
Seems simple enough then doesn't it?
Example Configuration
So, let's say you want to enable SSH. The relevant configuration option for this is So, to set this, we type this in:
set 22
This will set the SSH port to 22, rather than disabled. And then, if you're done configuring, you can save and apply the changes by typing these commands in:
That's really about all there is to know. Configuration is super simple.
DNS problem fix
This is provided for historical reasons, but it's WRONG. This will not fix the DNS problems or let you point it at a different DNS server. I don't know why it doesn't work, but I've received multiple reports that it doesn't. Your best bet in this case is to use the true bridge mode and get your own router
ip.dns.domain-name =
ip.dns.primary-address =
ip.dns.secondary-address =
ip.dns.proxy-enable = on
ip.dns.override-allowed = off
Enabling Telnet and/or SSH = 0 = 0
So, to enable these you can just do something like
set 22
set 23
mgmt.remoteaccess[3].protocol = telnet
mgmt.remoteaccess[3].idle-timeout = 5
mgmt.remoteaccess[3].total-timeout = 20
mgmt.remoteaccess[3].max-clients = 4
mgmt.remoteaccess[4].protocol = ssh
mgmt.remoteaccess[4].idle-timeout = 5
mgmt.remoteaccess[4].total-timeout = 20
mgmt.remoteaccess[4].max-clients = 4
Enabling UPnP
mgmt.upnp.enable = off
Disable "Potential Connection Issue" warnings
mgmt.lan-redirect.enable = on
Disabling the DHCP server
conn[1].dhcps-enable = on
Note that you'll have to configure a static IP to the modem to access it after this. I don't see much of a point in disabling it completely.
True Bridge Mode
link[1].type = ethernet
link[1].igmp-snooping = off
link[1].mtu-override = 0
link[1].port-vlan.priority = 0
link[2].type = ethernet
link[2].mtu-override = 0
link[2].supplicant.type = eap-tls
link[2].supplicant.qos-marker = AF1
link[2].supplicant.priority = 0