macsat.com OpenWrt and ASUS WL Forum
March 14, 2010, 20:06:59 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: enable telnetd on unmodified firmware (temporary)  (Read 10361 times)
0 Members and 2 Guests are viewing this topic.
zeroxfer
Newbie
*
Offline Offline

Posts: 1


View Profile
« on: September 29, 2007, 21:18:49 PM »

My Device is SMCWAPS-G with an internal HD.  This concept should work on other brands as well.  Here's one way to enable telnetd on unmodified firmware by using FTP and backup_usb.sh.  This mod will reset after you reboot the Device.


SMC Firmwares
http://62.168.45.50/smc/drivers/storage/WAPS-G/
http://62.168.45.50/smc/drivers/storage/WAPS-G/R400b8a/

R4.00b8a   2006/9/8   
Fix the problem: After upgrading the firmware R400b8, SMC_WAPS-G will may not start the internal harddisc sometimes.

R4.00b8      2006/8/24   
If harddisc has been idle for more 5 minites, it will become powerdown state.

R4.00b5v4   2006/3/13   
Modified the "Router" texts to "SMCWAPS-G" in Backup setting option.

R4.00b5v3   2006/3/10      
Modified all "barricade" texts to "SMCWAPS-G" in UI.  added a message on login page.( the default password is smcadmin!)

** R4.00b5v3 & R4.00b5v4 has telnetd in busybox.
** R4.00b8a has no telnetd. 
** If your device is not SMC, please follow direction to change firmware header


-------
Steps
-------

1. Enable FTP on the Device

-----------

2. How to enable FTP for root with / folder access?

a. FTP into Device using Username nobody and Password of <blank> (no password).  Filezilla is a good FTP app to use.

b. Download /etc/passwd to your computer

c. Edit local copy of passwd and change root account to following (set root's password to same as nobody's)
root:$1$$qRPK7m23GJusamGpoGLby/:0:0:root:/:/bin/ash

d. FTP into Device using Username nobody and upload local passwd file to /etc/passwd

e. Now you can FTP as Username root and Password of <blank> (no password) with access to root directory

f. If you mess up passwd file and lock yourself out, please reboot the Device to reload passwd.

-----------

3. Busybox with telnetd?  Get a file listing of /sbin.  If your busybox has telnetd, you will see the file telnetd.  If your version of busybox has no telnetd, you can get another version of busybox with telnetd.  SMC's R4.00b5v4 busybox has telnetd.  You can obtain it thru:
a. Flash R4.00b5v4's firmware.  Download R4.00b5v4's /bin/busybox as busybox.b5v4  (thru FTP)
b. Download and extract attached file busybox.b5v4.zip
c. Download from URL http://rapidshare.com/files/59329456/busybox.b5v4.html

If your busybox has no telnetd:
a. Upload busybox.b5v4 to /bin/busybox.b5v4
b. Set execute permission on busybox.b5v4 (thru FTP)

-----------

4. Start telnetd in /bin/backup_usb.sh (backup function).

a. FTP into Device as root. 

b. Download /bin/backup_usb.sh to local

c. Modify local file backup_usb.sh and add "busybox telnetd &" or "busybox.b5v4 telnetd &" after the first line.
#!/bin/sh
busybox telnetd &
#   or
# busybox.b5v4 telnetd &   
#   or
# telnetd &

d. Insert a flash drive into Device's USB port

e. On the Device, hold down backup button for 4+ seconds to start /bin/backup_usb.sh.  This will start telnetd.

-----------

5. Telnet into the Device as Username root and Password of <blank> (no password)


* busybox.b5v4.zip (107.45 KB - downloaded 366 times.)
« Last Edit: October 02, 2007, 00:25:54 AM by zeroxfer » Logged
firetwister
Newbie
*
Offline Offline

Posts: 18


View Profile
« Reply #1 on: October 09, 2007, 09:11:39 AM »

Thank you for the information.
I tried to get telnetd and dropbear ssh working, but failed.
Telnetd reported "all terminals in use". However no pty support in kernel would be more precise.
I was also not able to overwrite busybox, but I didn't try it with ftp. I used the /-symbolic link directory traversal hack, I described here: http://www.macsat.com/macsat/component/option,com_openwiki/Itemid,66/id,temporary_modifications_to_the_initrd/

I have a Level-1 WAP-0007

Seems like no telnetd for me without updating the kernel, but I also need netfilter, which also cannot be loaded completely as module Sad
Logged
Ernst
Full Member
***
Offline Offline

Posts: 112



View Profile
« Reply #2 on: January 13, 2008, 01:17:47 AM »

Hi,

Just a short note; I tried this route but on my CHD2WLANU (both b5 and b7 software) the user nobody does have a password so this trick doesn't work. Flashing it with b7unlock and then with Schufti's 400s0 worked fine; I now have telnet and autoexec.

Ernst
Logged
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #3 on: January 13, 2008, 01:29:55 AM »

Hi!

Don't use the damn b7unlock. Nowadays for all vendors there is an GPL capable FW available (even from perl). With that FW you can load any of my update FW and hey-presto telnet is enabled.

b7unlock users:
depending on what box you had, you will panic if you try to do the next orig FW update...

schufti
Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
tcc1000
Newbie
*
Offline Offline

Posts: 20


View Profile
« Reply #4 on: January 13, 2008, 12:53:27 PM »

Actually, Safecom don't appear to have released any new firmware since the box first came out.
Logged
jimcpl
Jr. Member
**
Offline Offline

Posts: 75


View Profile
« Reply #5 on: September 01, 2008, 03:47:13 AM »

Hello,

I'm new here, but I just got an SMCWAPS-G.  The FW version is R4.00b5v3.

I wanted to try to enable telnet per the original post.

I can FTP in as "nobody", and get the /etc/passwd file, but when I cannot upload to the SMCWAPS-G.  When I try to upload I get "Unable to create file".

Here's what "/" looks like when I FTP in as "nobody":

ftp> pwd
257 "/"
ftp> ls -al
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
drwxr-xr-x   18 0        0            1024 Aug 30 23:50 .
drwxr-xr-x   18 0        0            1024 Aug 30 23:50 ..
drwxr-xr-x    2 0        0            1024 Aug 30 23:50 Configure
drwxr-xr-x    2 0        0            1024 Jan 11  2006 bin
drwxr-xr-x    3 0        0            6144 Aug 30 23:50 dev
drwxr-xr-x    6 0        0            1024 Aug 30 23:50 etc
drwxr-xr-x    2 0        0            1024 Jan 11  2006 home
drwxr-xr-x    4 0        0            1024 Jan 11  2006 lib
drwxr-xr-x    3 0        0            1024 Jan 11  2006 libexec
lrwxrwxrwx    1 0        0              11 Jan 11  2006 linuxrc -> bin/busybox
drwx------    2 0        0           12288 Jan 11  2006 lost+found
drwxr-xr-x    4 0        0            1024 Aug 30 23:50 mnt
dr-xr-xr-x   39 0        0               0 Aug 30 23:50 proc
drwxr-xr-x    2 0        0            1024 Jan 11  2006 root
drwxr-xr-x    2 0        0            1024 Jan 11  2006 sbin
dr-xr-xr-x    3 0        0            1024 Aug 31 06:36 share
drwxr-xr-x    2 0        0            1024 Jan 11  2006 tmp
drwxr-xr-x    3 0        0            1024 Aug 30 23:50 usr
drwxr-xr-x    7 0        0            1024 Aug 31 06:36 var
226 Directory send OK.
ftp: 1198 bytes received in 0.01Seconds 119.80Kbytes/sec.
ftp>

I guess that it looks like everything is owned by root:root, so the "nobody" user can't write to the filesystem, so I was wondering how to accomplish what was described in the original post on this thread?

Thanks,
Jim
Logged
jmp2nop
Newbie
*
Offline Offline

Posts: 5



View Profile
« Reply #6 on: February 14, 2009, 22:21:20 PM »

Hi,

I have the same problem that jimcpl encountered.  Do I need to upgrade to newer version first ?

Should I go for version R4.00c2_0130 ?
« Last Edit: February 14, 2009, 22:27:13 PM by jmp2nop » Logged

"All that we are is the result of what we have thought." Buddha
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #7 on: February 15, 2009, 10:21:49 AM »

Hi!

yes, this version should enable you to load the (much improved) upgrade FWs (with telnet autom. enabled).

schufti
Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
jmp2nop
Newbie
*
Offline Offline

Posts: 5



View Profile
« Reply #8 on: February 15, 2009, 17:11:02 PM »

I just updates to R4.00c2_0130.  Would you have a copy of R4.00b5v3 just in case I need to downgrade ?
Logged

"All that we are is the result of what we have thought." Buddha
jmp2nop
Newbie
*
Offline Offline

Posts: 5



View Profile
« Reply #9 on: February 15, 2009, 18:19:56 PM »

Still no permission to "put" the passwd file back.  Please note that now passwd is at /var/config

Any ideas ?
Logged

"All that we are is the result of what we have thought." Buddha
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #10 on: February 15, 2009, 20:05:17 PM »

Hi,

why would you want to put the password file back via ftp?
You presumably don't have root privileges in ftp, so no luck....

schufti
Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
jmp2nop
Newbie
*
Offline Offline

Posts: 5



View Profile
« Reply #11 on: February 16, 2009, 14:42:34 PM »

I'm following zeroxfer instructions on how to enable telnet to the smcwaps-g as for this discussion topic. Undecided
Logged

"All that we are is the result of what we have thought." Buddha
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #12 on: February 16, 2009, 15:26:52 PM »

yes, but there are much better ways to get telnet running on your box.
that's the point I wanted to make...

plus the hint that the big security hole has been fixed in recent firmwares...
(or do you consider it good practise to allow "nobody" to upload a new password file?)

schufti
« Last Edit: February 16, 2009, 15:31:37 PM by schufti » Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
jmp2nop
Newbie
*
Offline Offline

Posts: 5



View Profile
« Reply #13 on: February 18, 2009, 12:59:58 PM »

Good news! Could you please indicate the "howto" topic link that really works ?
« Last Edit: February 18, 2009, 13:01:49 PM by jmp2nop » Logged

"All that we are is the result of what we have thought." Buddha
schufti
Sr. Member
****
Offline Offline

Posts: 272



View Profile WWW
« Reply #14 on: February 18, 2009, 21:50:56 PM »

it's as easy as flashing the uc3gui and latest upgrade-fw from my repository ...
sry, no howto available, only 100s of postings.... e.g. http://www.macsat.com/macsat/component/option,com_smf/Itemid,50/topic,764.0/
Logged

I won't answer posts or PMs about repair/recovery after bad flash until proven that the wiki was read and followed!
find all my MGB100 files here, pass: mgb100
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.063 seconds with 25 queries.