Skip to content

SaiBhargavYenisetti/LeakHunter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeakHunter - Sensitive Data Scanner

📌 Overview

LeakHunter is a Python-based tool designed to scan files and directories for sensitive data leaks using regular expressions and YARA rules. It also supports VirusTotal integration for malware detection.

🚀 Features

  • Regex-based scanning for API keys, passwords, emails, and credit card numbers.
  • YARA rule scanning for detecting sensitive data patterns.
  • VirusTotal API support to check files against known malware signatures.
  • Directory and file scanning with customizable rule sets.
  • Color-coded output for easy readability.

📂 Project Structure

LeakHunter/
│── main.py                # Main script
│── rules/                 # YARA rule files
│   └── sensitive_data.yar
│── leakhunter/            # Core package
│   │── __init__.py        # Package initializer
│   │── scanner.py         # Regex-based scanner
│   │── yara_scanner.py    # YARA-based scanner
│   │── virustotal.py      # VirusTotal API integration
│   │── utils.py           # Helper functions
│── tests/                 # Unit tests
│   └── test_scanner.py    
│── requirements.txt       # Dependencies
│── README.md              # Documentation

🔧 Installation

1️⃣ Clone the Repository

git clone https://github.com/SaiBhargavYenisetti/LeakHunter.git
cd LeakHunter

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Set Up VirusTotal API Key (Optional)

If using VirusTotal, add your API key to an environment variable:

export VIRUSTOTAL_API_KEY='your_api_key_here'

🔍 Usage

Scan a Single File

python main.py --path /path/to/file.txt

Scan a Directory

python main.py --path /path/to/directory/

Scan with YARA Rules

python main.py --path /path/to/directory --yara rules/sensitive_data.yar

Scan with VirusTotal

python main.py --path /path/to/file --virustotal

⚙️ Configuration

Modify rules/sensitive_data.yar to add custom YARA rules.


🛠️ Troubleshooting

ModuleNotFoundError: No module named 'yara_scanner'

  • Ensure yara_scanner.py is inside leakhunter/.
  • Run the script as a module:
    python -m leakhunter.main --path /path/to/scan

📜 License

This project is licensed under the MIT License.


🤝 Contributing

Pull requests are welcome! If you'd like to contribute, please fork the repository and submit a PR.


📧 Contact

For support or questions, reach out to bhargavy08948@gmail.com.


✅ Happy Scanning! 🚀

About

Developed a Python-based sensitive data leak detection tool that identifies exposed credentials, API keys, and secrets using Regex, YARA rules, and VirusTotal API integration.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages