Page 7 of 26

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sat Jun 21, 2014 10:01 pm
by bobiturboto
sectroyer wrote:
bobiturboto wrote:Update:
I have replaced busy box with the original one (that coming with the hack), and after reboot I have telnet but no ssh access.
Now my telnet prompt looks like this:

Code: Select all

Trying 192.168.0.101...
Connected to 192.168.0.101.
Escape character is '^]'.
root@tv:\w \$
Is my passwd file with correct format?

Code: Select all

root:$1$DEfAJ8Lp$cPsL2pjhMwzwjCoaC.Oxy.:0:0:SamyGO secured Root:$NEW_HOME:$SYSROOT/bin/ash
This prompt means you didn't correctly mount the /bin/sh. Besides you modify my lines!!! You have to do exactly what I say :)
Change the telnet line to:

Code: Select all

 $SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/sh &  >> $LOGFILE 2>&1
Sorry about that.
After the correction now my prompt looks better but I still not have access to ssh (password is not accepted):
Also oscam can't be started with this version of busy box with the default is fine. The Startup script is attached below.

Code: Select all

Trying 192.168.0.101...
Connected to 192.168.0.101.
Escape character is '^]'.
root@tv:/mnt #
Thank you for your assistance.

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sat Jun 21, 2014 11:24 pm
by sectroyer
with this version of busy box with the default is fine.
What do you mean by that? I did not tell you to change anything with busy box... What did you do?

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 9:12 am
by bobiturboto
sectroyer wrote:
with this version of busy box with the default is fine.
What do you mean by that? I did not tell you to change anything with busy box... What did you do?
I have replaced the both files from here viewtopic.php?f=40&t=7455#p56749
To have ssh access I have reverted my passwd like here:

Code: Select all

secured Root:/mnt:/bin/sh
The good news with the original busy box now I have ssh history :) but I still no sftp access :(

Code: Select all

Status:	Connecting to 192.168.0.101...
Response:	fzSftp started
Command:	open "root@192.168.0.101" 22
Command:	Pass: ********
Status:	Connected to 192.168.0.101
Error:	Connection closed by server with exitcode 127
Error:	Could not connect to server
The other thing is my root is starting much faster, before I needed to wait 30 secs.
I think with your fix now is better.

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 10:01 am
by sectroyer
bobiturboto wrote:
sectroyer wrote:
with this version of busy box with the default is fine.
What do you mean by that? I did not tell you to change anything with busy box... What did you do?
I have replaced the both files from here viewtopic.php?f=40&t=7455#p56749
To have ssh access I have reverted my passwd like here:

Code: Select all

secured Root:/mnt:/bin/sh
The good news with the original busy box now I have ssh history :) but I still no sftp access :(

Code: Select all

Status:	Connecting to 192.168.0.101...
Response:	fzSftp started
Command:	open "root@192.168.0.101" 22
Command:	Pass: ********
Status:	Connected to 192.168.0.101
Error:	Connection closed by server with exitcode 127
Error:	Could not connect to server
The other thing is my root is starting much faster, before I needed to wait 30 secs.
I think with your fix now is better.
I didn't tell you to replace busy box, I didn't tell you to change your passed. Remove /mtd_rwarea/passwd, reboot TV and post the result of this command:

Code: Select all

cat /etc/passwd

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 11:09 am
by bobiturboto
sectroyer wrote: I didn't tell you to replace busy box, I didn't tell you to change your passed. Remove /mtd_rwarea/passwd, reboot TV and post the result of this command:

Code: Select all

cat /etc/passwd
Can't be removed

Code: Select all

root@tv:~ # rm -f /mtd_rwarea/passwd
rm: can't remove '/mtd_rwarea/passwd': Device or resource busy
The default password is like this:

Code: Select all

root:saJvQKUdIxRW2:0:0:SamyGO secured Root:/mnt:/bin/sh
About changed password you never told me that need to be the default. About busy box I wanted to test what is the behaviour with the ver for E.
Please keep in mind I am complaining from nothing just I want to help for improving SamyGO, and providing extra information from my side will help about this.
I am professional QA so believe me I know a lot about testing.

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 11:40 am
by sectroyer
bobiturboto wrote:
sectroyer wrote: I didn't tell you to replace busy box, I didn't tell you to change your passed. Remove /mtd_rwarea/passwd, reboot TV and post the result of this command:

Code: Select all

cat /etc/passwd
Can't be removed

Code: Select all

root@tv:~ # rm -f /mtd_rwarea/passwd
rm: can't remove '/mtd_rwarea/passwd': Device or resource busy
The default password is like this:

Code: Select all

root:saJvQKUdIxRW2:0:0:SamyGO secured Root:/mnt:/bin/sh
About changed password you never told me that need to be the default. About busy box I wanted to test what is the behaviour with the ver for E.
Please keep in mind I am complaining from nothing just I want to help for improving SamyGO, and providing extra information from my side will help about this.
I am professional QA so believe me I know a lot about testing.
You can do whatever you want but don't ask for my help. I don't need any extra information. For now your "extra information" only makes it harder for me to help you. I need you to only do what I ask you to. Changing ssh password shouldn't have "big" impact on tests but it looks you have removed it completely!!! With that nothing will work!!!

Code: Select all

umount /mtd_rwarea/passwd

Code: Select all

rm -f /mtd_rwarea/passwd

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 11:58 am
by bobiturboto

Code: Select all

cat /mtd_rwarea/passwd
root:saJvQKUdIxRW2:0:0:SamyGO secured Root::/mnt/bin/ash
I can't login with ssh

Code: Select all

users-MacBook:~ user$ ssh root@192.168.0.101
root@192.168.0.101's password: 
Permission denied, please try again.
The password is fine - SamyGO

Code: Select all

root@tv:/mnt # login root
Password: 
login: can't chdir to home directory ''
# 

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 12:55 pm
by sectroyer
bobiturboto wrote:

Code: Select all

cat /mtd_rwarea/passwd
root:saJvQKUdIxRW2:0:0:SamyGO secured Root::/mnt/bin/ash
I can't login with ssh

Code: Select all

users-MacBook:~ user$ ssh root@192.168.0.101
root@192.168.0.101's password: 
Permission denied, please try again.
The password is fine - SamyGO

Code: Select all

root@tv:/mnt # login root
Password: 
login: can't chdir to home directory ''
# 
okay just to be sure run this commands:

Code: Select all

cat /etc/profile
which dropbear
ls -l `which dropbear`
ps aux | grep dropbear

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 1:13 pm
by bobiturboto
sectroyer wrote: okay just to be sure run this commands:

Code: Select all

cat /etc/profile
which dropbear
ls -l `which dropbear`
ps aux | grep dropbear

Code: Select all

root@tv:/mnt # cat /etc/profile
export PATH="/mnt/opt/privateer/sbin:/mnt/opt/privateer/bin:/mnt/opt/privateer/usr/bin:/mnt/opt/privateer/usr/sbin:/mnt/sbin:/mnt/bin:/mnt/usr/bin:/mnt/usr/sbin:/tmp/bin:/usr/sbin:/usr/bin:/bin:/sbin:/etc/Scripts:/util:/mtd_appdata/Runtime/bin:/usr/sbin:/usr/bin:/bin:/sbin"
export LD_LIBRARY_PATH="/mnt/opt/privateer/lib:/mnt/opt/privateer/usr/lib:/mnt/lib:/mnt/usr/lib:/tmp/bin:/lib:/mtd_cmmlib/lib:/mtd_cmmlib/Comp_LIB:/mtd_exe/lib:/mtd_cmmlib/YWidget_LIB:/mtd_contents:/mtd_cmmlib/InfoLink/lib/plugin/Static:/mtd_appdata/moip:/mtd_cmmlib/GAME_LIB:/mtd_cmmlib/DRM_LIB:/Java/lib:/mtd_cmmlib/InfoLink/lib:/dtv:/mtd_appext/WidgetEngine:/mtd_cmmlib/Webkit:/mtd_exe/WebServerApp/bin:/mtd_cmmlib/CBRE:/mtd_cmmlib/CBRE/bin/lib:/mtd_cmmlib/Runtime/lib/CairoShadow:/mtd_cmmlib/Runtime/lib:/mtd_cmmlib/Runtime/XorgLibs:/mtd_cmmlib/CM_LIB:/mtd_appext/OIPF/lib:/mtd_exe/OIPF/lib:/mtd_cmmlib/flashplayer/libs/"
export SCREENDIR=/dtv/screen
export PS1='# '
ENV=/dtv/.ashrc
export ENV

Code: Select all

root@tv:/mnt # which dropbear
root@tv:/mnt #  

Code: Select all

root@tv:/mnt # ls -l `which dropbear`
total 1719
drwxrwxrwx    2 root     0             9216 Jun 21 21:12 bin
drwxrwxrwx    8 root     0             1024 Nov 17  2013 doc
drwxrwxrwx   10 root     0             1024 Jan  1  1970 etc
drwxrwxrwx    2 root     0             1024 Nov 17  2013 firmware
drwxrwxrwx    3 root     0             1024 Dec 30 14:23 lib
drwxrwxrwx    5 root     0             1024 Nov 17  2013 mc
drwxrwxrwx    3 root     0             1024 Nov 17  2013 opt
drwxrwxrwx    6 root     0             1024 Nov 17  2013 phpsysinfo
-rwxr-xr-x    1 root     0             4469 Jan  8 08:29 rcSGO
-rw-r--r--    1 root     0          1682409 Jun 22 10:54 sam.log
-rw-r--r--    1 root     0            50768 Jan  1  1970 samygo.log
drwxrwxrwx    2 root     0             1024 Dec 13  2013 sbin
drwxrwxrwx    2 root     0             1024 Nov 17  2013 src
drwxrwxrwx    3 root     0             1024 Nov 17  2013 usr

Code: Select all

root@tv:/mnt # ps aux | grep dropbear
root@tv:/mnt # 

Re: Fixing SamyGO telnet/SSH/SCP/bash on C/D/E/F series

Posted: Sun Jun 22, 2014 1:19 pm
by sectroyer
Okay it looks that before we continue we need to make a fix to telnet init script. All the changes you have to do should go to the 01_02_telnet.init file.
Right before this line:

Code: Select all

$SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/sh &  >> $LOGFILE 2>&1
change this:

Code: Select all

echo "export PS1='# '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
echo "PS1='root@tv:\w \$ '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
/bin/mount -o bind "$SYSROOT/bin/sh" /bin/sh
export HOME=/mnt/
export PS1='root@tv:\w \$ '
to this:

Code: Select all

echo "export PS1='root@tv:\w \$ '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
echo "PS1='root@tv:\w \$ '" >> /mtd_rwarea/profile
echo -e "ENV=/dtv/.ashrc\nexport ENV\n" >> /mtd_rwarea/profile
/bin/mount -o bind "$SYSROOT/bin/sh" /bin/sh
export HOME=/mnt/
export PS1='root@tv:\w \$ '
apply changes, reboot post the result of:

Code: Select all

cat /etc/profile
Finally the result of this:

Code: Select all

ls -l /mnt/opt/privateer/usr/sbin/drop*