Imago-Forensics:Python實現的影像數字取證工具

  • 2020 年 1 月 20 日
  • 筆記

Imago是一個由python編寫的影像數字取證工具,它可以從影像中遞歸提取數字證據。在整個數字取證調查中,這款工具非常有用。如果你需要提取影像中的數字證據且數量較多,那麼Imago將能夠幫助你輕鬆地對比它們。此外,Imago還允許你將證據提取到CSV文件或sqlite資料庫中。如果在JPEG exif中存在GPS坐標,Imago可以提取經度和緯度,並將它們轉換為度數檢索相關資訊,如城市,國家,郵政編碼等。

安裝

通過pip

安裝 imago:

$ pip install imago

安裝完成後,應該有一個新的可用二進位文件:

$ imago

然後它應該輸出imago banner。

依賴軟體包

python 2.7 exifread 2.1.2 python-magic 0.4.15 argparse 1.4.0 pillow 5.2.0 nudepy 0.4 imagehash 4.0 geopy 1.16.0

使用

usage: imago.py [-h] -i INPUT [-x] [-g] [-e] [-n] [-d {md5,sha256,sha512,all}]                  [-p {ahash,phash,dhash,whash,all}] [-o OUTPUT] [-s]                  [-t {jpeg,tiff}]    optional arguments:    -h, --help            show this help message and exit    -i INPUT, --input INPUT                          Input directory path    -x, --exif            Extract exif metadata    -g, --gps             Extract, parse and convert to coordinates, GPS exif                          metadata from images (if any)It works only with JPEG.    -e, --ela             Extract, Error Level Analysis image,It works only with                          JPEG. *BETA*    -n, --nude            Detect Nudity, It works only with JPEG, *BETA*    -d {md5,sha256,sha512,all}, --digest {md5,sha256,sha512,all}                          Calculate perceptual image hashing    -p {ahash,phash,dhash,whash,all}, --percentualhash {ahash,phash,dhash,whash,all}                          Calculate hash digest    -o OUTPUT, --output OUTPUT                          Output directory path    -s, --sqli            Keep SQLite file after the computation    -t {jpeg,tiff}, --type {jpeg,tiff}                          Select the image, this flag can be JPEG or TIFF, if                          this argument it is not provided, imago will process                          all the image types(i.e. JPEG, TIFF)

唯一必需的參數是-i,它是imago將從中開始搜索影像文件的基目錄。此外,你還應指定至少一種類型的提取(即exif,data,gps,digest)。

示例

例1:

$ imago -i /home/solvent/cases/c23/DCIM/ -o /home/solvent/cases/c23/ -x -s -t jpeg -d all

-i path:基目錄,imago將從中搜索影像文件; -o path:imago將使用提取的元數據保存CSV文件的輸出目錄; -x:imago將提取EXIF元數據; -s:處理後不會刪除臨時SQLite資料庫; -t jpeg:imago將僅搜索jpeg影像; -d all:imago將為jpeg影像計算md5,sha256,sha512。

例2:

$ imago -i /root/Deskop/ -o /root/Desktop -x -g

特性

遞歸目錄導航 文件 mtime(UTC) 文件 ctime(UTC) 文件 atime(UTC) 文件大小(位元組) MIME 類型 Exif 支援 CSV 導出 Sqlite 導出 md5,sha256,sha512 錯誤級別分析(測試) 完整的 GPS 支援 裸露檢測(測試) 感知影像哈希 aHash pHash dHash wHash

*參考來源:GitHub