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

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.
Post Reply

sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

bobiturboto wrote:
panni wrote:No, I think we misunderstood each other. My SSH is working now, without your fix and without SRS_module. I've just changed the shell of root in /etc/passwd to /bin/sh (from /mnt/bin/ash) and now the login works.
I can confirm also after changing the file now I have ssh access too F8000

Code: Select all

root:saJvQKUdIxRW2:0:0:SamyGO secured Root:/mnt:/bin/sh
Okay do you have now everything that I have described in this stoic:
  • SSH
  • SCP
  • bash history
????
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

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

Post by bobiturboto »

sectroyer wrote:
bobiturboto wrote:
panni wrote:No, I think we misunderstood each other. My SSH is working now, without your fix and without SRS_module. I've just changed the shell of root in /etc/passwd to /bin/sh (from /mnt/bin/ash) and now the login works.
I can confirm also after changing the file now I have ssh access too F8000

Code: Select all

root:saJvQKUdIxRW2:0:0:SamyGO secured Root:/mnt:/bin/sh
Okay do you have now everything that I have described in this stoic:
  • SSH
  • SCP
  • bash history
????
No just ssh with /bin/sh shell.
I tried to follow the guide for F8000 but without success.
Do I need something specific for F8000?

Thank you
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

bobiturboto wrote: /bin/sh shell.
I tried to follow the guide for F8000 but without success.
Do I need something specific for F8000?

Thank you
I don't know if you "need something specific for F8000". I don't have ANY F :) You should check the E series tutorial!!! What did you do to make SSH work? Did you mount /mnt/bin/sh to /bin/sh?
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

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

Post by bobiturboto »

sectroyer wrote:
bobiturboto wrote: /bin/sh shell.
I tried to follow the guide for F8000 but without success.
Do I need something specific for F8000?

Thank you
I don't know if you "need something specific for F8000". I don't have ANY F :) You should check the E series tutorial!!! What did you do to make SSH work? Did you mount /mnt/bin/sh to /bin/sh?
Hi I have checked the tutorial but I am confused because 01_01_catch_crap.init is totally different for F and I can't find the part for mount.ko in any of my files.
For telnet I have separate file so I don't know what part where need to be included.
Please take a look over the attached files and point me what I need to do.
Currently loaded modules are:

Code: Select all

# lsmod
fuse 50188 0 - Live 0xbf78d000
ansi_cprng 2860 0 - Live 0xbf789000
aes_generic 28480 0 - Live 0xbf77f000
krng 608 0 - Live 0xbf77b000
ecb 1148 0 - Live 0xbf777000
arc4 812 0 - Live 0xbf773000
eseqiv 2028 0 - Live 0xbf76f000
chainiv 2044 0 - Live 0xbf76b000
crypto_wq 368 1 chainiv, Live 0xbf767000
rng 1028 4 ansi_cprng,krng,eseqiv,chainiv, Live 0xbf765000
des_generic 17516 0 - Live 0xbf75d000
hmac 1944 0 - Live 0xbf759000
md5 1164 0 - Live 0xbf755000
md4 2860 0 - Live 0xbf751000
crypto_blkcipher 8718 3 ecb,eseqiv,chainiv, Live 0xbf74b000
cryptomgr 1904 0 - Live 0xbf747000
pcompress 664 0 - Live 0xbf745000
aead 3300 1 cryptomgr, Live 0xbf743000
crypto_hash 7148 3 hmac,md5,md4, Live 0xbf740000
crypto_algapi 8656 14 ansi_cprng,aes_generic,krng,ecb,arc4,eseqiv,chainiv,des_generic,hmac,crypto_blkcipher,cryptomgr,pcompress,aead,crypto_hash, Live 0xbf73a000
crypto 4560 9 ansi_cprng,ecb,rng,hmac,crypto_blkcipher,pcompress,aead,crypto_hash,crypto_algapi, Live 0xbf737000
g_file_storage 20024 0 - Live 0xbf72f000
dummy_hcd 10504 1 g_file_storage, Live 0xbf729000
ptys 10916 3 [permanent], Live 0xbf723000
SRS_module 6244 0 - Live 0xbf71e000
anyver 2504 0 - Live 0xbf71a000
iptable_filter 644 1 - Live 0xbf713000
usb_storage 31780 2 - Live 0xbf708000
exfat_fs 15664 0 - Live 0xbf701000 (P)
exfat_core 46104 1 exfat_fs, Live 0xbf6f2000 (P)
tntfs 406552 1 - Live 0xbf68b000 (P)
ath6kl_usb 354732 0 - Live 0xbf633000
cfg80211 154232 1 ath6kl_usb, Live 0xbf60a000
compat 320 0 - Live 0xbf606000
snd_usb_audio 66472 0 - Live 0xbf5f2000
snd_usbmidi_lib 12820 1 snd_usb_audio, Live 0xbf5ed000
uvcvideo 52924 2 - Live 0xbf5dd000
hid_chicony 1092 0 - Live 0xbf5d9000
hid_apple 4024 0 - Live 0xbf5d5000
hid_microsoft 1860 0 - Live 0xbf5d1000
xhci_hcd 57248 0 - Live 0xbf5c0000
ohci_hcd 12372 0 - Live 0xbf5af000
bthid 2792 0 - Live 0xbf5ab000
mousedev 7708 0 - Live 0xbf5a6000
evdev 6688 0 - Live 0xbf5a1000
usbhid 13144 0 - Live 0xbf59a000
hid 61772 5 hid_chicony,hid_apple,hid_microsoft,bthid,usbhid, Live 0xbf587000
sdp_mac 17576 0 - Live 0xbf57f000
snd_pcm 47620 1 snd_usb_audio, Live 0xbf570000
snd_page_alloc 2604 1 snd_pcm, Live 0xbf56c000
snd_hwdep 3708 1 snd_usb_audio, Live 0xbf568000
snd_rawmidi 12828 1 snd_usbmidi_lib, Live 0xbf561000
snd_seq_device 3612 1 snd_rawmidi, Live 0xbf55d000
snd_timer 13668 1 snd_pcm, Live 0xbf556000
snd 28216 7 snd_usb_audio,snd_usbmidi_lib,snd_pcm,snd_hwdep,snd_rawmidi,snd_seq_device,snd_timer, Live 0xbf54c000
soundcore 444 1 snd, Live 0xbf548000
v4l2_common 4788 0 - Live 0xbf545000
videodev 64832 4 uvcvideo,v4l2_common, Live 0xbf532000
v4l2_int_device 1436 0 - Live 0xbf530000
btusb 33992 1 - Live 0xbf524000
ehci_hcd 28424 0 - Live 0xbf51a000
samdrv 5053148 115 - Live 0xbf047000 (P)
usbcore 93980 13 dummy_hcd,usb_storage,ath6kl_usb,snd_usb_audio,snd_usbmidi_lib,uvcvideo,xhci_hcd,ohci_hcd,usbhid,btusb,ehci_hcd, Live 0xbf02d000
mali 137712 25 samdrv, Live 0xbf008000
tzdrv 28520 38 - Live 0xbf000000
Thank you
You do not have the required permissions to view the files attached to this post.
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

You can skip mount.ko it's not needed on your system. Just use the mount --bind commands..
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

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

Post by bobiturboto »

sectroyer wrote:You can skip mount.ko it's not needed on your system. Just use the mount --bind commands..
Great but in which file - catch_crap.init or telnet ?
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

It looks that 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/ash &  >> $LOGFILE 2>&1
add 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 \$ '
Finally get the dropbearmulti from E tutorial and put it in /mnt/opt/privateer/usr/sbin/. Then run this commands:

Code: Select all

chmod 755 /mnt/opt/privateer/usr/sbin/dropbearmulti 
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
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

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

Post by bobiturboto »

sectroyer wrote:It looks that 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/ash &  >> $LOGFILE 2>&1
add 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 \$ '
Finally get the dropbearmulti from E tutorial and put it in /mnt/opt/privateer/usr/sbin/. Then run this commands:

Code: Select all

chmod 755 /mnt/opt/privateer/usr/sbin/dropbearmulti 
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

Code: Select all

/bin/mount -o bind "$SYSROOT/bin/sh" /bin/sh
export HOME=/mnt/
export PS1='root@tv:\w \$ '
This part was added to telnet script before start telnet command.

Finally I have access ftp and net cat access only - no ssh and telnet.

Code: Select all

lrwxrwxrwx    1 root     0               41 Jun 21  2014 dbclient -> /mnt/opt/privateer/usr/sbin/dropbearmulti
lrwxrwxrwx    1 root     0               41 Jun 21  2014 scp -> /mnt/opt/privateer/usr/sbin/dropbearmulti
My files are attached below.
You do not have the required permissions to view the files attached to this post.
bobiturboto
SamyGO Project Donor
Posts: 489
Joined: Sun Mar 23, 2014 8:15 pm
Location: Bulgaria

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

Post by bobiturboto »

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
sectroyer
Official SamyGO Developer
Posts: 6305
Joined: Wed May 04, 2011 5:10 pm

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

Post by sectroyer »

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
I do NOT support "latest fw" at ALL. If you have one you should block updates on router and wait for it to STOP being "latest":)
If you want me to help you please paste FULL log(s) to "spoiler"/"code" bbcodes or provide link(s) to pasted file(s) on https://pastebin.com Otherwise "NO HELP"!!!
If you want root DISABLE internet access to your device!!!!
DO NOT EVER INSTALL FIRMWARE UPGRADE !!!!

Post Reply

Return to “[F] Software”