yasunari@ude:/tmp$ od -xc uImage.buffalo |head 0000000 0527 5619 fc12 85b8 024a 3b65 1f00 f8de ' 005 031 V 022 374 270 205 J 002 e ; \0 037 336 370 0000020 0000 0080 0000 0080 c6e3 1c06 0205 0002 \0 \0 200 \0 \0 \0 200 \0 343 306 006 034 005 002 002 \0 0000040 694c 756e 2d78 2e32 2e36 3232 312e 0038 L i n u x - 2 . 6 . 2 2 . 1 8 \0 0000060 0000 0000 0000 0000 0000 0000 0000 0000 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 0000100 0000 e1a0 0000 e1a0 0000 e1a0 0000 e1a0 \0 \0 240 341 \0 \0 240 341 \0 \0 240 341 \0 \0 240 341 yasunari@ude:/tmp$カーネルは、2.6.22.18。LS-XHL と同じバージョン。
yasunari@ude:/tmp$ file initrd.img -bash: file: command not found yasunari@ude:/tmp$file コマンドがない。
yasunari@ude:/tmp$ apt-cache search file : :がー。file コマンドは、いったいどこにある?
yasunari@ude:/tmp$ apt-cache showsrc file Package: file Binary: file, libmagic1, libmagic-dev, python-magic, python-magic-dbg Version: 4.26-1 Priority: standard Section: utils Maintainer: Daniel Baumannあたり。インストールする。Build-Depends: debhelper (>= 7), dpatch, autotools-dev, autoconf, automake, libtool, python, python-all-dev, python-all-dbg, zlib1g-dev Architecture: any Standards-Version: 3.8.0 Format: 1.0 Directory: pool/main/f/file Files: 7af23d8834cd362f4f608484bdce2e28 1240 file_4.26-1.dsc 74cd5466416136da30a4e69f74dbc7a0 584803 file_4.26.orig.tar.gz b14add9a4682997cc028292cefe2544f 42754 file_4.26-1.diff.gz Homepage: http://www.darwinsys.com/file/ Vcs-Browser: http://git.debian.net/?p=debian/file.git Vcs-Git: git://git.debian.net/git/debian/file.git Checksums-Sha1: 412cdac5cd778d867e2d91a01b09858be1998ec3 584803 file_4.26.orig.tar.gz 35b75b33edb004cae331f564712b69c1e3754911 42754 file_4.26-1.diff.gz Checksums-Sha256: 682f7de5c12d35ff2d9e2ec3c6a753bd5a01e0f7f3110501be0bafef1d5e9654 584803 file_4.26.orig.tar.gz 6853cc7c8304f3542ad443827ec1a0a4c22689ce411ca9bd376eb55388706e9b 42754 file_4.26-1.diff.gz Python-Version: all yasunari@ude:/tmp$
yasunari@ude:/tmp$ su - root Password: ude:~# apt-get update Get:1 http://ftp.jp.debian.org lenny Release.gpg [1032B] Get:2 http://ftp.jp.debian.org lenny Release [73.6kB] Ign http://ftp.jp.debian.org lenny/main Packages/DiffIndex Ign http://ftp.jp.debian.org lenny/main Sources/DiffIndex Get:3 http://ftp.jp.debian.org lenny/main Packages [5135kB] Get:4 http://security.debian.org lenny/updates Release.gpg [1032B] Get:5 http://security.debian.org lenny/updates Release [40.8kB] Ign http://security.debian.org lenny/updates/main Packages/DiffIndex Ign http://security.debian.org lenny/updates/main Sources/DiffIndex Get:6 http://security.debian.org lenny/updates/main Packages [100kB] Get:7 http://security.debian.org lenny/updates/main Sources [32.9kB] Get:8 http://ftp.jp.debian.org lenny/main Sources [2305kB] Fetched 7689kB in 45s (170kB/s) Reading package lists... Done ude:~# apt-get install file Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libmagic1 The following NEW packages will be installed: file libmagic1 0 upgraded, 2 newly installed, 0 to remove and 14 not upgraded. Need to get 416kB of archives. After this operation, 2613kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.jp.debian.org lenny/main libmagic1 4.26-1 [372kB] Get:2 http://ftp.jp.debian.org lenny/main file 4.26-1 [43.9kB] Fetched 416kB in 0s (708kB/s) Selecting previously deselected package libmagic1. (Reading database ... 10128 files and directories currently installed.) Unpacking libmagic1 (from .../libmagic1_4.26-1_armel.deb) ... Selecting previously deselected package file. Unpacking file (from .../archives/file_4.26-1_armel.deb) ... Processing triggers for man-db ... Setting up libmagic1 (4.26-1) ... Setting up file (4.26-1) ... ude:~# exit yasunari@ude:/tmp$
yasunari@ude:/tmp$ file initrd.img initrd.img: Zip archive data, at least v2.0 to extract yasunari@ude:/tmp$いつもどおり Zip archive data
解く。
yasunari@ude:/tmp$ unzip initrd.img Archive: initrd.img [initrd.img] initrd.buffalo password: password incorrect--reenter: inflating: initrd.buffalo yasunari@ude:/tmp$いつものパスワードで解けた。
yasunari@ude:/tmp$ dd if=initrd.buffalo of=initrd.gz bs=64 skip=1 139760+1 records in 139760+1 records out 8944665 bytes (8.9 MB) copied, 4.76226 s, 1.9 MB/s yasunari@ude:/tmp$
yasunari@ude:/tmp$ gunzip initrd.gz yasunari@ude:/tmp$
yasunari@ude:/tmp$ mkdir /tmp/root yasunari@ude:/tmp$ mount -o loop initrd /tmp/root mount: only root can do that yasunari@ude:/tmp$ su Password: ude:/tmp# mount -o loop initrd /tmp/root ude:/tmp# ls /tmp/root bin dev lib lost+found proc rootfs share tmp var debugtool etc linuxrc mnt root sbin sys usr www ude:/tmp#
ude:/tmp# cd /tmp/root ude:/tmp/root# cat etc/linkstation_emergence VERSION=0.01 SUBVERSION=RAM 0.00 PRODUCTID=0x00000000 BUILDDATE=2009/05/07 13:36:51 ude:/tmp/root#意味なし。
ude:/tmp/root# ls root/.nas_features/ nas_feature.0x0000000F nas_feature.0x00003001 nas_feature.0x00013000 nas_feature.0x00000010 nas_feature.0x00003002 nas_feature.0x80000080 nas_feature.0x00000011 nas_feature.0x00003004 nas_feature.0x80000084 nas_feature.0x00000012 nas_feature.0x00004000 nas_feature.default ude:/tmp/root# less !$/nas*12 NAS_FEATURE_VERSION=2.0.0 SERIES_NAME="LinkStation" PRODUCT_NAME="LS-CHL(YURYAKU)" SUPPORT_NTFS_WRITE=off SUPPORT_DIRECT_COPY=on SUPPORT_RAID=off SUPPORT_RAID_DEGRADE=off : ude:/tmp/root#PRODUCT_NAME は YURYAKU。雄略?
LS-XHL と diff を取ってみる。
ude:/tmp/root# diff root/.nas_features//nas*1{1,2}|less 1c1 < PID=0x00000011 --- > PID=0x00000012 4c4 < PRODUCT_NAME="LS-XHL(ANKOU)" --- > PRODUCT_NAME="LS-CHL(YURYAKU)" (END)機能的には同じ事になっている。
海外版(?) LS-CHL の nas_features もある。
ude:/tmp/root# head root/.nas_features/nas_feature.0x00000010 PID=0x00000010 SERIES_NAME="LinkStation" PRODUCT_NAME="LS-CHL(HANZEI)" #Support feature SUPPORT_NTFS_WRITE=off SUPPORT_DIRECT_COPY=on SUPPORT_RAID=off SUPPORT_RAID_DEGRADE=off SUPPORT_FAN=on ude:/tmp/root#
海外版(?)と国内版(?)との diff を取る
ude:/tmp/root# diff root/.nas_features/nas_feature.0x0000001{0,2} 1c1,2 < PID=0x00000010 --- > PID=0x00000012 > NAS_FEATURE_VERSION=2.0.0 3,5c4 < PRODUCT_NAME="LS-CHL(HANZEI)" < < #Support feature --- > PRODUCT_NAME="LS-CHL(YURYAKU)" 29c28 < SUPPORT_AD_NT_DOMAIN=off --- > SUPPORT_AD_NT_DOMAIN=on 51,55d49 < < # vm setting < NASFEAT_VM_WRITEBACK=default < NASFEAT_VM_EXPIRE=default < 57,58d50 < < #FS type 61,62c53,54 < < #Device feature --- > NASFEAT_VM_WRITEBACK=default > NASFEAT_VM_EXPIRE=default 66d57 < 70d60 < 72c62 < DEVICE_NETWORK_PRIMARY=eth0 --- > DEVICE_NETWORK_PRIMARY=eth1 103a94,129 > SUPPORT_INTERNAL_DISK_APPEND=0 > STORAGE_TYPE=HDD > BODY_COLOR= > SUPPORT_MICON=0 > SUPPORT_LCD=0 > PRODUCT_CAPACITY="" > DEVICE_NETWORK_NUM=1 > SUPPORT_USER_QUOTA_SOFT=0 > SUPPORT_GROUP_QUOTA_SOFT=0 > SUPPORT_NFS=0 > SUPPORT_LVM=0 > SUPPORT_OFFLINEFILE=0 > SUPPORT_HIDDEN_SHARE=0 > SUPPORT_HOT_SWAP=0 > SUPPORT_LCD_LED=0 > SUPPORT_ALERT=0 > SUPPORT_PORT_TRUNKING=0 > SUPPORT_REPLICATION=0 > SUPPORT_USER_GROUP_CSV=0 > SUPPORT_SFTP=0 > SUPPORT_SERVICE_MAPPING=0 > SUPPORT_SSLKEY_IMPORT=0 > SUPPORT_SLEEPTIMER_DATE=0 > SUPPORT_TERA_SEARCH=0 > SUPPORT_SECURE_BOOT=0 > SUPPORT_PACKAGE_UPDATE=1 > SUPPORT_HDD_SPINDOWN=1 > SUPPORT_DISK_ENCRYPT=0 > SUPPORT_FTPS=0 > SUPPORT_CLEANUP_ALL_TRASHBOX=0 > SUPPORT_WAKEUP_BY_REBOOT=0 > SUPPORT_DTCP_IP=1 > SUPPORT_MYSQL=0 > SUPPORT_APACHE=0 > SUPPORT_PHP=0 > SUPPORT_UPS_STANDBY=1 ude:/tmp/root#DEVICE_NETWORK_PRIMARY が eth1 ということは、 ヒョッとして、LS-CL と LS-CHL とはハードが違う???
ude:/tmp/root# less root/.nas_features/nas_feature.0x80000080 PID=0x80000080 NAS_FEATURE_VERSION=2.0.0 SERIES_NAME="BuffaloNAS" PRODUCT_NAME="UNINSPECT(Unknown)" : : ude:/tmp/root# diff root/.nas_features/nas_feature.{0x80000080,*11} 1c1 < PID=0x80000080 --- > PID=0x00000011 3,4c3,4 < SERIES_NAME="BuffaloNAS" < PRODUCT_NAME="UNINSPECT(Unknown)" --- > SERIES_NAME="LinkStation" > PRODUCT_NAME="LS-XHL(ANKOU)" 128a129 > SUPPORT_UPS_STANDBY=1 ude:/tmp/root#やっぱり、0x80000080 ではあかんような。
ude:/tmp/root# ls -l usr/sbin/telnetd lrwxrwxrwx 1 root root 17 May 7 13:37 usr/sbin/telnetd -> ../../bin/busybox ude:/tmp/root#あるある。
やぁ~、楽し。こういう時が一番ハック欲が満たされて、シアワセ。
|
← ファームウェア 1.10 でハックキット |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ LS-CL に LS-CHL ファームウェア Ver.1.10 |