
組織からドキュメントのメタデータをダウンロードして抽出するユーティリティ。この手法は、ドメイン、ユーザー名、ソフトウェア/バージョン番号、命名規則を特定するために使用できます。
PyMetaは、PowerShellでdafthackによって作成されたツールPowerMetaのPython3によるリライトです。特別に作成された検索クエリを使用して、GoogleとBingのスクレイピングにより、指定されたドメインから以下のファイルタイプ(pdf、xls、xlsx、csv、doc、docx、ppt、pptx)を識別してダウンロードします。
ダウンロード後、Phil Harvey氏のexiftoolを使用してこれらのファイルからメタデータが抽出され、.csvレポートに追加されます。また、Pymetaは、-dirコマンドライン引数を使用して手動でダウンロードしたファイルからメタデータを抽出するためにディレクトリを指定することもできます。詳細については、UsageまたはAll Optionsのセクションを参照してください。
メタデータは、ペネトレーションテスターやレッドチームメンバーがドメイン、ユーザーアカウント、命名規則、ソフトウェア/バージョン番号などを発見するための一般的な場所です。
Exiftoolが必要であり、以下のコマンドでインストールできます:
Ubuntu/Kali - apt-get install exiftool -y
Mac OS - brew install exiftool
PyPiから最新の安定版リリースをインストール:
pip3 install pymetasec
または、GitHubから最新のコードをインストール:
git clone https://github.com/m8sec/pymeta
cd pymeta
python3 setup.py install
GoogleとBingでexample.com内のファイルを検索し、メタデータをcsvレポートに抽出:
pymeta -d example.com
指定されたディレクトリ内のファイルからメタデータを抽出し、csvレポートを作成:
pymeta -dir Downloads/
options:
-h, --help show this help message and exit
-T MAX_THREADS Max threads for file download (Default=5)
-t TIMEOUT Max timeout per search (Default=8)
-j JITTER Jitter between requests (Default=1)
Search Options:
-s ENGINE, --search ENGINE Search Engine (Default='google,bing')
--file-type FILE_TYPE File types to search (default=pdf,xls,xlsx,csv,doc,docx,ppt,pptx)
-m MAX_RESULTS Max results per type search
Proxy Options:
--proxy PROXY Proxy requests (IP:Port)
--proxy-file PROXY Load proxies from file for rotation
Output Options:
-o DWNLD_DIR Path to create downloads directory (Default: ./)
-f REPORT_FILE Custom report name ("pymeta_report.csv")
Target Options:
-d DOMAIN Target domain
-dir FILE_DIR Pre-existing directory of file