An open API service indexing awesome lists of open source software.

https://github.com/yanivhaliwa/pass_finder


https://github.com/yanivhaliwa/pass_finder

ctf-tools cybersecurity linux-tools security-audit sensitive-data-discovery

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

# Passwords_Finder: Advanced File Content Search Tool

[![zread](https://img.shields.io/badge/Ask_Zread-_.svg?style=flat&color=00b0aa&labelColor=000000&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuOTYxNTYgMS42MDAxSDIuMjQxNTZDMS44ODgxIDEuNjAwMSAxLjYwMTU2IDEuODg2NjQgMS42MDE1NiAyLjI0MDFWNC45NjAxQzEuNjAxNTYgNS4zMTM1NiAxLjg4ODEgNS42MDAxIDIuMjQxNTYgNS42MDAxSDQuOTYxNTZDNS4zMTUwMiA1LjYwMDEgNS42MDE1NiA1LjMxMzU2IDUuNjAxNTYgNC45NjAxVjIuMjQwMUM1LjYwMTU2IDEuODg2NjQgNS4zMTUwMiAxLjYwMDEgNC45NjE1NiAxLjYwMDFaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00Ljk2MTU2IDEwLjM5OTlIMi4yNDE1NkMxLjg4ODEgMTAuMzk5OSAxLjYwMTU2IDEwLjY4NjQgMS42MDE1NiAxMS4wMzk5VjEzLjc1OTlDMS42MDE1NiAxNC4xMTM0IDEuODg4MSAxNC4zOTk5IDIuMjQxNTYgMTQuMzk5OUg0Ljk2MTU2QzUuMzE1MDIgMTQuMzk5OSA1LjYwMTU2IDE0LjExMzQgNS42MDE1NiAxMy43NTk5VjExLjAzOTlDNS42MDE1NiAxMC42ODY0IDUuMzE1MDIgMTAuMzk5OSA0Ljk2MTU2IDEwLjM5OTlaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik0xMy43NTg0IDEuNjAwMUgxMS4wMzg0QzEwLjY4NSAxLjYwMDEgMTAuMzk4NCAxLjg4NjY0IDEwLjM5ODQgMi4yNDAxVjQuOTYwMUMxMC4zOTg0IDUuMzEzNTYgMTAuNjg1IDUuNjAwMSAxMS4wMzg0IDUuNjAwMUgxMy43NTg0QzE0LjExMTkgNS42MDAxIDE0LjM5ODQgNS4zMTM1NiAxNC4zOTg0IDQuOTYwMVYyLjI0MDFDMTQuMzk4NCAxLjg4NjY0IDE0LjExMTkgMS42MDAxIDEzLjc1ODQgMS42MDAxWiIgZmlsbD0iI2ZmZiIvPgo8cGF0aCBkPSJNNCAxMkwxMiA0TDQgMTJaIiBmaWxsPSIjZmZmIi8%2BCjxwYXRoIGQ9Ik00IDEyTDEyIDQiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8L3N2Zz4K&logoColor=ffffff)](https://zread.ai/YanivHaliwa/pass_finder)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/YanivHaliwa/pass_finder)

PassF is a powerful and flexible Python-based utility designed for searching sensitive information within files. While it's particularly useful for cybersecurity professionals and system administrators who need to identify potential security risks in file contents, it's also an excellent tool for cybersecurity students and CTF (Capture The Flag) participants.

This versatile tool combines powerful search capabilities with customizable options, making it suitable for both professional security work and educational/competitive scenarios in cybersecurity.

## Key Use Cases

1. **Professional Security Audits**: Identify potential security risks in large codebases.
2. **CTF Challenges**: Quickly search for hidden flags or clues in CTF scenarios.
3. **Educational Tool**: Help cybersecurity students learn about information hiding and discovery techniques.
4. **System Administration**: Locate sensitive information across system files.

## Features

- **Keyword Search**: Search for specific keywords or patterns within files.
- **Configurable Search Depth**: Adjust the context around found keywords.
- **Comment Searching**: Option to specifically search within code comments.
- **Directory and File Exclusion**: Ability to exclude specific directories or files from the search.
- **Binary File Handling**: Automatically skips binary files to focus on text content.
- **Colored Output**: Uses color-coded console output for better readability.
- **JSON Configuration**: Supports loading search parameters from a JSON file.

### Installation

Clone the repository using the following command:

```bash
git clone https://github.com/YanivHaliwa/pass_finder.git
cd pass_finder
```

## Usage
```
passf [options]
```

### Options

- `-g`, `--grep-length`: Set the context length around found keywords (default: 5).
- `-c`, `--comments`: Enable searching within comments.
- `-t`, `--tags`: Specify custom keywords (comma-separated).
- `-e`, `--exclude`: Specify directories or files to exclude (comma-separated).
- `-j`, `--json-file`: Use a JSON file for search configuration.

### Example JSON Configuration (ex.json)

```json
{
"include": ["password", "api_key", "secret"],
"exclude_dirs": [".git", "node_modules"],
"exclude_files": ["*.log", "*.tmp"]
}
```

## Additional Utility: susfiles

The `susfiles` script is included in this folder to help you quickly identify files on your machine that may be considered suspicious or potentially sensitive. This tool is useful for:

- Locating files with names or extensions commonly associated with credentials, secrets, or other sensitive data
- Quickly auditing a system for files that may require further investigation

**Usage:**

```bash
./susfiles
```

This script is designed to complement the main password/content search tool by providing a fast way to surface files that warrant closer inspection.

## Author

Created by [Yaniv Haliwa](https://github.com/YanivHaliwa) for security testing and educational purposes.