DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2007-12-05 13:09:00

Seyefa
Member
Registered: 2007-12-05
Posts: 5

Telnet, custom firmware

Hey,

I own a DNS-313 since yesterday and was happily surprised to find out afterwards you might be able to customize it. (That was when I was looking for a way to get the device to work with my PS3 :s)

Has anyone managed to get anything custom to work on the DNS-313 yet, especially telnet? I tried using various DNS-323 telnet stuff but that didn't work. I can log in, but then I get the message "cannot change to home directory" and then a BusyBox message and that's it, no prompt, no response to commands.

I did find the following link to what I suppose is the DNS-313 firmware source code:

ftp://ftp.dlink.se/Products/dns-product … _firmware/

I'm not too good with compiling and stuff myself, but maybe that link will help someone.

Regards,
Seyefa

Last edited by Seyefa (2007-12-05 13:16:20)

Offline

 

#2 2007-12-05 15:18:28

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Telnet, custom firmware

Seyefa wrote:

I did find the following link to what I suppose is the DNS-313 firmware source code:
ftp://ftp.dlink.se/Products/dns-product … _firmware/

Not sure how seriously it can be taken (might be just false positive) but my virus scan at proxy server did got this thing:

Code:

InterScan Web Security detected malicious code in your web traffic:

Item: http://ftp.dlink.se/Products/dns-products/dns-313/drivers_firmware/dns313_GPL.rar
Action: deleted

Infection detail:

-- File: Image/src/sl-boot/tools/sl_imghdr/win32/Debug/sl_imghdr.exe, Enclosure: dns313_GPL.rar, malicious code name: PE_TENGA.A
-- File: Image/src/sl-boot/tools/sl_merge/win32/Debug/sl_merge.exe, Enclosure: dns313_GPL.rar, malicious code name: PE_TENGA.A
-- File: Image/toolchain/bin/ClicknConnect.exe, Enclosure: dns313_GPL.rar, malicious code name: PE_TENGA.A
The uncleanable file is deleted.

From description, this virus sounds seriously nasty (for windows users of course).

And about telnet, you need to fix user home directory, which you are using to log in to your device. Home directory locations is stored to /etc/passwd file. And to get a prompt you need a usable shell, which you can also set from /etc/passwd file.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#3 2007-12-05 15:30:15

Seyefa
Member
Registered: 2007-12-05
Posts: 5

Re: Telnet, custom firmware

Hm, I'll try myself tonight and see what my virusscanner says. Think it would be strange though if DLink would put up anything infected, but then again, I'm sure it's not the first time.

Just an extra question, what the heck can you do with that package anyway? Thought it would just be source code, but seeing the log, it contains .exe files too.

Edit: I'll try that with telnet tonight. I read about the etc/passwd before, but I couldn't find it on my disk. (Forgive my noobness, I'm new to all this, but it's very interesting smile)

Last edited by Seyefa (2007-12-05 15:34:40)

Offline

 

#4 2007-12-05 15:38:09

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Telnet, custom firmware

D-link and some other GPL code users sometimes don't clean up (make clean / make distclean). As a result, compiled files will stay in tarballs.
Its not all bad, because sometimes some files don't compile at all, because of missing dependencies (proprietari dependencies), so in this case you can use some of recompiled files which did came with source tarball.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#5 2007-12-05 15:40:51

sala
Member / Site Admin
From: Estonia
Registered: 2006-07-28
Posts: 731
Website

Re: Telnet, custom firmware

Did telenet run in this device by default?
You need to test if fun_plug works. You can read about fun_plug and how to get it working from DSM-G600 or DNS-323 wiki's.


DSM-G600 - NetBSD hdd-boot - 80GB Samsung SP0802N
NSA-220 - Gentoo armv5tel 20110121 hdd-boot - 2x 2TB WD WD20EADS

Offline

 

#6 2007-12-05 15:46:43

Seyefa
Member
Registered: 2007-12-05
Posts: 5

Re: Telnet, custom firmware

I did the fun_plug stuff. After rebooting I had a directory fun_plug.d instead of fun_plug.d.tar file. Am I right when I think the fun_plug startup script unpacked the .tar file, or does the DNS-313 just display .tar files as directories after reboot?

Offline

 

#7 2007-12-06 00:44:17

slibbe
Member
Registered: 2007-12-02
Posts: 5

Re: Telnet, custom firmware

Telnet getting the busybox message an so on.. is in my case using a Windows machine. No funplug or whatever used.

I suppose this funplug stuff is for accessing from some *nix machine.

Offline

 

#8 2007-12-06 10:12:10

Seyefa
Member
Registered: 2007-12-05
Posts: 5

Re: Telnet, custom firmware

It should work no matter what OS you have, the telnet server is running on the DNS in all cases, so the only difference should be the telnet client you use. One thing to take into account when using Windows is that when you edit files for the DNS you have to save them using LF as enters instead of CR LF (which means, don't use Notepad but TextPad or UltraEdit).

Tested a little bit more yesterday. The fun_plug script is definately running. Fonz' scripts are executing, including the ones in the start directory. But in the log it says things like, telnetd: no such file. Same for the other apps the scripts try to run. Execute bit is set though for these apps. Tested this by redirecting ls -l to the logfile. Modified the scripts to the path is hardcoded, etc, but that didn't make a difference.

Some tips on what to do next would be nice, I'm not too good with things like this and def a Linux noob smile

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB