Home

Awesome

<div id="top" align="center"> <!-- Shields Header -->

Contributors Forks Stargazers Issues License GitHub unittest Workflow Status

<!-- Logo --> <a href="https://github.com/franckferman/MetaDetective"> <img src="https://raw.githubusercontent.com/franckferman/MetaDetective/stable/docs/github/graphical_resources/Logo-Without_background-MetaDetective.png" alt="MetaDetective Logo" width="auto" height="auto"> </a> <!-- Title & Tagline --> <h3 align="center">๐Ÿ•ต๏ธโ€โ™‚๏ธ MetaDetective</h3> <p align="center"> <em>Unleash Metadata Intelligence with MetaDetective.</em> <br> Bridging the chasm in metadata extraction and analysis. </p> <!-- Links & Demo --> <p align="center"> <a href="https://github.com/franckferman/MetaDetective/blob/stable/README.md" class="button-style"><strong>๐Ÿ“˜ Explore the full documentation</strong></a> ยท <a href="https://asciinema.org/a/55mEbe7GFVfIJ6OSfjOaDeYLv" class="button-style">๐ŸŽฅ View Demo</a> ยท <a href="https://github.com/franckferman/MetaDetective/issues">๐Ÿž Report Bug</a> ยท <a href="https://github.com/franckferman/MetaDetective/issues">๐Ÿ› ๏ธ Request Feature</a> </p>

https://github.com/franckferman/MetaDetective/assets/73023545/7b245f87-37e2-40b7-8b3c-88aefecb4e13

</div>

๐Ÿ“œ Table of Contents

<details open> <summary><strong>Click to collapse/expand</strong></summary> <ol> <li><a href="#-about">๐Ÿ“– About</a></li> <li><a href="#-installation">๐Ÿ› ๏ธ Installation</a></li> <li><a href="#-usage">๐ŸŽฎ Usage</a></li> <li><a href="#-troubleshooting">โ— Troubleshooting</a></li> <li><a href="#-contributing">๐Ÿค Contributing</a></li> <li><a href="#%EF%B8%8F-legal-disclaimer">โš–๏ธ Legal Disclaimer</a></li> <li><a href="#-star-evolution">๐ŸŒ  Star Evolution</a></li> <li><a href="#-license">๐Ÿ“œ License</a></li> <li><a href="#-contact">๐Ÿ“ž Contact</a></li> </ol> </details>

๐Ÿ“– About

MetaDetective: Advanced metadata analysis and web scraping.

Metadata, in the realm of cybersecurity, is more than just embedded information; it's a gateway to insightful perspectives, often unveiling crucial leads in OSINT and pentesting.

As key tools like Metagoofil on Kali Linux shifted their trajectory away from pure metadata analysis, the exigency for a robust alternative took center stage. Enter MetaDetective.

๐Ÿง  Tailored Metadata Analysis

Drawing inspiration from the foundational tools like Metagoofil, MetaDetective emerges as a revitalized and improved iteration, dedicated to providing efficient metadata extraction and presentation. It stands out as a comprehensive Python 3 tool, purposely designed to bridge the existing gaps in metadata analysis.

๐Ÿ“Š Streamlined Data Presentation

Beyond mere extraction, MetaDetective prides itself on its capability to meticulously categorize and showcase metadata. Whether dealing with an individual file or an array of them, the tool ensures users grasp the entire spectrum of data, both in its breadth and depth.

<p align="center"> <img src="https://raw.githubusercontent.com/franckferman/MetaDetective/stable/docs/github/graphical_resources/Screenshot-MetaDetective_Demo.png" alt="MetaDetective Demo Screenshot" width="auto" height="auto"> </p>

๐ŸŒ Web Scraping

While Metagoofil once leaned on Google searchesโ€”a method riddled with IP restrictions and the labyrinth of proxy workaroundsโ€”MetaDetective pioneers a path with direct web scraping. By targeting sites directly, it sidesteps disruptions, delivering a dataset that's not just richer, but also more precise, spotlighting potential data leaks.

<p align="center"> <img src="https://raw.githubusercontent.com/franckferman/MetaDetective/stable/docs/github/graphical_resources/Screenshot-MetaDetective_Scraping_Demo.png" alt="MetaDetective Scraping Demo Screenshot" width="auto" height="auto"> </p>

๐Ÿ” Complementary Utility for OSINT and Pentesting

Although it is now independent and offers its own functions, including scraping, MetaDetective isn't just a standalone behemoth. It's crafted for seamless integration and synergy with tools like Metagoofil. A quintessential addition to every pentester's and OSINT researcher's toolkit, MetaDetective magnifies data acquisition prowess and broadens the horizons of analysis.

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p>

๐Ÿš€ Installation

Before diving into the installation process, ensure you meet the following prerequisites.

Prerequisites

  1. Python 3: Ensure Python 3 is installed on your system before initiating the installation process.

  2. Exiftool: Given its simplicity, MetaDetective doesn't rely on any external dependencies or libraries. However, it does necessitate exiftool. Ensure you have exiftool set up on your system.

โš ๏ธ Note: MetaDetective has been rigorously tested with Python 3.11.4 on Linux alongside exiftool version 12.56. While it may function with other versions, compatibility is guaranteed only with these specific configurations.

Installation methods

  1. Git clone the repository:
git clone https://github.com/franckferman/MetaDetective.git
  1. Direct download: To skip cloning and directly download the script (designed for simplicity and flexibility, it doesn't depend on any external packages, so if you only need the script, you can also directly download it):
curl -O https://raw.githubusercontent.com/franckferman/MetaDetective/stable/src/MetaDetective/MetaDetective.py
  1. Pip Installation:
python3 -m venv MetaDetectiveEnv
source MetaDetectiveEnv/bin/activate
pip install MetaDetective
  1. Docker integration:

For a Docker-based setup, refer to our Docker-specific guide: MetaDetective Docker Setup.

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p>

๐ŸŽฎ Usage

Ensure you adapt your command according to how you've set up MetaDetective.

Getting started

Kick off with the built-in help to explore MetaDetective's functionalities:

python3 src/MetaDetective/MetaDetective.py -h

Command examples

๐Ÿ•ต๏ธ File analysis:

TaskCommand
Analyze all files in directorypython3 src/MetaDetective/MetaDetective.py -d examples/
Specific types & ignore patternspython3 src/MetaDetective/MetaDetective.py -d examples/ -i ^admin anonymous -t doc pdf
Display all results for each filepython3 src/MetaDetective/MetaDetective.py -d examples/ -t all --display all

๐Ÿ”Ž Export function:

TaskCommand
Default export (HTML)python3 src/MetaDetective/MetaDetective.py -d examples/ --export
Formatted display, txt exportpython3 src/MetaDetective/MetaDetective.py -d examples ---format formatted -e txt -o ~/

๐ŸŒ Web Scraping:

TaskCommand
Scan without downloadingpython3 src/MetaDetective/MetaDetective.py --scraping --scan --url https://example.com/
Scan without downloading PDF files onlypython3 src/MetaDetective/MetaDetective.py --scraping --scan --url https://example.com/ --extensions pdf
Download to specified directorypython3 src/MetaDetective/MetaDetective.py --scraping --download-dir ~ --url https://example.com/
Download with set depthpython3 src/MetaDetective/MetaDetective.py --scraping --depth 1 --download-dir ~ --url https://example.com/

Additional parameters

๐ŸŒ Web Scraping:

To initiate the web scraping mode, use the --scraping flag. Remember, this option doesn't function independently. It requires either a scanning or downloading parameter.

python3 src/MetaDetective/MetaDetective.py --scraping
python3 src/MetaDetective/MetaDetective.py --scraping --scan --url https://example.com
python3 src/MetaDetective/MetaDetective.py --scraping --scan --url https://example.com --extensions pdf docx xlsx pptx
python3 src/MetaDetective/MetaDetective.py --scraping --download-dir ~ --url https://example.com
python3 src/MetaDetective/MetaDetective.py --scraping --download-dir ~ --url https://example.com --extensions pdf docx xlsx pptx
python3 src/MetaDetective/MetaDetective.py --scraping --scan --url https://example.com --depth 1
Additional Flags:

๐Ÿ•ต๏ธ File analysis & Metadata Analyzer:

Basic Commands:

To begin analyzing files, you'll use either the -d or -f flag.

Analyze the contents of a directory.

python3 src/MetaDetective/MetaDetective.py -d examples

Analyze the contents of a file.

python3 src/MetaDetective/MetaDetective.py -f examples/MetaDetective.docx

Analyze the contents of multiple files.

python3 src/MetaDetective/MetaDetective.py -f examples/MetaDetective-APTX_4869_report.pdf examples/MetaDetective-Kogoro_s_Choice.pdf
Specifying data type

You can filter to analyze specific file types:

TaskCommand
Specify a data typepython3 src/MetaDetective/MetaDetective.py -d directory -t pdf
Add multiple data typespython3 src/MetaDetective/MetaDetective.py -d directory -t pdf doc
Include all typespython3 src/MetaDetective/MetaDetective.py -d directory -t all
Ignoring specific results:

If you want to omit specific keywords from the displayed metadata, use the -i or --ignore flag. For instance, you might want to exclude common usernames like "admin" during the reconnaissance phase of your pentest. Regex patterns are supported, e.g., ^BeginBy.

TaskCommand
Exclude specific resultspython3 src/MetaDetective/MetaDetective.py -d directory -i anonymous
Exclude multiple termspython3 src/MetaDetective/MetaDetective.py -d directory -i anonymous admin administrateur
Regex exclusionspython3 src/MetaDetective/MetaDetective.py -d directory -i anonymous ^admin
Display options

Adapt the display of your results to suit your preferences:

TaskCommand
Show each file's metadatapython3 src/MetaDetective/MetaDetective.py --display all
Singular results without duplicatespython3 src/MetaDetective/MetaDetective.py --display singular
Format options

Modify your display further with these:

TaskCommand
Stylish displaypython3 src/MetaDetective/MetaDetective.py --display all --format formatted
Simpler lookpython3 src/MetaDetective/MetaDetective.py --display all --format concise

๐Ÿ”Ž Export options

MetaDetective provides flexibility in exporting analysis results.

By default, using the --export or -e option will save your results in an HTML format. This design ensures a visually appealing report for your analysis.

If you prefer a .txt format, that's possible too. Switch between formats using the -e or --export flag followed by the desired format: -e txt or -e pdf.

The export will, by default, use a predefined name appended with a timestamp. To customize this name, you can append a suffix using the -c or --custom flag.

Further, the --out or -o argument lets you specify the directory path for your exported data.

Be aware: The display and format options, as previously discussed, will influence the presentation of your exported document, whether in HTML or TXT format. Data representation might differ between the two formats.

TaskDescriptionCommand
HTML Export (Default)Produces an HTML file named: MetaDetective_Export-<TIMESTAMP>.html.python3 src/MetaDetective/MetaDetective.py -d directory -e
TXT Format ExportSave results in TXT format.python3 src/MetaDetective/MetaDetective.py -d directory --export txt
Custom Filename SuffixAdd a custom suffix to the filename.python3 src/MetaDetective/MetaDetective.py -d directory -e --custom Pentest-MD_2
Specify Output DirectoryDefine the directory for data export.python3 src/MetaDetective/MetaDetective.py -d directory -e -o directory
<p align="center"> <img src="https://raw.githubusercontent.com/franckferman/MetaDetective/stable/docs/github/graphical_resources/Screenshot-MetaDetective_HTML_Export_Demo.png" alt="MetaDetective HTML Export Demo Screenshot" width="auto" height="auto"> </p>

Note: The export format can greatly affect data presentation and accessibility. Opt for the format that aligns with your requirements.

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p>

๐Ÿ”ง Troubleshooting

Encountering issues? Don't worry. If you come across any problems or have questions, please don't hesitate to submit a ticket for assistance: Submit an issue on GitHub

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p>

๐Ÿค Contributing

We truly appreciate and welcome community involvement. Your contributions, feedback, and suggestions play a crucial role in improving the project for everyone. If you're interested in contributing or have ideas for enhancements, please feel free to open an issue or submit a pull request on our GitHub repository. Every contribution, no matter how big or small, is highly valued and greatly appreciated!

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p>

โš–๏ธ Legal Disclaimer

Please be aware that the use of the MetaDetective tool may be subject to specific laws and regulations in your country or region. Before using this tool, it is your responsibility to ensure that its use is in compliance with the laws applicable in your jurisdiction.

The creator of MetaDetective cannot be held responsible for any improper or illegal use of this tool. By using MetaDetective, you acknowledge and agree that you are solely responsible for complying with local laws and regulations.

In some instances, the use of MetaDetective might be justified for legitimate purposes such as protection against authoritarian regimes or for survival matters. However, it is strongly advised to take all necessary measures to protect yourself and to abide by the law.

By using MetaDetective, you acknowledge having read this disclaimer and agree to act accordingly. The creator of MetaDetective does not in any way endorse the use of this tool for illegal or harmful purposes.

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p>

๐ŸŒ  Star Evolution

Explore the star history of this project and see how it has evolved over time:

<a href="https://star-history.com/#franckferman/MetaDetective&Timeline"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=franckferman/MetaDetective&type=Timeline&theme=dark" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=franckferman/MetaDetective&type=Timeline" /> </picture> </a>

Your support is greatly appreciated. We're grateful for every star! Your backing fuels our passion. โœจ

๐Ÿ“š License

This project is licensed under the GNU Affero General Public License, Version 3.0. For more details, please refer to the LICENSE file in the repository: Read the license on GitHub

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p>

๐Ÿ“ž Contact

ProtonMail LinkedIn Twitter

<p align="right">(<a href="#top">๐Ÿ”ผ Back to top</a>)</p> <!-- MARKDOWN LINKS & IMAGES --> <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->