---
title: bulk-extractor
categories: Forensics Tools
tags: [forensics,kali linux,bulk-extractor]
date: 2017-09-07 09:22:00
---
0x00 介紹
-------------
bulk_extractor是從數字證據文件中提取諸如電子郵件地址,信用卡號,URL和其他類型的信息的功能的程序。 它是一個有用的取證調查工具,可以用于許多任務,如惡意軟件和入侵調查,身份調查和網絡調查,以及圖像分析和密碼破解。 該程序提供了幾個不尋常的功能:
1.發現其他工具發現不了的信息,如電子郵件地址,URL和信用卡號碼,得益于它能處理壓縮數據(如ZIP,PDF和GZIP文件)以及不完整或部分損壞的數據。 它可以從壓縮數據的片段中提取JPEG文件,辦公文檔和其他類型的文件 ,還可以自動檢測并提取加密的RAR文件。
2.根據數據中發現的所有單詞構建單詞列表,甚至可以是在未分配空間的壓縮文件中的數據。 這些單詞列表可用于密碼破解。
3.多線程的; 速度快節約時間
4.分析完之后創建直方圖,顯示電子郵件地址,URL,域名,搜索關鍵詞和其他類型的信息。
bulk_extractor可以對磁盤映像,文件或文件目錄進行分析,并在不分析文件系統或文件系統結構的情況下提取有用的信息。 輸入被分割成頁面并由一個或多個掃描器處理。 結果存儲在特征文件中,可以使用其他自動化工具輕松檢查,解析或處理。
bulk_extractor還創建了它所發現的特征的直方圖。 這樣非常有用,因為諸如電子郵件地址和網絡搜索關鍵詞的功能往往很常見且重要。
除了上述功能之外,bulk_extractor還包括以下功能:
5.具有瀏覽特征文件中存儲的功能以及啟動bulk_extractor掃描的圖形用戶界面的Bulk Extractor Viewer
6.少量用于對特征文件進行額外分析的python程序
<!--more-->
來源:[http://digitalcorpora.org/downloads/bulk_extractor/BEUsersManual.pdf][1]
[主頁][2] | [倉庫][3]
- 作者:Simson L. Garfinkel
- 證書:GPLv2
0x01 功能
----------------
bulk_extractor - 在不解析文件系統的情況下提取信息。
```plain
bulk_extractor version 1.6.0-dev
用法:bulk_extractor [選項] 文件
運行bulk_extractor并提取摘要信息并輸出到文件
必需參數:
imagefile - 要提取的文件
或者-R filedir - 遍歷目錄下的文件
支持E01文件
支持AFF文件
-o outdir - 指定輸出目錄,目錄不得已存在
bulk_extractor將創建此目錄
選項:
-i - 信息模式。快速分析隨機取樣的樣本并打印報告
-b banner.txt - 將banner.txt內容添加到每個輸出文件的頭部
-r alert_list.txt - 包含提醒作業的警報列表的文件
(可以是特征文件或全局列表)
(可以重復)
-w stop_list.txt - 包含功能停止列表的文件(白名單)
(可以是特征文件或全局列表)
(可以重復)
-F <rfile> - 從<rfile>讀取正則表達式列表以查找
-f <regex> - 查找出現的<regex>;可能重復。
結果存入find.txt
-q nn - 靜默的模式;只輸出nn級別的狀態報告。默認值0; -1,沒有狀態輸出
-s frac [:passes] - 設置隨機抽樣參數
調整參數:
-C NN - 指定上下文窗口的大小(默認值為16)
-S fr:<name>:window = NN - 指定錄像機到NN的上下文窗口
-S fr:<name>:window_before = NN - 指定之前的上下文窗口到NN為記錄器
-S fr:<name>:window_after = NN - 指定后綴到NN后的上下文窗口
-G NN - 指定頁面大小(默認16777216)
-g NN - 指定余量(默認4194304)
-j NN - 要運行的分析線程數(默認4)
-M nn - 設置最大遞歸深度(默認7)
-m <max> - 所有數據讀取后等待的最大分鐘數(默認60)
路徑處理模式:
-p <path> / f - 以給定的格式打印<path>的值。
格式:r = 源格式; h = 十六進制格式。
指定-p - 進行交互模式
指定-p -http為HTTP模式
并行化:
-Y <o1> - 在o1開始處理(o1可以是1,1K,1M或1G)
-Y <o1> - <o2> - 處理o1-o2
-A <off> - 將<off>添加到所有報告的特征偏移
調試:
-h - 打印此消息
-H - 打印掃描儀的詳細信息
-V - 打印版本號
-z nn - 從第nn頁開始
-dN - 調試模式(參見源代碼)
-Z - 清除輸出目錄
掃描控制:
-P <dir> - 指定一個插件目錄
默認目錄包括/usr/local/lib/bulk_extractor,/usr/lib/bulk_extractor和
BE_PATH環境變量
-e <scanner> 啟用掃描器 - -e all 全部啟用
-x <scanner> 禁用掃描器 - -x all 全部禁用
-E <scanner> - 關閉除指定掃描器以外的所有掃描器
(與-x all -e <scanner>效果一樣)
注意:-e,-x和-E命令按順序執行
例如:'-E gzip -e facebook'只運行gzip和facebook
-S name = value - 將批量提取器選項名稱設置為值
可設置選項(及其默認值):
-S work_start_work_end = YES 在report.xml文件中記錄每個掃描器的工作開始和結束時間
-S enable_histograms = YES 禁用生成直方圖
-S debug_histogram_malloc_fail_frequency = 0 設置大于零記錄內存分配失敗直方圖
-S hash_alg = md5 指定用于所有哈希計算的哈希算法
-S dup_data_alerts =NO 重復數據未處理時通知
-S write_feature_files = YES 寫入特征文件
-S write_feature_sqlite3 = NO 將特征文件寫入report.sqlite3
-S report_read_errors = YES 報告讀取錯誤
-S carve_net_memory = NO 提取網絡內存結構(net)
-S word_min = 6 最小字大小(wordlist)
-S word_max = 14 最大字大小(wordlist)
-S max_word_outfile_size = 100000000 輸出文件的最大大小(wordlist)
-S wordlist_use_flatfiles = YES 覆蓋SQL設置并對wordlist(wordlist)使用flatfiles
-S ssn_mode = 0 0=正常格式; 1=不需要SSN; 2=去掉破折號(accts)
-S min_phone_digits = 7 手機所需的數字(accts)
-S exif_debug = 0 讀取exif信息(exif)
-S jpeg_carve_mode = 1 0=不提取; 1=雕刻編碼提取; 2=全部提取(exif)
-S min_jpeg_size = 1000 將被雕刻的最小的JPEG流(exif)
-S zip_min_uncompr_size = 6 ZIP未壓縮對象的最小大小(zip)
-S zip_max_uncompr_size = 268435456 ZIP未壓縮對象的最大大小(zip)
-S zip_name_len_max = 1024 ZIP組件的最大名稱filename(zip)
-S unzip_carve_mode = 1 0=不提取; 1=雕刻編碼提取; 2=全部提取(zip)
-S rar_find_components = YES 搜索RAR組件(rar)
-S rar_find_volumes = YES 搜索RAR卷(rar)
-S unrar_carve_mode = 1 0=不提取; 1=雕刻編碼提取; 2=全部提取(rar)
-S gzip_max_uncompr_size = 268435456 解壓縮GZIP對象的最大大小(gzip)
-S pdf_dump = NO 轉儲PDF緩沖區的內容(pdf)
-S pdf_dump = NO 轉儲PDF緩沖區的內容(msxml)
-S winpe_carve_mode = 1 0=不提取; 1=雕刻編碼提取; 2=全部提取(winpe)
-S opt_weird_file_size = 157286400 FAT32掃描(windir)的閾值
-S opt_weird_file_size2 = 536870912 FAT32掃描(windir)的閾值
-S opt_weird_cluster_count = 67108864 FAT32掃描(windir)的閾值
-S opt_weird_cluster_count2 = 268435456 FAT32掃描(windir)的閾值
-S opt_max_bits_in_attrib = 3 忽略更多屬性設置的FAT32條目(windirs)
-S opt_max_weird_count = 2 忽略奇怪的FAT32條目(windirs)
-S opt_last_year = 2022 忽略晚于此FAT32條目(windirs)
-S xor_mask = 255 設置XOR掩碼值,十進制格式(xor)
-S sqlite_carve_mode = 2 0=不提取; 1=雕刻編碼提取; 2=全部提取(sqlite)
以下掃描默認禁用;啟用使用-e命令:
-e base16 - 啟用掃描base16
-e facebook - 啟用掃描facebook
-e outlook - 啟用掃描outlook
-e sceadan - 啟用掃描sceadan
-e wordlist - 啟用掃描wordlist
-e xor - 啟用掃描xor
以下掃描默認啟用;禁用使用-x命令:
-x accts - 禁用掃描程序
-x aes - 禁用掃描aes
-x base64 - 禁用掃描base64
-x elf - 禁用掃描elf
-x mail - 禁用掃描郵件
-x exif - 禁用掃描exif
-x find - 禁用掃描發現
-x gps - 禁用掃描gps
-x gzip - 禁用掃描gzip
-x hiberfile- 禁用掃描hiberfile
-x httplogs - 禁用掃描httplogs
-x json - 禁用掃描json
-x kml - 禁用掃描kml
-x msxml - 禁用掃描msxml
-x net - 禁用掃描net
-x pdf - 禁用掃描pdf
-x rar - 禁用掃描rar
-x sqlite - 禁用掃描sqlite
-x vcard - 禁用掃描vcard
-x windirs - 禁用掃描windirs
-x winlnk - 禁用掃描winlnk
-x winpe - 禁用掃描winpe
-x zip - 禁用掃描zip
-x winprefetch - 禁用掃描winprefetch
```
0x02 示例
---------
分析映像文件后,將結果導出到輸出目錄(-o bulk-out)(xp-laptop-2005-07-04-1430.img):
```plain
root@kali:~# bulk_extractor -o bulk-out xp-laptop-2005-07-04-1430.img
bulk_extractor version 1.6.0-dev
Hostname: kali
Input file: xp-laptop-2005-07-04-1430.img
Output directory: bulk-out
Disk Size: 536715264
Threads: 1
Phase 1.
13:02:46 Offset 0MB (0.00%) Done in n/a at 13:02:45
13:03:39 Offset 67MB (12.50%) Done in 0:06:14 at 13:09:53
13:04:43 Offset 134MB (25.01%) Done in 0:05:50 at 13:10:33
13:04:55 Offset 201MB (37.51%) Done in 0:03:36 at 13:08:31
13:06:01 Offset 268MB (50.01%) Done in 0:03:15 at 13:09:16
13:06:48 Offset 335MB (62.52%) Done in 0:02:25 at 13:09:13
13:07:04 Offset 402MB (75.02%) Done in 0:01:25 at 13:08:29
13:07:20 Offset 469MB (87.53%) Done in 0:00:39 at 13:07:59
All Data is Read; waiting for threads to finish...
Time elapsed waiting for 1 thread to finish:
(please wait for another 60 min .)
Time elapsed waiting for 1 thread to finish:
6 sec (please wait for another 59 min 54 sec.)
Thread 0: Processing 520093696
Time elapsed waiting for 1 thread to finish:
12 sec (please wait for another 59 min 48 sec.)
Thread 0: Processing 520093696
Time elapsed waiting for 1 thread to finish:
18 sec (please wait for another 59 min 42 sec.)
Thread 0: Processing 520093696
Time elapsed waiting for 1 thread to finish:
24 sec (please wait for another 59 min 36 sec.)
Thread 0: Processing 520093696
Time elapsed waiting for 1 thread to finish:
30 sec (please wait for another 59 min 30 sec.)
Thread 0: Processing 520093696
All Threads Finished!
Producer time spent waiting: 335.984 sec.
Average consumer time spent waiting: 0.143353 sec.
*******************************************
** bulk_extractor is probably CPU bound. **
** Run on a computer with more cores **
** to get better performance. **
*******************************************
Phase 2. Shutting down scanners
Phase 3. Creating Histograms
ccn histogram... ccn_track2 histogram... domain histogram...
email histogram... ether histogram... find histogram...
ip histogram... tcp histogram... telephone histogram...
url histogram... url microsoft-live... url services...
url facebook-address... url facebook-id... url searches...
Elapsed time: 378.5 sec.
Overall performance: 1.418 MBytes/sec.
Total email features found: 899
```
[1]: http://digitalcorpora.org/downloads/bulk_extractor/BEUsersManual.pdf
[2]: https://github.com/simsong/bulk_extractor/
[3]: http://git.kali.org/gitweb/?p=packages/bulk-extractor.git;a=summary
- Information Gathering
- acccheck
- ace-voip
- Amap
- Automater
- bing-ip2hosts
- braa
- CaseFile
- CDPSnarf
- cisco-torch
- Cookie Cadger
- copy-router-config
- DMitry
- dnmap
- dnsenum
- dnsmap
- DNSRecon
- dnstracer
- dnswalk
- DotDotPwn
- enum4linux
- enumIAX
- Fierce
- Firewalk
- fragroute
- fragrouter
- Ghost Phisher
- GoLismero
- goofile
- hping3
- InTrace
- iSMTP
- lbd
- Maltego Teeth
- masscan
- Metagoofil
- Miranda
- nbtscan-unixwiz
- Nmap
- ntop
- p0f
- Parsero
- Recon-ng
- SET
- smtp-user-enum
- snmp-check
- sslcaudit
- SSLsplit
- sslstrip
- SSLyze
- THC-IPV6
- theHarvester
- TLSSLed
- twofi
- URLCrazy
- Wireshark
- WOL-E
- Xplico
- Vulnerability Analysis
- BBQSQL
- BED
- cisco-auditing-tool
- cisco-global-exploiter
- cisco-ocs
- cisco-torch
- copy-router-config
- Doona
- Exploitation Tools
- Wireless Attacks
- Ghost-Phisher
- mfoc
- Forensics Tools
- Binwalk
- bulk-extractor
- Web Applications
- apache-users
- BurpSuite
- sqlmap
- w3af
- Sniffing-Spoofing
- Bettercap
- Burp Suite
- DNSChef
- Fiked
- hamster-sidejack
- HexInject
- Password Attacks
- crunch
- hashcat
- John the Ripper
- Johnny
- Hardware Hacking
- android-sdk
- apktool
- Arduino
- dex2jar
- Sakis3G
- Reverse Engineering
- apktool