Skip to content

BashDirBlaster: A stealthy Bash scanner for Linux file systems. Hunt files, filter by type, and log in JSON/CSV. Explore with precision—authorized missions only!

License

Notifications You must be signed in to change notification settings

PicoBaz/BashDirBlaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

    ▄▄▄▄    ▄▄▄        ██████  ██░ ██ ▓█████▄  ██▓ ██▀███  
    ▓█████▄ ▒████▄    ▒██    ▒ ▓██░ ██▒▒██▀ ██▌▓██▒▓██ ▒ ██▒
    ▒██▒ ▄██▒██  ▀█▄  ░ ▓██▄   ▒██▀▀██░░██   █▌▒██▒▓██ ░▄█ ▒
    ▒██░█▀  ░██▄▄▄▄██   ▒   ██▒░▓█ ░██ ░▓█▄   ▌░██░▒██▀▀█▄  
    ░▓█  ▀█▓ ▓█   ▓██▒▒██████▒▒░▓█▒░██▓░▒████▓ ░██░░██▓ ▒██▒
    ░▒▓███▀▒ ▒▒   ▓▒█░▒ ▒▓▒ ▒ ░ ▒ ░░▒░▒ ▒▒▓  ▒ ░▓  ░ ▒▓ ░▒▓░
    ▒░▒   ░   ▒   ▒▒ ░░ ░▒  ░ ░ ▒ ░▒░ ░ ░ ▒  ▒  ▒ ░  ░▒ ░ ▒░
     ░    ░   ░   ▒   ░  ░  ░   ░  ░░ ░ ░ ░  ░  ▒ ░  ░░   ░ 
     ░            ░  ░      ░   ░  ░  ░   ░     ░     ░     
          ░                            ░                     
    ██████ ▓██   ██▓  ██████ ▄▄▄█████▓▓█████  ███▄ ▄███▓    
  ▒██    ▒  ▒██  ██▒▒██    ▒ ▓  ██▒ ▓▒▓█   ▀ ▓██▒▀█▀ ██▒    
  ░ ▓██▄     ▒██ ██░░ ▓██▄   ▒ ▓██░ ▒░▒███   ▓██    ▓██░    
    ▒   ██▒  ░ ▐██▓░  ▒   ██▒░ ▓██▓ ░ ▒▓█  ▄ ▒██    ▒██     
  ▒██████▒▒  ░ ██▒▓░▒██████▒▒  ▒██▒ ░ ░▒████▒▒██▒   ░██▒    
  ▒ ▒▓▒ ▒ ░   ██▒▒▒ ▒ ▒▓▒ ▒ ░  ▒ ░░   ░░ ▒░ ░░ ▒░   ░  ░    
  ░ ░▒  ░ ░ ▓██ ░▒░ ░ ░▒  ░ ░    ░     ░ ░  ░░  ░      ░    
  ░  ░  ░   ▒ ▒ ░░  ░  ░  ░    ░         ░   ░      ░       
  ░██████╗ ██████╗ █████╗ ███╗   ██╗███╗   ██╗███████╗██████╗ 
  ██╔════╝██╔════╝██╔══██╗████╗  ██║████╗  ██║██╔════╝██╔══██╗
  ╚█████╗ ██║     ███████║██╔██╗ ██║██╔██╗ ██║█████╗  ██████╔╝
   ╚═══██╗██║     ██╔══██║██║╚██╗██║██║╚██╗██║██╔══╝  ██╔══██╗
  ██████╔╝╚██████╗██║  ██║██║ ╚████║██║ ╚████║███████╗██║  ██║
  ╚═════╝  ╚═════╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝  ╚═══╝╚══════╝╚═╝  ╚═╝

@@                    FILESYSTEM INFILTRATION FRAMEWORK                    @@
@@                     [ RECONNAISSANCE • ENUMERATION ]                     @@
@@                    FOR AUTHORIZED OPERATORS ONLY                        @@

🎯 [ OPERATION OVERVIEW ]

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                                                        ┃
┃  CODENAME     : BashDirBlaster                                        ┃
┃  DESIGNATION  : Filesystem Intelligence Gathering Tool                ┃
┃  PLATFORM     : Linux-Based Systems                                   ┃
┃  LANGUAGE     : Bash Scripting                                        ┃
┃  CLEARANCE    : TOP SECRET // SI // NOFORN                           ┃
┃                                                                        ┃
┃  MISSION      : Deep reconnaissance of target filesystem structures   ┃
┃                 Advanced file enumeration and metadata extraction     ┃
┃                 Stealth-mode directory traversal operations           ┃
┃                                                                        ┃
┃  DEPLOYED BY  : [ PicoBaz ] - Cyber Operations Unit                  ┃
┃  LAST UPDATE  : [ 2025-01-15 ] - Enhanced Stealth Modules            ┃
┃                                                                        ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

🔴 [ THREAT CAPABILITIES ]

🎭 STEALTH OPERATIONS

┌─[ INFILTRATION MODES ]
│
├─► Deep Directory Traversal
├─► Extension-Based Targeting  
├─► Size & Age Filtering
├─► Content Pattern Matching
├─► Stealth Logging (JSON/CSV)
└─► Zero-Trace Cleanup

⚡ TACTICAL MODULES

┌─[ OPERATIONAL MODULES ]
│
├─► [01] Recursive Scanner
├─► [02] Advanced Filters
├─► [03] Content Hunter
├─► [04] Data Exfiltration
├─► [05] Trace Remover
└─► [06] Real-Time Monitor ⚠️ NEW

🛠️ [ DEPLOYMENT PROTOCOL ]

Phase 1: Installation

# CLONE REPOSITORY
git clone https://github.com/PicoBaz/BashDirBlaster.git

# ENTER OPERATIONS DIRECTORY
cd BashDirBlaster

# VERIFY INTEGRITY
chmod +x dir_scanner.sh

# INSTALL DEPENDENCIES
sudo apt-get install jq      # JSON processor
sudo apt-get install inotify-tools  # For real-time monitoring

Phase 2: Configuration

# EDIT MISSION PARAMETERS
nano config.json
{
  "directory": "/target/path",
  "extensions": [".sh", ".conf", ".key"],
  "maxDepth": 10,
  "retryCount": 5,
  "retryDelayMs": 2000,
  "stealthMode": true,
  "realTimeMonitor": false
}

Phase 3: Execution

# LAUNCH OPERATION
./dir_scanner.sh

# INTERACTIVE MODE
./dir_scanner.sh --interactive

# STEALTH MODE (NO LOGS)
./dir_scanner.sh --stealth

# REAL-TIME MONITORING (NEW)
./dir_scanner.sh --monitor

💻 [ TACTICAL MODULES ]

🎯 Module 01: Recursive Scanner

# Syntax
./dir_scanner.sh --scan --path /target --depth 15

# Features
├─ Multi-threaded traversal
├─ Depth control mechanisms
├─ Automatic retry on access denial
└─ Progress reporting

🔍 Module 02: Advanced Filters

# Filter by size
./dir_scanner.sh --size-min 1M --size-max 10M

# Filter by modification time
./dir_scanner.sh --modified-after "2024-01-01"

# Combine filters
./dir_scanner.sh --ext ".log" --size-max 5M --age 7d

🕵️ Module 03: Content Hunter

# Search file contents
./dir_scanner.sh --grep "password|secret|api_key"

# Regex patterns
./dir_scanner.sh --pattern "[0-9]{3}-[0-9]{2}-[0-9]{4}"

# Case-insensitive search
./dir_scanner.sh --grep-i "admin"

📦 Module 04: Data Exfiltration

# Export formats
--output-json results.json
--output-csv results.csv
--output-xml results.xml  # NEW

# Encrypted export
./dir_scanner.sh --encrypt --key "your-key-here"

🧹 Module 05: Trace Remover

# Auto-cleanup after scan
./dir_scanner.sh --cleanup

# Secure deletion
./dir_scanner.sh --secure-delete

# Remove log traces
./dir_scanner.sh --no-trace

🔴 Module 06: Real-Time Monitor ⚠️ NEW

# Monitor directory for changes
./dir_scanner.sh --monitor --path /target

# Alert on new files
./dir_scanner.sh --monitor --alert-on-create

# Track modifications
./dir_scanner.sh --monitor --alert-on-modify

# Watch specific extensions
./dir_scanner.sh --monitor --ext ".conf,.key,.pem"

🎮 [ COMMAND CENTER ]

╔════════════════════════════════════════════════════════════════╗
║                  BASHDIRBLASTER CONTROL PANEL                  ║
╠════════════════════════════════════════════════════════════════╣
║                                                                ║
║  [1] → Launch Full Scan                                       ║
║  [2] → Quick Reconnaissance                                   ║
║  [3] → Advanced Filtering                                     ║
║  [4] → Content Search                                         ║
║  [5] → Real-Time Monitor    ⚠️ NEW                           ║
║  [6] → Export Intelligence                                    ║
║  [7] → Clean Operations                                       ║
║  [8] → System Diagnostics                                     ║
║                                                                ║
║  [0] → ABORT MISSION                                          ║
║                                                                ║
╚════════════════════════════════════════════════════════════════╝

[OPERATOR] → _

📊 [ INTELLIGENCE OUTPUT ]

JSON Format

{
  "operation_id": "OP-20250115-2247",
  "timestamp": "2025-01-15T22:47:33Z",
  "target": "/var/www/html",
  "scan_depth": 10,
  "total_files": 1337,
  "total_dirs": 42,
  "findings": [
    {
      "path": "/var/www/html/config/.env",
      "type": "file",
      "size": 2048,
      "permissions": "-rw-r--r--",
      "owner": "www-data",
      "modified": "2025-01-10T14:23:11Z",
      "risk_level": "HIGH",
      "contains_sensitive": true
    }
  ],
  "alerts": [
    "⚠️ Found 3 files with sensitive patterns",
    "⚠️ Detected 1 world-writable directory"
  ]
}

CSV Format

Timestamp,Path,Type,Size,Permissions,Owner,Modified,Risk,Notes
2025-01-15T22:47:33Z,/var/www/html/config/.env,file,2048,-rw-r--r--,www-data,2025-01-10T14:23:11Z,HIGH,"Contains API keys"

🎯 [ NEW FEATURE: REAL-TIME MONITORING ]

┌─────────────────────────────────────────────────────────────┐
│  🔴 LIVE FILESYSTEM SURVEILLANCE ACTIVE                     │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  [22:47:15] 📁 NEW FILE DETECTED                           │
│  → /var/www/uploads/shell.php                              │
│  → Size: 4096 bytes                                        │
│  → Risk: CRITICAL                                          │
│                                                             │
│  [22:47:18] ✏️  FILE MODIFIED                              │
│  → /etc/passwd                                             │
│  → Changes: 3 lines added                                  │
│  → Alert: Unauthorized modification detected               │
│                                                             │
│  [22:47:22] 🗑️  FILE DELETED                               │
│  → /var/log/auth.log                                       │
│  → Alert: Critical log file removed                        │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Implementation Script

#!/bin/bash
# monitor.sh - Real-time filesystem monitor

WATCH_DIR="${1:-/target}"
ALERT_FILE="alerts.log"

# Setup inotify watch
inotifywait -m -r -e create,modify,delete,move \
    --format '%T %e %w%f' \
    --timefmt '%Y-%m-%d %H:%M:%S' \
    "$WATCH_DIR" | while read timestamp event file
do
    RISK="LOW"
    
    # Risk assessment
    if [[ "$file" =~ \.(sh|php|py|exe)$ ]]; then
        RISK="HIGH"
    elif [[ "$file" =~ \.(conf|key|pem|env)$ ]]; then
        RISK="CRITICAL"
    fi
    
    # Log alert
    echo "[$timestamp] [$RISK] $event: $file" | tee -a "$ALERT_FILE"
    
    # Send notification
    if [[ "$RISK" == "CRITICAL" ]]; then
        notify-send "⚠️ CRITICAL ALERT" "File activity: $file"
    fi
    
    # Auto-scan new files
    if [[ "$event" == "CREATE" ]]; then
        file "$file" | grep -i "script\|executable" && \
            echo "⚠️ Executable detected: $file"
    fi
done

🔐 [ OPERATIONAL SECURITY ]

╔════════════════════════════════════════════════════════════════╗
║                     ⚠️  SECURITY NOTICE  ⚠️                    ║
╠════════════════════════════════════════════════════════════════╣
║                                                                ║
║  THIS TOOL IS DESIGNED FOR AUTHORIZED SECURITY OPERATIONS     ║
║                                                                ║
║  ✓ Penetration Testing (With Written Authorization)           ║
║  ✓ Security Auditing (Internal Use Only)                      ║
║  ✓ Compliance Scanning (Authorized Personnel)                 ║
║  ✓ Incident Response (Emergency Authorization)                ║
║                                                                ║
║  ✗ Unauthorized Access to Computer Systems                    ║
║  ✗ Data Theft or Corporate Espionage                          ║
║  ✗ Malicious Reconnaissance Activities                        ║
║                                                                ║
║  VIOLATION OF THESE TERMS MAY RESULT IN:                      ║
║  • Criminal Prosecution                                       ║
║  • Civil Liability                                            ║
║  • Permanent System Bans                                      ║
║                                                                ║
║  OPERATOR ASSUMES FULL RESPONSIBILITY FOR ALL ACTIONS         ║
║                                                                ║
╚════════════════════════════════════════════════════════════════╝

📚 [ ADVANCED OPERATIONS ]

Chaining Operations

# Full intelligence pipeline
./dir_scanner.sh --scan /target \
  | ./analyzer.sh --risk-assessment \
  | ./reporter.sh --format pdf \
  | ./encrypt.sh --output intel.pdf.gpg

Automation Scripts

# Cron job for periodic scans
0 */6 * * * /opt/BashDirBlaster/dir_scanner.sh --auto >> /var/log/scanner.log 2>&1

# Triggered scan on SSH login
echo '/opt/BashDirBlaster/dir_scanner.sh --quick' >> ~/.bashrc

Integration with Other Tools

# Export to Metasploit
./dir_scanner.sh --output msf_targets.txt --format metasploit

# Feed to Nmap
./dir_scanner.sh --list-ips | nmap -iL -

# Parse with Python
python3 analyze.py $(./dir_scanner.sh --json)

🎓 [ OPERATOR TRAINING ]

💡 Scenario 1: Web Application Audit
# Mission: Locate all PHP files with potential vulnerabilities
./dir_scanner.sh \
  --path /var/www \
  --ext ".php" \
  --grep "eval|exec|system|passthru" \
  --output webapp_audit.json

# Expected Output:
# - List of files with dangerous functions
# - File permissions and ownership
# - Last modification timestamps
💡 Scenario 2: Configuration File Enumeration
# Mission: Find all configuration files with credentials
./dir_scanner.sh \
  --path /etc \
  --ext ".conf,.ini,.cfg,.env" \
  --grep "password|secret|api_key|token" \
  --output config_intel.csv

# Expected Output:
# - Configuration files containing sensitive data
# - Risk assessment for each finding
# - Recommendations for securing files
💡 Scenario 3: Incident Response
# Mission: Detect recently modified system files
./dir_scanner.sh \
  --path /bin,/sbin,/usr/bin \
  --modified-after "$(date -d '24 hours ago' '+%Y-%m-%d')" \
  --output incident_response.json \
  --monitor

# Expected Output:
# - List of recently changed binaries
# - Real-time alerts for new changes
# - Hash verification against known-good values

🔧 [ TROUBLESHOOTING ]

# Debug mode
./dir_scanner.sh --debug --verbose

# Check permissions
./dir_scanner.sh --check-access /target

# Test configuration
./dir_scanner.sh --test-config

# Verify dependencies
./dir_scanner.sh --check-deps

# Performance profiling
./dir_scanner.sh --profile

📈 [ PERFORMANCE METRICS ]

💾 TARGET SIZE 📁 FILES ⚡ SCAN TIME 🔥 CPU 💿 MEMORY
Small (< 10K) 5,000 2.3s 15% 45MB
Medium (10K-100K) 50,000 18s 35% 180MB
Large (100K-1M) 500,000 2m 45s 55% 750MB
XLarge (1M+) 2,000,000 11m 30s 85% 2.1GB

Tested on: Intel i7, NVMe SSD, 16GB RAM


🤝 [ INTELLIGENCE SHARING ]

# Contribute to the project
git clone https://github.com/PicoBaz/BashDirBlaster.git
git checkout -b feature/new-module
git commit -am "Add: New reconnaissance module"
git push origin feature/new-module

# Submit intelligence reports
# → Open issue at github.com/PicoBaz/BashDirBlaster/issues

📡 [ COMMUNICATION CHANNELS ]

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃              SECURE COMMUNICATION CHANNELS              ┃
┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫
┃                                                         ┃
┃  📧 Email      : picobaz3@gmail.com                    ┃
┃  💬 Telegram   : t.me/picobaz                          ┃
┃  🌐 Website    : picobaz.site                          ┃
┃  🐙 GitHub     : github.com/PicoBaz                    ┃
┃                                                         ┃
┃  PGP KEY       : [Request via secure channel]          ┃
┃  SIGNAL        : [Contact via Telegram first]          ┃
┃                                                         ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

📜 [ MISSION LICENSE ]

┌────────────────────────────────────────────────────────────┐
│  MIT LICENSE                                               │
│  Copyright (c) 2025 PicoBaz                               │
│                                                            │
│  Permission granted for authorized security operations    │
│  Unauthorized use is strictly prohibited                  │
│  Operator assumes full legal responsibility               │
└────────────────────────────────────────────────────────────┘

🎖️ [ HALL OF OPERATORS ]

╔═══════════════════════════════════════════════════════════╗
║              DISTINGUISHED CONTRIBUTORS                   ║
╠═══════════════════════════════════════════════════════════╣
║                                                           ║
║  🥇 PicoBaz        - Project Lead & Chief Architect       ║
║  🥈 [Your Name]    - New Module Contributor               ║
║  🥉 [Your Name]    - Security Researcher                  ║
║                                                           ║
║  Want your name here? Contribute and earn your badge!    ║
║                                                           ║
╚═══════════════════════════════════════════════════════════╝

⚡ [ QUICK REFERENCE ]

# Essential commands
./dir_scanner.sh --help          # Show all options
./dir_scanner.sh --quick         # Fast scan
./dir_scanner.sh --deep          # Deep recursive scan
./dir_scanner.sh --stealth       # No logs, no traces
./dir_scanner.sh --monitor       # Real-time surveillance
./dir_scanner.sh --export json   # Export results
./dir_scanner.sh --cleanup       # Remove traces

╔════════════════════════════════════════════════════════════════╗
║                                                                ║
║  "The quieter you become, the more you are able to hear."    ║
║                                                                ║
║                        - Ancient Proverb                       ║
║                                                                ║
╚════════════════════════════════════════════════════════════════╝

[ OPERATION COMMANDER: PicoBaz ]

[MISSION STATUS: ACTIVE]
[THREAT LEVEL: UNDEFINED]
[CLEARANCE: GRANTED]

⬆ RETURN TO COMMAND CENTER

About

BashDirBlaster: A stealthy Bash scanner for Linux file systems. Hunt files, filter by type, and log in JSON/CSV. Explore with precision—authorized missions only!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages