PDA

Bekijk de volledige versie : HowTo setup a TELNET Daemon



Antiloop
11-12-2003, 21:34
here i'll explain very simple how to setup a telnet daemon, so you can telnet to your router

BE CAREFULL, PORT 23 WILL BE EXPOSED TO YOUR WAN TOO!!!!
THE TELNET DAEMON DOES NOT ASK FOR A PASSWORD!!!

step one: setup your FTP to access your root, can be found in the HTT Forum

step two: upload those files to the /tmp/ directory in your router
http://files.wl500g.info/asus/wl500g/telnetd/busybox
http://files.wl500g.info/asus/wl500g/telnetd/telnetd

if this doesn't work upload those files too:
http://files.wl500g.info/asus/wl500g/telnetd/faucet
http://files.wl500g.info/asus/wl500g/telnetd/modules
http://files.wl500g.info/asus/wl500g/telnetd/mysh
http://files.wl500g.info/asus/wl500g/telnetd/strace

step three: perform those four commands, and you are ready to telnet to your router: telnet://my.router

chmod a+x /tmp/busybox
chmod a+x /tmp/telnetd
ln -s /tmp/busybox /tmp/sh
/tmp/telnetd -d -l /tmp/sh &

to perform those commands:
open up the 'System Command' page at
http://my.router/Main_AdmStatus_Content.asp
fill in the command you wan't to execute
and push the Refresh button (DO NOT hit the enter your keyboard, the command won't be executed then)

rrrs
11-12-2003, 21:41
You could disallow connections from the wan port with iptables, right?? That would make it less unsafe. :)

RR

DeF
09-05-2004, 20:05
For the WL-500g(and maybee others) it is also possible to use the built-in busybox. To do this use the following commands instead:



chmod a+x /tmp/telnetd
/tmp/telnetd -d -l /bin/sh &


The built-in busybox give's you the following commands:
[, ash, basename, busybox, cat, chmod, cp, date, dmesg, echo,
false, grep, ifconfig, init, insmod, kill, killall, klogd, linuxrc,
ln, logger, ls, lsmod, makedevs, mkdir, mknod, more, mount, mv,
ping, ps, pwd, reboot, rm, rmdir, rmmod, route, sed, sh, sleep,
sync, syslogd, telnet, test, tftp, true, umount, uudecode, uuencode

ps. in the 1.7.5.6 firmware the telnet poort is blocked on the WAN side by the firewall. so it should be secure if you thrust the people on your lan/wlan.

vox
14-09-2004, 22:56
[QUOTE=Antiloop]here i'll explain very simple how to setup a telnet daemon, so you can telnet to your router

BE CAREFULL, PORT 23 WILL BE EXPOSED TO YOUR WAN TOO!!!!
THE TELNET DAEMON DOES NOT ASK FOR A PASSWORD!!!

step one: setup your FTP to access your root, can be found in the HTT Forum

Hello i have 1.8.1.3 and i canīt access de FTP root with the help of the HTTP forum.

Is there another way?

tks

Vox

Antiloop
14-09-2004, 23:29
[QUOTE=Antiloop]here i'll explain very simple how to setup a telnet daemon, so you can telnet to your router

BE CAREFULL, PORT 23 WILL BE EXPOSED TO YOUR WAN TOO!!!!
THE TELNET DAEMON DOES NOT ASK FOR A PASSWORD!!!

step one: setup your FTP to access your root, can be found in the HTT Forum

Hello i have 1.8.1.3 and i canīt access de FTP root with the help of the HTTP forum.

Is there another way?

tks

Vox

if you have a usb-hd/key inserted upload the needed files to your harddrives root after that copy files via the commandline ( http://my.router/Main_AdmStatus_Content.asp )



cp /tmp/harddisk/busybox /tmp/busybox
cp /tmp/harddisk/telnetd /tmp/telnetd

vox
19-09-2004, 19:20
cp /tmp/harddisk/busybox /tmp/busybox
cp /tmp/harddisk/telnetd /tmp/telnetd
[/QUOTE]

Hello Antiloop!

tks for help. i still canīt telnet.

I can copy the files, but wen i put the commands:

chmod a+x /tmp/busybox
chmod a+x /tmp/telnetd
ln -s /tmp/busybox /tmp/sh
/tmp/telnetd -d -l /tmp/sh &

it doesnīt do nothing.

One question:

ln -s /tmp/busybox /tmp/sh
/tmp/telnetd -d -l /tmp/sh &

is this one line of command only?
because i have tried this with one and tue but nothing

tks for the help hope to hear from you all

vox

Spot
03-10-2004, 11:04
step two: upload those files to the /tmp/ directory in your router
http://files.wl500g.info/asus/wl500g/telnetd/busybox
http://files.wl500g.info/asus/wl500g/telnetd/telnetd


Hi Antiloop,

Clicking those urls gives me lots of codes... in the web browser!
> Is it normal?
> If yes, how to upload these files to my USB stick?

PS: I'm running fw 1.8.1.9 and I can acces my ftp root.

Styno
03-10-2004, 15:29
No. Your browser should open a 'download dialog box'. If it doesn't you can also try to save it by savind the source code (right click on the webpage and select 'view source').

brubber
03-10-2004, 19:53
No. Your browser should open a 'download dialog box'. If it doesn't you can also try to save it by savind the source code (right click on the webpage and select 'view source').

Yeah, or click on the link with your right mouse button and select "save target as"

Spot
03-10-2004, 22:58
No. Your browser should open a 'download dialog box'. If it doesn't you can also try to save it by savind the source code (right click on the webpage and select 'view source').

Everything works... :)
Thanks!

It seems that nor built-in busybox nor the one that I've downloaded from chupa contains vi! Is there full version of the busybox that can hold into the wl500g?

Antiloop
04-10-2004, 02:24
Everything works... :)
Thanks!

It seems that nor built-in busybox nor the one that I've downloaded from chupa contains vi! Is there full version of the busybox that can hold into the wl500g?
execute it as ./tmp/busybox vi

kuen
04-10-2004, 05:40
for fw 1.8.1.9, I stopped at step one: setup your FTP to access your root neither click the url nor manually append text to /tmp/stupid-ftpd.conf

so, I copy all correspond files to usb-hd via FTP and mount the usb-hd to /mnt

after running the commands by Main_AdmStatus_Content.asp:
chmod a+x /mnt/telnetd
/mnt/telnetd -d -l /bin/sh &

I can telnet my.router but no any authentication.
Is any configuration missed?

Spot
04-10-2004, 08:18
execute it as ./tmp/busybox vi

OK... It works fine with the busybox dowloaded from chupa but not whith the built-in one.
Is there a another path for this one?

(sorry for these basical questions... but the way to proceed differs with custom fw... :o )

Styno
04-10-2004, 08:26
OK... It works fine with the busybox dowloaded from chupa but not whith the built-in one.
Is there a another path for this one?

(sorry for these basical questions... but the way to proceed differs with custom fw... :o )if you type 'busybox' whithout any parameters, it will give you a list of applications it contains. Probably vi isn't one of them. Therefore you need the full busybox in you temp directory...

kuen
04-10-2004, 08:49
the busybox download from http://files.wl500g.info/asus/wl500g/telnetd/busybox

and also saved to the ftp-hd root

ls /mnt
etc
ftp_pub
ftp_pvt
part1
partWeb
busybox
faucet
modules
mysh
strace
telnetd

I have run these two commands before running telnetd
chmod a+x /mnt/busybox
ln -s /mnt/busybox /bin/sh

Spot
04-10-2004, 13:42
if you type 'busybox' whithout any parameters, it will give you a list of applications it contains. Probably vi isn't one of them. Therefore you need the full busybox in you temp directory...

Great... I can check it all! :cool:
Built-in busybox (v0.6) doesn't contain vi!
What's making me confuse is that installing full busybox don't desable the built-in one! And when calling busybox from the root, you activate this one... ;)

Thanks a lot for your attention.

Styno
04-10-2004, 14:27
Great... I can check it all! :cool:
Built-in busybox (v0.6) doesn't contain vi!
What's making me confuse is that installing full busybox don't desable the built-in one! And when calling busybox from the root, you activate this one... ;)

Thanks a lot for your attention.
Well, standard one is in the system path. So, if you don't give the path to the full busybox, it will use default one.

You are not 'installing' busybox, but just copying it on the box, so its just another executable...