シリアルコンソールが動作する LS-CL +標準ファームにインストールして 確認する。
root@LS-CL701:/usr/local/sbin# cd /mnt/disk1/share/ root@LS-CL701:/mnt/disk1/share# ls busybox debian debootstrap hackkit trashbox root@LS-CL701:/mnt/disk1/share# ls -ltr drwxrwxrwx 3 nobody nogroup 146 Nov 1 2007 debian drwxr-xr-x 2 root root 98 Nov 21 2008 debootstrap drwxrwxrwx 2 nobody nogroup 6 Jan 9 2009 trashbox drwxrwsr-x 2 1001 1001 4096 Feb 27 2009 hackkit -rwxrw-rw- 1 nobody nogroup 646596 Sep 29 21:01 busybox root@LS-CL701:/mnt/disk1/share#
root@LS-CL701:/mnt/disk1/share# mv busybox /usr/local/sbin/ root@LS-CL701:/mnt/disk1/share# cd /usr/local/sbin/ root@LS-CL701:/usr/local/sbin# ln -s /usr/local/sbin/busybox telnetd root@LS-CL701:/usr/local/sbin# ls -l busybox telnetd -rwxrw-rw- 1 nobody nogroup 646596 Sep 29 21:01 busybox lrwxrwxrwx 1 root root 23 Sep 29 21:02 telnetd -> /usr/local/sbin/busybox root@LS-CL701:/usr/local/sbin# chown root.root busybox root@LS-CL701:/usr/local/sbin# chmod 755 busybox root@LS-CL701:/usr/local/sbin#
root@LS-CL701:/usr/local/sbin# vi /etc/init.d/rcS : : root@LS-CL701:/usr/local/sbin# tail /etc/init.d/rcS exec_sh bootcomplete.sh echo "** step final(after bootcomplete) **" for cmd in hdd_late_check.sh check_initialization.sh usb_late_check.sh do exec_sh ${cmd} done /usr/local/bin/share_delete.sh & /usr/local/sbin/telnetd root@LS-CL701:/usr/local/sbin#
root@LS-CL701:/usr/local/sbin# shutdown -r now starting pid 5622, tty '': '/etc/init.d/rcDown' --- rcDown --- : :
BUFFALO INC. LinkStation series LS-CL701 login: root No mail. root@LS-CL701:~# ps PID Uid VSZ Stat Command 1 root 3364 S init 2 root SW< [kthreadd] : : 1467 root 18092 S /usr/local/BootServer/rarpd 1470 root 1700 S /usr/local/BootServer/tftpd 1471 root 9892 S /usr/local/BootServer/rarpcfgd 1473 root 1568 S /usr/local/BootServer/fwupdated 1591 root 868 S /usr/local/sbin/telnetd 1592 root 2392 S -sh 1743 root 3232 S cat /proc/buffalo/kernevnt 1783 root 3232 S sleep 10 1794 root 3232 S sleep 3 1799 root 3368 R ps root@LS-CL701:~#telnetd はちゃんと動いている
root@LS-CL701:~# telnet localhost Entering character mode Escape character is '^]'. BUFFALO INC. LinkStation series sh-3.2# sh-3.2#LS-CL の標準ファームなら、ちゃんとログインできるやん
yasunari@brick:/tmp/root/etc$ cat inetd.conf # /etc/inetd.conf: see inetd(8) for further informations. # # Internet server configuration database # # #rsync stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/rsync --daemon #8873 stream tcp nowait nobody /usr/sbin/tcpd /usr/local/sbin/rsfwds rsync stream tcp nowait root /usr/local/bin/rsync /usr/local/bin/rsync --daemon 8873 stream tcp nowait nobody /usr/local/sbin/rsfwds /usr/local/sbin/rsfwds telnet stream tcp nowait root /bin/sh /bin/sh yasunari@brick:/tmp/root/etc$ ls -l inetd.conf -rw-r--r-- 1 root root 501 Jul 10 2004 inetd.conf yasunari@brick:/tmp/root/etc$いつこんなのが?今までこうだったの?
telnet の行を消す。
yasunari@brick:/tmp/root/etc$ su root Password: brick:/tmp/root/etc# vi inetd.conf : : brick:/tmp/root/etc# cat inetd.conf # /etc/inetd.conf: see inetd(8) for further informations. # # Internet server configuration database # # #rsync stream tcp nowait root /usr/sbin/tcpd /usr/local/bin/rsync --daemon #8873 stream tcp nowait nobody /usr/sbin/tcpd /usr/local/sbin/rsfwds rsync stream tcp nowait root /usr/local/bin/rsync /usr/local/bin/rsync --daemon 8873 stream tcp nowait nobody /usr/local/sbin/rsfwds /usr/local/sbin/rsfwds brick:/tmp/root/etc#
yasunari@sil:~$ telnet chl Trying 192.168.2.52... Connected to chl. Escape character is '^]'. BUFFALO INC. LinkStation series sh-3.2#でけた
|
← ファームウェア 1.21 に telnetd(6)busybox のコンパイルのやり直し |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ 散歩 |