Page 20 of 26

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

Posted: Thu May 14, 2015 9:38 am
by sectroyer
Did you apply FULL fix ? :)

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

Posted: Thu May 14, 2015 9:55 am
by miazza
No. I only updated 01_02_telnet.init as discussed above.
Shall I apply also for the rest in order to have telnet working as I want ?

The /mnt/etc/rc.sysinit mod ic clear enough and I have already a modded rc.sysinit ready for FTP upload (is it safe or shall I cross finger after upload ? :))

For the 01_02_telnet.init we have already discussed and should be ok even if I cannot find reference to this mod in my init:

Code: Select all

export HOME=/mnt/
    export PS1='root@tv:\w \$ '
For scp (I do not need it but why not..) I have to change dropbearmulti with your but it is not clear where I have to add this:

Code: Select all

ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/dbclient
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/scp
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/opt/privateer/usr/sbin/dropbear
Finally I also have to modify my busybox with yours in /mnt/bin/busybox ?

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

Posted: Thu May 14, 2015 10:32 am
by sectroyer
miazza wrote:No. I only updated 01_02_telnet.init as discussed above.
Shall I apply also for the rest in order to have telnet working as I want ?
If you apply "parts" don't expect ANYTHING to be working correctly :P
miazza wrote:(is it safe or shall I cross finger after upload ? :))
You should ALWAYS cross your fingers :)
miazza wrote: For the 01_02_telnet.init we have already discussed and should be ok even if I cannot find reference to this mod in my init:

Code: Select all

export HOME=/mnt/
    export PS1='root@tv:\w \$ '
If you can't find it look in other files. if it's NOT there put it where you put rest to "telnet stuff" :)
miazza wrote: For scp (I do not need it but why not..) I have to change dropbearmulti with your but it is not clear where I have to add this:

Code: Select all

ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/dbclient
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/scp
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/opt/privateer/usr/sbin/dropbear
You don't add it anywhere. You just simply run these commands in telnet :)
miazza wrote:Finally I also have to modify my busybox with yours in /mnt/bin/busybox ?
If you keep on asking about EVERY single line whether you should add it I will stop helping :P

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

Posted: Thu May 14, 2015 11:26 am
by miazza
OK. Sorry .... ;)
I invested some time in reading the whole 3D and I found this that is exactly an F8000 like mine.
I will apply this procedure in full and I will be back with results.

BTW, I suggest to add this F serie tutorial in the first page ;)
bobiturboto wrote:FOR F SERIES YOU HAVE TO DO THIS!!!!!!

You have to use dropbearmulti from archive attached in this post to get scp working for telnet and SSH.

Upload and replace /mnt/opt/privateer/usr/sbin/dropbearmulti with the attached file.

Locate these lines in /mnt/etc/init.d/01_02_telnet.init :

Code: Select all

$SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/ash &  >> $LOGFILE 2>&1
Replace the line with 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 \$ '
	$SYSROOT/bin/busybox2 telnetd -p 23 -l $SYSROOT/bin/sh &  >> $LOGFILE 2>&1
In the same file find this part:

Code: Select all

        if [ ! -e /mtd_rwarea/passwd ]; then
                echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$NEW_HOME:$SYSROOT/bin/ash" > /mtd_rwarea/passwd
        fi
Replace it with this:

Code: Select all

	ln -s /mnt/bin/ /dtv/bin
		if [ ! -e /mtd_rwarea/passwd ]; then
                echo "root:saJvQKUdIxRW2:0:0:SamyGO secured Root:$HOME:/bin/sh" > /mtd_rwarea/passwd
        fi
Then run this commands:

Code: Select all

umount /mtd_rwarea/passwd
rm /mtd_rwarea/passwd
Execute the listed commands through telnet connection.

Code: Select all

chmod +x /mnt/opt/privateer/usr/sbin/dropbearmulti
rm /mnt/opt/privateer/usr/sbin/dropbear
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/dbclient
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/scp
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/opt/privateer/usr/sbin/dropbear
Reboot your TV and after that you will have fixed telnet and working ssh access with scp and ssh history.
Default ssh user is root and the password is SamyGO

Credits to sectroyer.

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

Posted: Thu May 14, 2015 6:29 pm
by miazza
I have followed the whole procedure but the following commands gives error:

Code: Select all

root@tv:/mnt # umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
root@tv:/mnt #
I have put the attached dropbearmuti anyhow in /mnt/opt/privateer/usr/sbin/dropbearmulti and I have continued with the rest of commands:

Code: Select all

chmod +x /mnt/opt/privateer/usr/sbin/dropbearmulti
rm /mnt/opt/privateer/usr/sbin/dropbear
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/dbclient
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/bin/scp
ln -s /mnt/opt/privateer/usr/sbin/dropbearmulti /mnt/opt/privateer/usr/sbin/dropbear
My Telnet is still without ECHO but commands are correctly executed:

Code: Select all

root@tv:/mnt # umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
root@tv:/mnt # alias alert="samyGOso -A -B -l /mnt/opt/privateer/usr/libso/libAl
ert.so"
root@tv:/mnt # alert MSGBOX:"blub"
root@tv:/mnt #
SSH still the same:

Code: Select all

login as: root
root@192.168.1.30's password:
Access denied
root@192.168.1.30's password:
Access denied
root@192.168.1.30's password:
I am using user: root ; password: SamyGO

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

Posted: Thu May 14, 2015 7:08 pm
by sectroyer
Well simply run:

Code: Select all

rm /mtd_rwarea/passwd
and reboot :)
You keep on NOT doing ALL the steps :)

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

Posted: Thu May 14, 2015 7:21 pm
by miazza
sectroyer wrote:Well simply run:

Code: Select all

rm /mtd_rwarea/passwd
and reboot :)
You keep on NOT doing ALL the steps :)

Code: Select all

root@tv:/mnt # rm /mtd_rwarea/passwd
rm: can't remove '/mtd_rwarea/passwd': Device or resource busy
root@tv:/mnt #
Shall I delete it via FTP ?

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

Posted: Thu May 14, 2015 7:52 pm
by sectroyer
Ehh you don't get it :P If rm fails run:

Code: Select all

umount /mtd_rwarea/passwd
and THEN try rm once again :P
If you would try BOTH commands you will have no problems :P

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

Posted: Thu May 14, 2015 7:55 pm
by miazza
sectroyer wrote:Ehh you don't get it :P If rm fails run:

Code: Select all

umount /mtd_rwarea/passwd
and THEN try rm once again :P
If you would try BOTH commands you will have no problems :P
That's what I did the first time:

Code: Select all

root@tv:/mnt # umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
root@tv:/mnt # rm -f /mtd_rwarea/passwd
rm: can't remove '/mtd_rwarea/passwd': Device or resource busy
root@tv:/mnt # umount /mtd_rwarea/passwd
umount: can't umount /mtd_rwarea/passwd: Invalid argument
root@tv:/mnt # rm /mtd_rwarea/passwd
rm: can't remove '/mtd_rwarea/passwd': Device or resource busy
root@tv:/mnt #
Shall I remove it via FTP ?

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

Posted: Thu May 14, 2015 7:57 pm
by sectroyer
ehh you have "something strange" :)

Code: Select all

cat /etc/passwd
and:

Code: Select all

cat /mtd_rwarea/passwd