[root@junk root]# fdisk /dev/hdc The number of cylinders for this disk is set to 2491. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/hdc: 16 heads, 63 sectors, 2491 cylinders Units = cylinders of 1008 * 512 bytes Device Boot Start End Blocks Id System /dev/hdc1 1 1711 861809+ 83 Linux /dev/hdc2 1711 2231 262080 82 Linux swap /dev/hdc3 2231 2491 131543 83 Linux Command (m for help): d Partition number (1-4): 1 Command (m for help): d Partition number (1-4): 2 Command (m for help): d Partition number (1-4): 3 Command (m for help): p Disk /dev/hdc: 16 heads, 63 sectors, 2491 cylinders Units = cylinders of 1008 * 512 bytes Device Boot Start End Blocks Id System Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
これで、普通の HD-LAN V2 になった。
hdc1 は ext3 に
[root@junk root]# mke2fs -j /dev/hdc1 mke2fs 1.34 (25-Jul-2003) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 107744 inodes, 215452 blocks 10772 blocks (5.00%) reserved for the super user First data block=0 7 block groups 32768 blocks per group, 32768 fragments per group 15392 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 23 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@junk root]#hdc3 は ext2 に
[root@junk root]# mke2fs /dev/hdc3 mke2fs 1.34 (25-Jul-2003) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 32912 inodes, 131540 blocks 6577 blocks (5.00%) reserved for the super user First data block=1 17 block groups 8192 blocks per group, 8192 fragments per group 1936 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 21 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@junk root]#
[root@junk root]# mkdir /tmp/root [root@junk root]# mount /dev/hdc1 /tmp/root [root@junk root]# mount /dev/hda2 on / type ext2 (rw) none on /proc type proc (rw) usbdevfs on /proc/bus/usb type usbdevfs (rw) /dev/hda1 on /boot type ext2 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) automount(pid570) on /misc type autofs (rw,fd=5,pgrp=570,minproto=2,maxproto=3) /dev/hdc1 on /tmp/root type ext3 (rw) [root@junk root]#
[root@junk root]# mkdir /tmp/root/HackKit [root@junk root]# cd /tmp/root/HackKit [root@junk HackKit]# tar zxvpf /mnt/cdrom/hackkit-1.2.tar.gz bin/ bin/bash bin/bash2 bin/sh : :
[root@junk HackKit]# vi /tmp/root/HackKit/etc/rc.d/init.d/hackkitjail [root@junk HackKit]# chmod +x !$ chmod +x /tmp/root/HackKit/etc/rc.d/init.d/hackkitjail
[root@junk HackKit]# cd / [root@junk /]# umount /tmp/root [root@junk /]# mount /dev/hda2 on / type ext2 (rw) none on /proc type proc (rw) usbdevfs on /proc/bus/usb type usbdevfs (rw) /dev/hda1 on /boot type ext2 (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) automount(pid570) on /misc type autofs (rw,fd=5,pgrp=570,minproto=2,maxproto=3) [root@junk /]#
[root@junk /]# mkdir /tmp/mnt2 [root@junk /]# mount /dev/hdc3 /tmp/mnt2 [root@junk /]# ls /tmp/mnt2 hdlan_diffimg.tar.gz hdlan_version.txt lost+found
[root@junk /]# cd /tmp/root [root@junk root]# tar zxvf /tmp/mnt2/hdlan_diffimg.tar.gz ./ ./bin/ : :
[root@junk root]# vi /tmp/root/etc/rc.d/init.d/hackkit : [root@junk root]# chmod +x !$ chmod +x /tmp/root/etc/rc.d/init.d/hackkit [root@junk root]# cd /tmp/root/etc/rc.d/rc0.d [root@junk rc0.d]# ln -s ../init.d/hackkit K10hackkit [root@junk rc0.d]# cd ../rc2.d [root@junk rc2.d]# ln -s ../init.d/hackkit S96hackkit
[root@junk rc2.d]# cd /tmp/root [root@junk root]# ls bin etc home lib lost+found mnt root sbin tmp usr var www [root@junk root]# tar zcvf /tmp/mnt2/hdlan_diffimg.tar.gz . : [root@junk root]# cd / [root@junk /]# umount /tmp/mnt2
Vine Linux 2.6 (La Fleur de Bouard) Kernel 2.4.17_mvl21-sandpoint on a ppc login: guest Password: bash-2.04$OK
← | ハックの記録 | → revogear.com のファーム:セキュリティホール付き |