A command-line interface for searching Indicators of Compromise (IOCs) using the CyberBro API.
- Search IOCs (IPs, domains, URLs, hashes) across multiple threat intelligence sources
- Enable/disable specific analysis modules
- Configurable via
config.ini - Built with Python
uvfor fast dependency management - Bash shell installer included
- JSON formatted results
- Python 3.9 or higher
- uv package manager
- Bash shell (for the installer script)
curl -LsSf https://astral.sh/uv/install.sh | sh# Clone or download the repository
cd /path/to/cyberbrocli
# Run the installer
./install.shThe installer will:
- Create
~/.local/bindirectory (if needed) - Create
~/.config/cyberbroclidirectory - Copy
config.inito the config directory - Install Python dependencies using
uv - Create a wrapper script
cyberbrocliin~/.local/bin
If ~/.local/bin is not in your PATH, add this to your ~/.bashrc or ~/.bash_profile:
export PATH="$HOME/.local/bin:$PATH"Then reload your shell configuration:
source ~/.bashrcEdit the configuration file at ~/.config/cyberbrocli/config.ini:
[cyberbro]
# CyberBro API base URL
url = http://localhost:5000/api/
# Maximum timeout for analysis completion (in seconds)
timeout = 300
# Disable SSL certificate verification (use for self-signed certificates or testing)
# WARNING: This is insecure and should only be used in trusted environments
insecure_tls = false
# Proxy configuration (optional)
# Supports HTTP, HTTPS, SOCKS5 proxies
# Examples:
# http://proxy.example.com:8080
# socks5://localhost:1080
# socks5h://proxy.example.com:1080 (DNS resolution through proxy)
proxy =
# HTTP Basic Authentication (optional)
auth_user =
auth_pass =
# Custom User-Agent header (optional)
user_agent = "CyberBro-CLI/1.0"
# Enable colored output (can be disabled with --no-colors)
colors = true
# Enable verbose/debug output (can be enabled with -v or --verbose)
verbose = false
[modules]
# Enable or disable specific modules
abuseipdb = true
virustotal = true
shodan = true
# ... etc- url: Base URL of your CyberBro API instance
- timeout: Maximum time (in seconds) to wait for analysis completion
- insecure_tls: Set to
trueto disable SSL certificate verification (useful for self-signed certificates)- WARNING: Only use this in trusted environments as it makes connections vulnerable to MITM attacks
- proxy: Proxy server URL (optional). Supports:
- HTTP/HTTPS proxies:
http://proxy.example.com:8080 - SOCKS5 proxies:
socks5://localhost:1080 - SOCKS5 with DNS:
socks5h://proxy.example.com:1080(DNS resolution through proxy) - Note: For SOCKS proxy support, install
requests[socks]orpysocks
- HTTP/HTTPS proxies:
- auth_user / auth_pass: HTTP Basic Authentication credentials (optional)
- user_agent: Custom User-Agent header (optional, defaults to
CyberBro-CLI/1.0) - colors: Enable/disable colored terminal output (default:
true) - verbose: Enable verbose/debug output (default:
false) - modules: Enable (
true) or disable (false) individual analysis modules
# Search a single IOC
cyberbrocli 1.1.1.1
cyberbrocli example.com
cyberbrocli 929c311d58965ae456d96ca118fb7fcabf98699e02d30e0913ddf08a06e8d0c4
# Search multiple IOCs
cyberbrocli test.com example.com 1.1.1.1
# Search IOCs from a file (one per line)
cyberbrocli --file iocs.txt
cyberbrocli -f iocs.txtBy default, results are displayed as formatted ASCII tables:
- One table per module per IOC
- Colored output with syntax highlighting
- Clean, readable format without emojis
- Automatically truncates long values
cyberbrocli test.comUse --json flag for JSON format:
# Display as JSON
cyberbrocli example.com --json
# Save to JSON file
cyberbrocli example.com --output results.jsonSaves the full API response as a JSON file, perfect for:
- Further processing with tools like
jq - Integration with other scripts
- Archival purposes
cyberbrocli example.com --output results.csvExports results as a flattened CSV file with:
- All nested fields flattened with dot notation (e.g.,
virustotal.detection_ratio) - Arrays converted to JSON strings
- Suitable for spreadsheet applications or data analysis tools
# Disable colored output (for piping or logging)
cyberbrocli 1.1.1.1 --no-colors
# Output as JSON instead of ASCII tables
cyberbrocli example.com --json
# Enable verbose/debug output
cyberbrocli example.com -v
cyberbrocli example.com --verbose# Exclude specific modules
cyberbrocli 1.1.1.1 --exclude virustotal shodan
# Override API URL from config
cyberbrocli example.com --url http://cyberbro.example.com/api/
# Force fresh analysis (ignore cache)
cyberbrocli malware.exe --no-cache
# Use custom config file
cyberbrocli 1.1.1.1 --config /path/to/custom/config.ini
# Set custom timeout
cyberbrocli example.com --timeout 600
# Use HTTP proxy
cyberbrocli example.com --proxy http://proxy.company.com:8080
# Use SOCKS5 proxy
cyberbrocli example.com --proxy socks5://localhost:1080
# Use HTTP Basic Authentication
cyberbrocli example.com --auth-user admin --auth-pass secret123
# Custom User-Agent
cyberbrocli example.com --user-agent "MyCustomBot/1.0"
# Combine multiple options
cyberbrocli example.com --proxy socks5://localhost:1080 --auth-user admin --auth-pass secret --user-agent "Scanner/2.0"cyberbrocli --helpTest the installation with the test endpoint:
# Test with the demo API (as mentioned in your requirements)
cyberbrocli test.com --url http://localhost:5000/api/To use SOCKS proxies (socks5:// or socks5h://), you need to install the pysocks package:
# Install pysocks for SOCKS proxy support
uv add pysocks
# Or using pip in the virtual environment
uv run pip install pysocksOnce installed, you can use SOCKS proxies:
# SOCKS5 proxy
cyberbrocli example.com --proxy socks5://localhost:1080
# SOCKS5 with DNS resolution through proxy
cyberbrocli example.com --proxy socks5h://proxy.example.com:1080cyberbrocli/
├── cyberbrocli.py # Main Python script
├── config.ini # Default configuration
├── install.sh # Bash shell installer
├── README.md # This file
├── pyproject.toml # uv project configuration
└── uv.lock # Locked dependencies
# Activate virtual environment and run
uv run python3 cyberbrocli.py <IOC>uv add <package-name>- Submit Analysis: The tool submits your IOC to the CyberBro API with selected modules
- Poll for Completion: It polls the API every 2 seconds to check if analysis is complete
- Retrieve Results: Once complete, it fetches and displays the results in JSON format
The CyberBro API workflow:
POST /api/analyze- Submit IOC for analysis (returns analysis_id)GET /api/is_analysis_complete/{analysis_id}- Check statusGET /api/results/{analysis_id}- Get results
cyberbrocli 8.8.8.8cyberbrocli malware.com --exclude virustotal shodan urlscancyberbrocli 1.1.1.1 --url http://cyberbro.internal.company.com/api/cyberbrocli suspicious-domain.com --no-cacheMake sure ~/.local/bin is in your PATH:
echo $PATH | grep ".local/bin"- Verify the CyberBro API URL in your config.ini
- Check that CyberBro is running and accessible
- Test with curl:
curl http://localhost:5000/api/
- Increase the timeout in config.ini or use
--timeout - Some modules may take longer to complete
- Consider excluding slow modules for faster results
MIT License
Feel free to submit issues, feature requests, or pull requests!