引
那日,我拾起散落一地的泛黃筆記,未曾想到會從一個塵封已久的盒子里翻出銹跡斑斑的硬盤。我只記得,當時,夕陽滿滿的打在臉頰上,而眼前的硬盤還在閃閃發光,似乎在述說著一個不可告人的秘密。
連上旁邊廢置的老舊電腦,硬盤轉動的聲音吱吱作響,終端的綠色光點在不急不慢的閃爍。然而,里面空無一物,什么都沒有。不對,我好像發現了什么......
Clue 1
那個硬盤并不是空無一物,至少我看到了一個名為.clue1
的隱藏文件,好像是一個文本文件,打開一看,里面只有一行文字:
軟盤中,殘留著妳該尋找的下個條件
什么軟盤?就在我疑惑的片刻,我看到桌子右下角掉落著一個蓋滿厚厚灰塵的方形軟盤,應該就是它了。
緩緩的拾起它,吹落上面的積灰,插入破舊的電腦。聽到電腦讀取軟盤的茲茲聲,心里默默竊幸,看來還能用。
看這軟盤的古老程度,也許不能再被我們這樣折騰了,為了后面不直接對其操作,先創建一個鏡像備份吧:
root@toor:~# mkdir evid && cd evid
root@toor:~/evid # dd if=/dev/fd0 of=floppy.dd bs=512
root@toor:~/evid # chmod 444 floppy.dd
彈出軟盤后,記錄下鏡像的hash,便開始掛載咯(記得任何時候都要只讀模式掛載):
root@toor:~/evid # sha1sum floppy.dd > sha.floppy
root@toor:~/evid # mkdir /mnt/analysis
root@toor:~/evid # mount -t vfat -o ro,noexec,loop floppy.dd /mnt/analysis
root@toor:~/evid # cd /mnt/analysis
root@toor:/mnt/analysis #
當我ls
出目錄下的文件的那一刻,心里咯噔一下,時間仿佛停滯在2000年,這么多年間,到底發生了什么?
root@toor:/mnt/analysis # ls -al
total 118
drwxr--r-- 4 root root 7168 Dec 31 1969 .
drwxr-xr-x 13 root root 4096 Dec 21 14:20 ..
drwxr--r-- 3 root root 512 Sep 23 2000 Docs
drwxr--r-- 2 root root 512 Sep 23 2000 Pics
-rwxr--r-- 1 root root 19536 Aug 24 1996 arp.exe
-rwxr--r-- 1 root root 37520 Aug 24 1996 ftp.exe
-r-xr--r-- 1 root root 16161 Sep 21 2000 loveletter.virus
-rwxr--r-- 1 root root 21271 Mar 19 2000 ouch.dat
-rwxr--r-- 1 root root 12384 Aug 2 2000 snoof.gz
樹形結構列出所有文件看看:
root@toor:/mnt/analysis # tree
|-- Docs
| |-- Benchmarks.xls
| |-- Computer_Build.xml
| |-- Law.doc
| |-- Private
| `-- why hack
|-- Pics
| |-- C800x600.jpg
| |-- Stoppie.gif
| |-- bike2.jpg
| |-- bike3.jpg
| |-- matrixs3.jpg
| `-- mulewheelie.gif
|-- arp.exe
|-- ftp.exe
|-- loveletter.virus
|-- ouch.dat
`-- snoof.gz
3 directories, 15 files
里面好像沒有我感興趣的線索。
例行公事,先對每個文件進行hash并保存到sha.filelist
文件中。
root@toor:/mnt/analysis # find . -type f -exec sha1sum {} \; > ~/evid/sha.filelist
以便以后檢查文件是否有改動:
root@toor:/mnt/analysis # sha1sum -c ~/evid/sha.filelist
當然,每個文件的文件類型信息也保存一份:
root@toor:/mnt/analysis # find . -type f -exec file {} \; > ~/evid/filetype.list
可惡,他把證據藏在了哪里?難道這里沒有嗎?不行,我要再仔細找找。
那就對整個鏡像來個搜索吧,先把下面的關鍵字保存到一個文件里。
$50,000
ransom
unleash a virus
喲,有了!
root@toor:~/evid # grep -abif searchlist.txt floppy.dd
75441:you and your entire business ransom.
75500:I have had enough of your mindless corporate piracy and will nolonger stand for it. You will receive another letter next week. Itwill have a single bank account number and bank name. I want you todeposit $50,000 in the account the day you receive the letter.
75767:Don't try anything, and don't contact the cops. If you do, Iwill unleash a virus that will bring down your whole network anddestroy your consumer's confidence.
再用xxd
直接查看偏移75441
處看16進制數據:
root@toor:~/evid # xxd -s 75441 floppy.dd | less
00126b1: 796f 7520 616e 6420 796f 7572 2065 6e74 you and your end
00126c1: 6972 6520 6275 7369 6e65 7373 2072 616e ire business ran
00126d1: 736f 6d2e 0a0a 5468 6973 2069 7320 6e6f som...This is no
00126e1: 7420 6120 6a6f 6b65 2e0a 0a49 2068 6176 t a joke...I hav
00126f1: 6520 6861 6420 656e 6f75 6768 206f 6620 e had enough of
0012701: 796f 7572 206d 696e 646c 6573 7320 636f your mindless co
0012711: 7270 6f72 6174 6520 7069 7261 6379 2061 rporate piracy a
0012721: 6e64 2077 696c 6c20 6e6f 206c 6f6e 6765 nd will no longe
0012731: 7220 7374 616e 6420 666f 7220 6974 2e20 r stand for it.
<continues>
雖然找到了證據,可是背后還是陣陣發冷。我抬頭,窗外的風吹不進來,四周一片寂靜,總感覺,事情沒有那么簡單......
Clue 2
順著剛才證據一路看下去,一直到偏移0x0012e1a
處,第二條線索映入眼簾,果然,這里面還有問題!
圖片,將會邁向下一個開端
圖片?我翻遍掛載鏡像里面的所有的圖片,可是沒有一個是可疑的,難道,是我打開的方式不對?這時,一個名叫image_carve.raw
的文件引起了我的注意。我的直覺告訴我,因該是這個錯不了。
root@toor:~# file image_carve.raw
image_carve.raw: data
root@toor:~# xxd image_carve.raw | less
0000000: 776a 176b 5fd3 9eae 247f 33b3 efbe 8d6a wj.k_...$.3....j
0000010: d3a9 daa0 8eef c199 102f 7eaa 0c68 a908 ........./~..h..
0000020: fca4 7e13 dc6b 17a9 e973 35a0 cfc3 9360 ..~..k...s5....`
0000030: f9c0 a6b9 1476 b268 de0f 94fa a2f4 4705 .....v.h......G.
0000040: 452d 7691 eb4f 2fa7 b31f 328b c07a ce3d E-v..O/...2..z.=
<continues>
奇怪,我只看到一堆雜亂隨機的字符數據,這看上去不像是圖片數據。
讓我再想想,我記得每種文件都有相應的magic number
來標記其格式,而JPEG圖片文件則是以偏移JFIF
六個字節的十六進制ffd8
開始,ffd9
結束。
這次,結合xxd
和grep
來搜搜試試看:
root@toor:~# xxd image_carve.raw | grep ffd8
00052a0: b4f1 559c ffd8 ffe0 0010 4a46 4946 0001 ..U.......JFIF..
咦,還真有,我感覺有戲!記下ffd8
的位置0x00052a4
,轉換成十進制為21156
:
root@toor:~# echo "ibase=16;00052A4" | bc
21156
然后在從偏移21156
后面找ffd9
:
root@toor:~# xxd -s 21156 image_carve.raw | grep ffd9
0006c74: ffd9 d175 650b ce68 4543 0bf5 6705 a73c ...ue..hEC..g..<
因為圖片文件包含ffd9
,所以結尾的地址0x0006c76
。兩者相減,得到圖片大小:
root@toor:~# echo "ibase=16;0006C76 - 00052A4" | bc
6610
最后就是把圖片提取出來惹,這里用的是dd
命令,skip
為偏移,bs(block size)
設置為1字節,然后count
就是圖片的大小:
root@toor:~# dd if=image_carve.raw of=carv.jpg skip=21156 bs=1 count=6610
6610+0 records in
6610+0 records out
Clue 3
不出意外的話,第三條線索就是這張圖片了,上面刻畫著一些奇怪的符號,不過我還是能辨認出一些金文,這是一種大篆體。
監聽,注視周圍發生的一切
我豎起耳朵,眼睛向四周掃視,沒有人,這里只有我一個。我開始感到疑惑,直到我看到了圖片右下角一行極小的字,這是什么!
root@able2: ~ # dd if=/dev/sda | nc 192.168.55.20 2525
192.168.55.20
,這不是這臺電腦的ip嗎,難道說,還有另外一臺電腦正在向我傳送什么數據嗎?/dev/sda
這不是硬盤數據嗎,到底是什么呢?不管怎么說,這里面肯定有我想要找的的答案,先保存下來看看。
root@toor: ~ # nc -l -p 2525 | dd of=~/able2/able2.dd
由于able2.dd是整個sda硬盤的鏡像,不能直接掛載,所以先看看其分區結構:
root@toor:~/able2 # sfdisk -l -uS able2.dd
Disk able2.dd: cannot get geometry
...<error messages>
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
able2.dd1 57 10259 10203 83 Linux
able2.dd2 10260 112859 102600 83 Linux
able2.dd3 112860 178694 65835 82 Linux swap / Solaris
able2.dd4 178695 675449 496755 83 Linux
able2.dd5 675450 676690 10240 83 Linux
五個分區,好吧,那就依次提取出來:
root@toor:~/able2 # dd if=able2.dd of=able2.part1.dd bs=512 skip=57 count=10203
10203+0 records in
10203+0 records out
root@toor:~/able2 # dd if=able2.dd of=able2.part2.dd bs=512 skip=10260 count=102600
102600+0 records in
102600+0 records out
root@toor:~/able2 # dd if=able2.dd of=able2.part3.dd bs=512 skip=112860 count=65835
65835+0 records in
65835+0 records out
root@toor:~/able2 # dd if=able2.dd of=able2.part4.dd bs=512 skip=178695 count=496755
496755+0 records in
496755+0 records out
root@toor:~/able2 # dd if=able2.dd of=able2.part5.dd bs=512 skip=675450 count=10240
10240+0 records in
10240+0 records out
接下來就是要根據這五個分區來還原文件系統了。我不厭其煩的開始依次掛載每個分區觀察其文件目錄結構:
root@toor:~/able2 # mount -t ext2 -o ro,loop able2.part1.dd /mnt/analysis/
我偷了個懶,當掛載able2.part2.dd
的時候,直接查看fstab文件就知道了。
root@toor:~/able2 # cat /mnt/analysis/etc/fstab
/dev/hda2 / ext2 defaults 1 1
/dev/hda1 /boot ext2 defaults 1 2
/dev/hda4 /usr ext2 defaults 1 2
/dev/hda5 /clue ext2 defaults 1 2
/dev/hda3 swap swap defaults 0 0
根據fstab掛載相應的分區到對應的路徑下:
root@toor:~/able2 # mount -t ext2 -o ro,loop able2.part2.dd /mnt/analysis/
root@toor:~/able2 # mount -t ext2 -o ro,loop able2.part1.dd /mnt/analysis/boot
root@toor:~/able2 # mount -t ext2 -o ro,loop able2.part4.dd /mnt/analysis/usr
root@toor:~/able2 # mount -t ext2 -o ro,loop able2.part5.dd /mnt/analysis/clue
clue
分區已解鎖,我cd
進去,我知道里面會有什么等著我,這就像是一場噩夢,可我還是必須直面,哪怕頭破血流。
Clue 4
沒有,什么都沒有,一片空白!
clue
目錄下什么都沒有,連隱藏文件的氣味都沒有,就像虛無一樣完全看不到希望,怎么辦!
我的第六感告訴我,這里一定哪里不對勁。看來,是時候使用Sleuthkit
了,最重要的是,這臺古老的電腦居然也安了Sleuthkit
。
先試了下mmls
,這個命令跟之前的sfdisk
的作用類似,也能給出鏡像的分區信息,只不過更加好用。
root@toor:~/able2 # mmls -t dos able2.dd
DOS Partition Table
Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: ----- 0000000000 0000000000 0000000001 Primary Table (#0)
01: ----- 0000000001 0000000056 0000000056 Unallocated
02: 00:00 0000000057 0000010259 0000010203 Linux (0x83)
03: 00:01 0000010260 0000112859 0000102600 Linux (0x83)
04: 00:02 0000112860 0000178694 0000065835 Linux Swap / Solaris
05: 00:03 0000178695 0000675449 0000496755 Linux (0x83)
從之前就已經知道根目錄/
文件系統在第二分區,從上面可知偏移為000010260
,用fsstat
查看詳細信息:
root@toor:~/able2 # fsstat -o 10260 able2.dd
FILE SYSTEM INFORMATION
--------------------------------------------
File System Type: Ext2
Volume Name:
Volume ID: 906e777080e09488d0116064da18c0c4
Last Written at: Sun Aug 10 14:50:03 2003
Last Checked at: Tue Feb 11 00:20:09 1997
Last Mounted at: Thu Feb 13 02:33:02 1997
Unmounted Improperly
Last mounted on:
Source OS: Linux
Dynamic Structure
InCompat Features: Filetype,
Read Only Compat Features: Sparse Super,
METADATA INFORMATION
--------------------------------------------
Inode Range: 1 - 12881
Root Directory: 2
Free Inodes: 5807
CONTENT INFORMATION
--------------------------------------------
Block Range: 0 - 51299
Block Size: 1024
Reserved Blocks Before Block Groups: 1
<continues>
別浪費時間了,快看看clue
文件夾到底怎么了,我心里告訴自己。
事不宜遲,拿出利器fls
,fls
可以列出文件系統上所有的文件和目錄:
root@toor:~/able2 # fls -o 10260 able2.dd
d/d 11: lost+found
d/d 3681: boot
d/d 7361: usr
d/d 3682: proc
d/d 7362: var
d/d 5521: tmp
d/d 7363: dev
d/d 9201: etc
d/d 1843: bin
d/d 1844: home
d/d 7368: lib
d/d 7369: met
d/d 7370: opt
d/d 1848: root
d/d 1849: sbin
d/d 8243: clue
r/r 1042: .bash_history
d/d 11105: .001
d/d 12881: $OrphanFiles
用-d
選項列出文件系統上所有被刪掉的文件(已刪除的文件會用*
標記):
root@toor:~/able2 # fls -o 10260 -Frd able2.dd
r/r * 11120(realloc): var/lib/slocate/slocate.db.tmp
r/r * 10063: var/log/xferlog.5
r/r * 10063: var/lock/makewhatis.lock
r/r * 6613: var/run/shutdown.pid
r/r * 1046: var/tmp/rpm-tmp.64655
r/r * 6609(realloc): var/catman/cat1/rdate.1.gz
r/r * 6613: var/catman/cat1/rdate.1.gz
r/r * 6616: tmp/logrot2V6Q1J
r/r * 2139: dev/ttYZ0/lrkn.tgz
d/r * 10071(realloc): dev/ttYZ0/lrk3
r/r * 6572(realloc): etc/X11/fs/config-
l/r * 1041(realloc): etc/rc.d/rc0.d/K83ypbind
l/r * 1042(realloc): etc/rc.d/rc1.d/K83ypbind
l/r * 6583(realloc): etc/rc.d/rc2.d/K83ypbind
l/r * 6584(realloc): etc/rc.d/rc4.d/K83ypbind
l/r * 1044: etc/rc.d/rc5.d/K83ypbind
l/r * 6585(realloc): etc/rc.d/rc6.d/K83ypbind
r/r * 1044: etc/rc.d/rc.firewall~
r/r * 6544(realloc): etc/pam.d/passwd-
r/r * 10055(realloc): etc/mtab.tmp
r/r * 10047(realloc): etc/mtab~
r/- * 0: etc/.inetd.conf.swx
r/r * 2138(realloc): root/lolit_pics.tar.gz
r/r * 2139: clue/lrkn.tgz
r/r * 1055: $OrphanFiles/OrphanFile-1055
r/r * 1056: $OrphanFiles/OrphanFile-1056
r/r * 1057: $OrphanFiles/OrphanFile-1057
r/r * 2141: $OrphanFiles/OrphanFile-2141
r/r * 2142: $OrphanFiles/OrphanFile-2142
r/r * 2143: $OrphanFiles/OrphanFile-2143
<continues>
果然,clue
文件下有一個被刪除的文件。不管是什么,看來,我得想辦法把它復原出來。
r/r * 2139: clue/lrkn.tgz
clue/lrkn.tgz
的inode是2139,于是用istat
查看的該inode的詳細信息:
root@toor:~/able2 # istat -o 10260 able2.dd 2139
inode: 2139
Not Allocated
Group: 1
Generation Id: 3534950564
uid / gid: 0 / 0
mode: rrw-r--r--
size: 3639016
num of links: 0
Inode Times:
Accessed: Sun Aug 10 00:18:38 2003
File Modified: Sun Aug 10 00:08:32 2003
Inode Modified: Sun Aug 10 00:29:58 2003
Deleted: Sun Aug 10 00:29:58 2003
Direct Blocks:
22811 22812 22813 22814 22815 22816 22817 22818
22819 22820 22821 22822 22824 22825 22826 22827
<snip>...
32233 32234
接下來就是保存該inode指向的block數據,即被刪除的文件:
root@toor:~/able2 # icat -o 10260 able2.dd 2139 > lrkn.tgz.2139
root@toor:~/able2 # file lrkn.tgz.2139
lrkn.tgz.2139: gzip compressed data, was "lrkn.tar", from Unix
嗯,沒錯,是一個gzip
的壓縮文件。
現在我已非常謹慎,這是種不好的預感。先不解壓,看看里面有什么:
root@toor:~/able2 # tar tzvf lrkn.tgz.2139 | less
drwxr-xr-x lp/lp 0 1998-10-01 18:48:18 lrk3/
-rwxr-xr-x lp/lp 742 1998-06-27 11:30:45 lrk3/1
-rw-r--r-- lp/lp 716 1996-11-02 16:38:43 lrk3/MCONFIG
-rw-r--r-- lp/lp 6833 1998-10-03 05:02:15 lrk3/Makefile
-rw-r--r-- lp/lp 6364 1996-12-27 22:01:43 lrk3/README
-rw-r--r-- lp/lp 1732 1995-11-10 23:59:59 lrk3/CLUE5
-rwxr-xr-x lp/lp 90 1998-06-27 12:53:45 lrk3/RUN
drwxr-xr-x lp/lp 0 1998-10-01 18:08:50 lrk3/bin/
<continues>
這是什么鬼,lrk3
是一個非常古老的rootkit
,我表示對rootkit
完全不了解。可是,里面的CLUE5
卻血腥的刺眼,又是一條可怕的提示,想想就讓人不禁寒顫。
root@toor:~/able2 # tar xzvfO lrkn.tgz.2139 lrk3/CLUE5 > CLUE5
lrk3/CLUE5
Clue 5
線索5的陳述依然是那么簡單有力讓人摸不著頭腦。
CYBERNETIK,找尋它身處何處
我默默的想,也許這是在提示我,找到含有關鍵字CYBERNETIK
的文件所在。一想到這里,身體就不由自主的不受控制,開始在終端前機械的操作起來。
第一步對整個鏡像文件來個搜索:
root@toor:~/able2 # grep -abi CYBERNETIK able2.dd
10561603: * updated by Cybernetik for linux rootlet
55306929:Cybernetik proudly presents...
55312943:Email: cybernetik@nym.alias.net
55312975:Finger: cybernetik@nym.alias.net
root@toor:~/able2 # xxd -s 10561603 able2.dd | head -n 5
0a12843: 202a 0975 7064 6174 6564 2062 7920 4379 *.updated by Cy
0a12853: 6265 726e 6574 696b 2066 6f72 206c 696e bernetik for lin
0a12863: 7578 2072 6f6f 746b 6974 0a20 2a2f 0a0a ux rootkit. */..
0a12873: 2369 6e63 6c75 6465 203c 7379 732f 7479 #include <sys/ty
0a12883: 7065 732e 683e 0a23 696e 636c 7564 6520 pes.h>.#include
有這個關鍵字,一種不好的預感涌上心頭,我知道,接下來就是找到這個文件并把它提取出來。
根據上面的結果,關鍵字CYBERNETIK
第一次出現在鏡像偏移10561603
處,之前用fsstat
知道了每個扇區的大小是512字節,所以可以計算出位于哪個扇區:
root@toor:~/able2 # echo "10561603/512" | bc
20628
之前用mmls
得到該文件所在的分區起始于扇區10260
:
root@toor:~/able2 # mmls -t dos able2.dd
DOS Partition Table
Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: ----- 0000000000 0000000000 0000000001 Primary Table (#0)
01: ----- 0000000001 0000000056 0000000056 Unallocated
02: 00:00 0000000057 0000010259 0000010203 Linux (0x83)
03: 00:01 0000010260 0000112859 0000102600 Linux (0x83)
04: 00:02 0000112860 0000178694 0000065835 Linux Swap / Solaris
05: 00:03 0000178695 0000675449 0000496755 Linux (0x83)
知道關鍵字在物理硬盤鏡像偏移并不能幫我們定位文件,所以兩者相減,就得到卷偏移:
通過fsstat
知道了Block
大小是1024字節,因此,可以計算出關鍵字位于哪個block:
總體來說,通過以上步驟我們得到了block偏移。
知道了位于哪個塊,我不由得舒了一口氣,我知道,接下來的就容易的很多了。先用ifind
找到哪個inode指向的是數據塊5148:
root@toor:~/able2 # ifind -o 10260 -f ext -d 5184 able2.dd
10090
歐耶,乘勝追擊,直接將該inode指向的文件數據輸出出來:
root@toor:~/able2 # icat -r -o 10260 -f ext able2.dd 10090 | less
/*
* fixer.c
* by Idefix
* inspired on sum.c and SaintStat 2.0
* updated by Cybernetik for linux rootlet
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <stdio.h>
#include <clue6.h>
/*
C.L.U.E.6:
答案,遺失在交換數據流裡
*/
main (argc,argue)
int argh;
char **argv;
<continues>
回過頭來再看看,我怎么沒想到,不需要這么麻煩,還有更簡單的方法,只需用到blkls
和blkcalc
就可以輕松得到block位置了。
Clue 6
相必已看到,第六條線索不出意料的就在剛才文件的注釋里:
答案,遺失在交換數據流裡
交換數據流,我想,應該指的是NTFS文件系統里的ADS特性。可當前的明明是EXT2文件系統,咦,不對,我好像看見了一個ntfs.dd
的文件!難道是這個?也沒有其它辦法了,姑且一試吧。
二話不說先掛載,列出所有文件:
root@toor:~/ntfs_pract # mount -t ntfs -o ro,loop,offset=30208 ntfs.dd /mnt/analysis/
root@toor:~/ntfs_pract # cd /mnt/analysis/
root@toor:~/analysis # find . -type f
./Cookies/buckyball@as-eu.falkag[2].txt./Cookies/buckyball@2o7[1].txt
./Cookies/buckyball@ad.yieldmanager[1].txt
./Cookies/buckyball@specificclick[1].txt
./Cookies/buckyball@store.makezine[1].txt
./Cookies/buckyball@store.yahoo[2].txt
... [content removed]
./Favorites/2600 The Hacker Quarterly.url
... [content removed]
./My Documents/My Pictures/Tails/GemoTailG4.jpg
./My Documents/signatures.pdf
./My Documents/ULTIMATEJOURNEYDK.wmv
./My Documents/Webstuff/bandit2.jpg
./My Documents/Webstuff/m2_flat_CF.jpg
./My Documents/Webstuff/service1.jpg
./My Documents/Webstuff/Thumbs.db
./NTUSER.DAT
./SVstunts.avi
貌似沒有什么異常,可以我心里總覺得這個avi
文件十分可疑,可能是男人的直覺吧。線索提示既然是ADS,那這回換個方式查看,直接看鏡像文件。
首先查看分區:
root@toor:~/ntfs_pract # mmls ntfs.dd
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
00: ----- 0000000000 0000000000 0000000001 Primary Table (#0)
01: ----- 0000000001 0000000058 0000000058 Unallocated
02: 00:00 0000000059 0001023059 0001023001 NTFS (0x07)
03: ----- 0001023060 0001023999 0000000940 Unallocated
得知NTFS分區的偏移是59,然后用fls
列出所有文件:
root@toor:~/ntfs_pract # fls -Fr -o 59 -f ntfs ntfs.dd
r/r 4-128-4: $AttrDef
r/r 8-128-2: $BadClus
r/r 8-128-1: $BadClus:$Bad
r/r 6-128-1: $Bitmap
...
r/r 0-128-1: $MFT
r/r 1-128-1: $MFTMirr
r/r 9-128-8: $Secure:$SDS
...
r/r * 42-128-1: Cookies/buckyball@revsci[2].txt
r/r * 43-128-1: Cookies/buckyball@search.msn[1].txt
r/r * 44-128-1: Cookies/buckyball@slashdot[1].txt
...
r/r 128-128-3: My Documents/My Pictures/Thumbs.db
r/r 128-128-4: My Documents/My Pictures/Thumbs.db:encrypt able
r/r * 112-128-4: My Documents/My Pictures/bandit-streetortrack2005056.jpg
r/r * 116-128-4: My Documents/My Pictures/fighterama2005-ban4.jpg
r/r 129-128-4: My Documents/Osuny Articles courtesy of BIOC Agent.doc
r/r 130-128-4: My Documents/signatures.pdf
r/r 131-128-4: My Documents/ULTIMATEJOURNEYDK.wmv
r/r 133-128-3: My Documents/Webstuff/bandit2.jpg
r/r 134-128-4: My Documents/Webstuff/m2_flat_CF.jpg
r/r 135-128-3: My Documents/Webstuff/service1.jpg
r/r 136-128-3: My Documents/Webstuff/Thumbs.db
r/r * 81-128-4: My Documents/direct_attacks.doc
r/r 138-128-3: NTUSER.DAT
r/r 137-128-3: SVstunts.avi
r/r 137-128-4: SVstunts.avi:walkingdead.txt
可以看到,這個avi
文件有兩個入口,第二個就是隱藏在ADS里的文本文件。
明明知道等待著我的會是什么,可我還是忍不住打開這個文件:
root@toor:~/ntfs_pract # icat -o 59 -f ntfs ntfs.dd 137-128-4
___ _,.---,---.,_
| ,;~' '~;,
| ,; ;,
Frontal | ; ; ,--- Supraorbital Foramen
Bone | ,' /'
| ,; /' ;,
| ; ; . . <-' ; |
|__ | ; ______ ______ ;<----- Coronal Suture
___ | '/~" ~" . "~ "~\' |
| | ~ ,-~~~^~, | ,~^~~~-, ~ |
Maxilla, | | | }:{ | <------ Orbit
Nasal and | | l / | \ ! |
Zygomatic | .~ (__,.--" .^. "--.,__) ~.
Bones | | ----;' / | \ `;-<--------- Infraorbital Foramen
|__ \__. \/^\/ .__/
___ V| \ / |V <--- Mastoid Process
| | |T~\___!___!___/~T| |
| | |`IIII_I_I_I_IIII'| |
Mandible | | \,III I I I III,/ |
| \ `~~~~~~~~~~' /
| \ . . <-x---- Mental Foramen
|__ \. ^ ./
^~~~^~~~^ -dcau (4/15/95)
>
De profundis clamo ad te domine.
...
I see dead people.
De profundis clamo ad te domine
,我疑惑地呢喃著。突然,眼前一黑,好像有什么硬物砸在了我的頭上,我重重的倒在地上。意識在漸漸失去,可我貌似看到了什么......
尾
月光詭異的從窗外傾灑進來,我緩緩地睜開眼,頭疼的幾乎將要炸裂。電腦屏幕上的綠色字符冷冷的閃爍跳動,我吃力的站起來。不行,我要趕快刪掉這個文件,不能再被人發現它的存在,我知道它的可怕。
直接刪掉這個鏡像文件,我要抹去它的存在。幸好,我手上現在掌握著幾種這臺老式電腦上能用的刪除文件的法術。
rm -rf /
find / -type f -delete
rsync -a –delete empty/ /
我知道,不能用rm
,rm
太危險,一旦被復原,后果不堪設想。find
也一樣,至于rsync
,這個不熟悉,我不能冒著這樣的風險。
直接格盤吧,不行,不能搞這么大的動靜,我只想靜靜的刪除文件。
dd if=/dev/zero of=/dev/hd*
shred
,沒錯,我怎么沒想到這個,還有這個可以用。shred
會用隨機內容覆蓋文件所在的節點和數據塊,并刪除文件,就是它了。
root@toor:~/ntfs_pract # shred -u ntfs.dd
用fls
檢查下,并沒有出現,至少,現在可以舒一口氣了。此時,烏云遮住了月亮,我知道,故事到這里就結束了。
跋
本文為閱書有感而作,一本是來自LinuxLeo網站提供的Linux取證入門的書;一本是來自Brain Carrier的經典的File System Forensic Analysis
;一本是CFTT項目測試各種取證工具并總結的取證工具handbook大全(2015版)。你可以在這里獲取這三本書。
其中示例及所用鏡像文件均來自書中,愿各位親自嘗試體驗其中的樂趣。
本人已整理打包,下載地址:http://pan.baidu.com/s/1ogLXW
成文倉促,文辭粗淺,僅資一娛,諸君見諒。
微信公共號:urinx,望關注。