| Crates.io | ferret-rs |
| lib.rs | ferret-rs |
| version | 0.2.0 |
| created_at | 2026-01-17 21:53:32.618312+00 |
| updated_at | 2026-01-19 15:06:10.746852+00 |
| description | A blazingly fast file finder, organizer, and pentesting tool for Linux/Unix systems with netcat-style combined flags |
| homepage | https://github.com/Karmanya03/Ferret-rs |
| repository | https://github.com/Karmanya03/Ferret-rs |
| max_upload_size | |
| id | 2051259 |
| size | 236,857 |
Yeah, it's another file finder. But this one doesn't suck.
Written in Rust because we're not savages who enjoy waiting for Python to boot up. The binary is called fr because typing is overrated and your time is valuable.
Look, we've all been there. You're trying to find that one config file from 2019, and you're staring at a find command that looks like someone had a seizure on their keyboard. Or you're using fd but still typing out long flag names like it's 1995.
Ferret does three things well:
No PhD required. Just fr find "*.whatever" and get on with your life.
File Search - Glob patterns, regex, filters for size/date/type. You know, the stuff that should be easy but never is.
Smart Organization - Automatically sorts your files by type, date, or size. Your future self will thank you.
Directory Stats - Shows you what's actually in that folder. With pretty charts because humans like pretty things.
Pentesting & Security Tools - SUID/SGID finder, writable file scanner, capabilities checker, config hunter, and more. Built for pentesters, red teamers, and blue teamers.
Combined Flags - Because if netcat can do nc -nlvp, you should be able to do fr find "*.log" -ivH. Flag combining works like you'd expect it to.
Output Options - Default view, detailed with timestamps and sizes, or JSON if you're into that sort of thing.
Pick your poison:
🚀 One-Command Install with Auto PATH Setup:
curl -fsSL https://raw.githubusercontent.com/Karmanya03/Ferret/main/install.sh | bash
The installer will ask if you want cargo install (with auto PATH setup) or system-wide install.
Or manual cargo install:
# 1. Install
cargo install ferret-rs
# 2. Add to PATH
export PATH="$HOME/.cargo/bin:$PATH"
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc
yay -S ferret-rs
# or
paru -S ferret-rs
# Add the tap (first time only)
brew tap Karmanya03/ferret
# Install
brew install ferret-rs
# Clone it
git clone https://github.com/Karmanya03/Ferret.git
cd Ferret
# Build it (grab a coffee, Rust is compiling)
cargo build --release
# Install it
sudo cp target/release/fr /usr/local/bin/
What you need:
sudo means businessThis means ~/.cargo/bin isn't in your PATH. Here's the fix:
Quick Fix:
# Run the automated installer (it handles PATH setup)
curl -fsSL https://raw.githubusercontent.com/Karmanya03/Ferret/main/install.sh | bash
Or manually:
# Check if the binary exists
ls -la ~/.cargo/bin/fr
# If it's there, add to PATH
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc # or ~/.zshrc
source ~/.bashrc
Verify it worked:
which fr # Should show: /home/username/.cargo/bin/fr
fr --version # Should show: fr 0.2.0
Already have Ferret installed? Here's how to upgrade to the latest version:
curl -fsSL https://raw.githubusercontent.com/Karmanya03/Ferret/main/install.sh | bash
Automatically detects if you have cargo/brew and upgrades to the latest version
cargo install ferret-rs --force
yay -Syu ferret-rs
# or
paru -Syu ferret-rs
brew update
brew upgrade ferret-rs
cd Ferret
git pull origin main
cargo build --release
sudo cp target/release/fr /usr/local/bin/
Need to remove Ferret from your system? Here's how:
cargo uninstall ferret-rs
yay -R ferret-rs
# or
paru -R ferret-rs
# or using pacman directly
sudo pacman -R ferret-rs
brew uninstall ferret-rs
# or
brew remove ferret-rs
# Remove the binary
sudo rm /usr/local/bin/fr
# Optional: Clean up the source directory
rm -rf ~/path/to/Ferret
If you want to completely remove all traces including cached builds:
# Remove cargo cache for ferret-rs
rm -rf ~/.cargo/registry/cache/*/ferret-rs*
rm -rf ~/.cargo/registry/src/*/ferret-rs*
# Remove build artifacts from source directory
cd ~/path/to/Ferret
cargo clean
Find Command BasicsThe bread and butter. Finding files without wanting to throw your keyboard.
Size Filters
Time Filters
Type Filters
|
Quick Command Reference
Common Find Patterns
All Find Flags
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Organize CommandStop living in chaos. Let the computer do the sorting.
Organization Methods
Organize Flags
|
Duplicate Finder CommandFind duplicate files because your Downloads folder is a disaster zone.
How It Works
Dupes Flags
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Grep CommandSearch inside files like you mean it. Fast. Parallel. Powerful.
Grep Flags
|
TUI ModeInteractive file browser. Because sometimes you just want to click around (with your keyboard).
TUI Controls
Why Use TUI?
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Config CommandCustomize file organization. Tell Ferret how YOU want things organized.
Config File Location
Example Config
Config Features
|
Stats CommandFigure out where all your disk space went.
What You Get:
Stats Flags
File Type CategoriesWhen you organize by type, here's where stuff goes:
Files with no extension? They go in |
Because theory is boring and you probably just skimmed to this part anyway.
# See what you're dealing with
cd ~/Downloads
fr stats
# Preview the organization
fr organize -n
# Actually do it
fr organize -m type
# Or organize by date if you're fancy
fr organize -m date -r
# You know it has "config" in the name
fr find "*config*" -i
# It's probably a .conf file
fr find "*.conf"
# You edited it last week
fr find "*config*" --modified-days 7
# Screw it, show me everything recent
fr find "*" -m 7 -o detailed
# Find them first
fr find "*.tmp"
# Delete them (quietly, no drama)
fr find "*.tmp" -x "rm {} 2>/dev/null"
# Or old backups
fr find "*~" -m 30 -x "rm -f {}"
# Count lines in all Python files
fr find "*.py" | xargs wc -l
# Grep for TODO comments
fr find "*.rs" | xargs grep "TODO"
# Compress old logs
fr find "*.log" -m 30 -x "gzip {}"
# Get total size (JSON + jq)
fr find "*.mp4" -o json | jq '.[].size' | awk '{sum+=$1} END {print sum}'
Ferret now includes powerful security enumeration tools designed for pentesters, red teamers, and blue teamers. All commands are short, fast, and designed for privilege escalation reconnaissance.
| Command | What It Does | Typical Usage |
|---|---|---|
fr suid |
Find SUID binaries | Privilege escalation vectors |
fr sgid |
Find SGID binaries | Group privilege escalation |
fr writable |
Find world-writable files/dirs | Writable paths for exploitation |
fr caps |
Find files with capabilities | Linux capabilities abuse |
fr configs |
Find interesting config files | Credentials, keys, passwords |
fr recent |
Find recently modified files | Detect recent system changes |
fr dn CMD |
Run command (optional output control) | Execute with optional redirection |
fr ls |
List directory contents | Like ls but with colors |
Enhanced directory listing with color-coded output:
# List current directory
fr ls
# List with all files including hidden (like ls -a)
fr ls -a
# Long format with details (like ls -l)
fr ls -l
# Long format with human-readable sizes (like ls -lh)
fr ls -lH
# List recursively (like ls -R)
fr ls -R
# Combine flags (like ls -laR)
fr ls -laR
# List specific directory
fr ls /etc
# Full featured listing
fr ls /var/log -laH
Color coding:
Flags:
-a / --all - Show hidden files-l / --long - Long format with permissions, size, date-R / --recursive - List subdirectories recursively-H / --human - Human-readable file sizes (KB, MB, GB)-e / --explain-perms - Explain permissions (e.g., owner:rw-, group:r--, other:r--)Examples with permission explanations:
# Show detailed permission explanations
fr ls -le # Long format with explanations
fr ls -lHe # Long format, human sizes, with explanations
fr ls -laHe # All files, long format, human sizes, with explanations
# Without explanations (default, cleaner output)
fr ls -lH # Just permissions symbols
Find SUID binaries (run with owner's privileges) - essential for privilege escalation:
# Find all SUID binaries (classic)
fr suid
# Search from root (comprehensive scan)
fr suid /
# Quiet mode - just the paths (for scripts)
fr suid -q
# Verbose - show permissions
fr suid -v
# Save results to file
fr suid -o suid_findings.txt
# Search specific directory
fr suid /usr/bin
Equivalent to:
find / -perm -4000 -type f 2>/dev/null
find / -perm -u=s -type f 2>/dev/null
Find SGID binaries (run with group's privileges):
# Find all SGID binaries
fr sgid
# Full system scan
fr sgid /
# Quiet mode
fr sgid -q
# With detailed permissions
fr sgid -v
# Save to file
fr sgid -o sgid_findings.txt
Equivalent to:
find / -perm -2000 -type f 2>/dev/null
find / -perm /2000 -type f 2>/dev/null
Find files and directories that anyone can modify:
# Find all world-writable files and directories
fr writable
# Only directories (for backdoor placement)
fr writable -d
# Only files
fr writable -f
# Quiet mode for scripting
fr writable -q
# Verbose with permissions
fr writable -v
# Search specific path
fr writable /var
# Save results
fr writable -o writable_paths.txt
Common use cases:
Find files with special capabilities (often overlooked privilege escalation vector):
# Find all files with capabilities
fr caps
# System-wide scan
fr caps /
# Quiet mode
fr caps -q
# Verbose output
fr caps -v
# Save to file
fr caps -o capabilities.txt
# Check specific directory
fr caps /usr/bin
Why this matters:
cap_setuid can be used to spawn root shellcap_dac_override can read/write any filecap_sys_admin can mount filesystemsFind interesting configuration files, credentials, keys, and sensitive data:
# Hunt for configs and credentials
fr configs
# Full system search
fr configs /
# Quiet mode - just paths
fr configs -q
# Verbose - show file sizes
fr configs -v
# Save findings
fr configs -o interesting_files.txt
# Search home directories
fr configs /home
# Check /etc for configs
fr configs /etc
Searches for:
Detect recently modified files (useful for finding newly created files or changes):
# Files modified in last 60 minutes (default)
fr recent
# Files modified in last 10 minutes
fr recent -t 10
# Last 24 hours (1440 minutes)
fr recent -t 1440
# Quiet mode
fr recent -q
# Verbose - show how long ago
fr recent -v
# Search from root
fr recent / -t 30
# Save to file
fr recent -o recent_changes.txt
Use cases:
Quick command executor with optional output redirection. By default, shows all output like normal - add flags to suppress output when needed:
# Run command normally (shows all output)
fr dn find / -name "*.conf"
fr dn find / -type f -perm -4000
# Hide stdout only
fr dn -s find / -name "password"
# Hide stderr only (suppress errors)
fr dn -e find / -name "*.conf"
# Hide all output (quiet mode)
fr dn -q nmap -sV 192.168.1.0/24
# Works with any command
fr dn ls -la /root
fr dn cat /etc/shadow
fr dn ping -c 4 google.com
Flags:
-s / --hide-stdout = Hide stdout, show stderr-e / --hide-stderr = Hide stderr, show stdout-q / --quiet = Hide all output (both stdout and stderr)Equivalent to:
# fr dn command (default)
command
# fr dn -s command
command 1>/dev/null
# fr dn -e command
command 2>/dev/null
# fr dn -q command
command 2>/dev/null 1>/dev/null
Why this is useful:
Quick Privilege Escalation Enumeration:
# One-liner to check common vectors
fr suid -q > suid.txt && fr sgid -q > sgid.txt && fr caps -q > caps.txt && fr writable -d -q > writable.txt
# Or more verbose for analysis
fr suid -v
fr sgid -v
fr caps -v
fr writable -v
Hunt for Credentials:
# Find interesting files
fr configs / -o all_configs.txt
# Then grep for juicy stuff
cat all_configs.txt | grep -i "password\|credential\|secret\|api"
# Or search specific locations
fr configs /home -v
fr configs /var/www -v
fr configs /opt -v
Monitor System Changes:
# Before running exploit
fr recent / -t 5 -q > before.txt
# After running exploit
fr recent / -t 5 -q > after.txt
# Compare
diff before.txt after.txt
Find Writable Paths for Persistence:
# Find writable directories
fr writable / -d -q
# Find writable directories in common locations
fr writable /etc -d
fr writable /var -d
fr writable /usr/local -d
Script Integration:
#!/bin/bash
# Quick privilege escalation enumeration script
echo "[*] Scanning for SUID binaries..."
fr suid -q > /tmp/suid_bins.txt
echo "[*] Scanning for SGID binaries..."
fr sgid -q > /tmp/sgid_bins.txt
echo "[*] Scanning for capabilities..."
fr caps -q > /tmp/caps.txt
echo "[*] Finding writable directories..."
fr writable -d -q > /tmp/writable_dirs.txt
echo "[*] Hunting for credentials..."
fr configs /home -q > /tmp/home_configs.txt
fr configs /etc -q > /tmp/etc_configs.txt
echo "[!] Results saved to /tmp/"
ls -lh /tmp/*.txt
Combine with grep for targeted searches:
fr suid -q | grep -E "nmap|vim|find|less|more|nano"
Use quiet mode in scripts:
SUID_COUNT=$(fr suid -q | wc -l)
echo "Found $SUID_COUNT SUID binaries"
Save everything to files for later analysis:
fr suid -o results/suid.txt
fr sgid -o results/sgid.txt
fr caps -o results/caps.txt
Search specific high-value directories first:
fr configs /home -v # User configs
fr configs /var/www -v # Web configs
fr configs /opt -v # Third-party apps
Use dn for cleaner enumeration:
fr dn find / -name "*.conf" > configs.txt
fr dn find / -type f -perm -4000 > suid.txt
# Files over 1GB
fr find "*" --min-size 1G -o detailed
# Large videos
fr find "*.mp4" --min-size 500M
# Show me the biggest stuff
fr stats -r
Look, find is fine if you enjoy suffering. Here's why you might want to use fr instead:
| Task | Old Way (find) | New Way (fr) |
|---|---|---|
| Find .rs files | find . -name "*.rs" |
fr find "*.rs" |
| Large files | find . -size +100M |
fr find "*" --min-size 100M |
| Recent files | find . -mtime -7 |
fr find "*" -m 7 |
| Delete temps | find . -name "*.tmp" -exec rm {} \; |
fr find "*.tmp" -x "rm {}" |
| Case-insensitive | find . -iname "*readme*" |
fr find "*readme*" -i |
Speed: Faster because Rust and parallel processing. Syntax: Simpler because it's not from 1974. Output: Actually readable without piping to 3 other commands.
fr find "test_*.rs" beats fr find "*" every timefr find "*.txt" -d 2 if you know it's shallowfr find "*.log" -q | other_command for scripting# Network drives suck, limit the damage
fr find "*.pdf" -d 2
# Permission errors everywhere? Redirect stderr
fr find "*" -p /etc 2>/dev/null
# Too many results? Add filters
fr find "*.log" --min-size 1M -m 7
# Debug build (fast compile, slow runtime)
cargo build
# Release build (slow compile, fast runtime)
cargo build --release
# Run tests
cargo test
# Run without installing
cargo run -- find "*.rs"
# Format code
cargo fmt
# Check for issues
cargo clippy
Because typing the full path is for people with too much free time.
# Bash
echo 'alias fr="/usr/local/bin/fr"' >> ~/.bashrc
source ~/.bashrc
# Zsh
echo 'alias fr="/usr/local/bin/fr"' >> ~/.zshrc
source ~/.zshrc
# Use sudo for system directories
sudo fr find "*.conf" -p /etc
# Or just ignore the errors
fr find "*" 2>/dev/null
# Check your PATH
echo $PATH
# Use full path
/usr/local/bin/fr find "*.txt"
# Or create an alias (see above)
# Limit depth
fr find "*.pdf" -d 3
# Add size filters
fr find "*" --min-size 1M
# Use quiet mode
fr find "*" -q
MIT License - Do whatever you want with it. Credit appreciated but not required. See LICENSE file if you care about the legal stuff.
Found a bug? Have an idea? Cool. Open an issue or send a PR. No strict rules, just don't be a jerk and write decent commit messages.
Maybe. Probably. No promises.
Made for Linux/Unix users who value their time and sanity.
If this saved you 5 minutes of typing find commands, consider it a win.