AutoAR is a comprehensive, modular security automation toolkit designed for bug bounty hunters, penetration testers, and security researchers. It provides three operational modes: Discord bot, REST API, or both simultaneously, all powered by a robust bash-based CLI backend for automated reconnaissance, vulnerability scanning, and attack surface analysis.
- Subdomain Enumeration: Multiple engines (Subfinder, Amass, Assetfinder, etc.)
- Live Host Detection: Fast HTTP/HTTPS validation with custom timeouts
- CNAME Analysis: CNAME record extraction and analysis
- URL Collection: Comprehensive URL gathering from multiple sources
- Technology Detection: Web technology stack identification
- DNS Takeover Detection: Comprehensive DNS takeover vulnerability scanning
- Nuclei Integration: 1000+ vulnerability templates with custom rate limiting
- WordPress Plugin Confusion: Automated WP plugin/theme confusion attack detection
- Dependency Confusion: GitHub repository dependency confusion scanning
- S3 Bucket Enumeration: AWS S3 bucket discovery and analysis
- SQL Injection Testing: SQLMap integration for automated SQLi testing
- XSS Detection: Dalfox integration for cross-site scripting detection
- Backup File Discovery: Automated backup file and sensitive file discovery
- JavaScript Analysis: JS file collection and secret extraction
- JavaScript Monitoring: Continuous monitoring of JavaScript files for changes
- GitHub Reconnaissance: Organization and repository scanning with secrets detection
- GitHub Wordlist Generation: Automated wordlist creation from organization files
- Port Scanning: Nmap integration for port discovery
- Reflection Testing: HTTP parameter reflection analysis
- Gf Pattern Matching: Custom pattern matching for various vulnerabilities
- Target Monitoring: Database-backed continuous monitoring of web targets
- JavaScript Monitoring: Track changes in JavaScript files and detect new secrets
- Multi-Strategy Detection: Support for hash, size, headers, and regex-based change detection
- Update Notifications: Real-time Discord webhooks for detected changes
- Persistent State Management: Database storage for monitored targets and events
- Flexible Intervals: Configurable monitoring intervals per target
- Daemon Mode: Background monitoring with automated restarts
- Discord Bot Mode: Interactive bot with slash commands and real-time notifications
- REST API Mode: Full-featured API with Swagger/OpenAPI documentation
- Hybrid Mode: Run both Discord bot and API server simultaneously
- Real-time Notifications: Live scan progress and results (Discord)
- File Sharing: Automatic result file uploads
- API Documentation: Interactive API docs at
/docsendpoint - Async Scanning: Background scan execution with status tracking
- Progress Tracking: Real-time scan status updates across both interfaces
- PostgreSQL Integration: Full database support for results storage
- SQLite Fallback: Lightweight database option
- Data Export: Easy data export and analysis
- Result Management: Organized result storage and retrieval
- Configurable Threading: All scanning tools support custom thread counts (default: 100)
- Parallel Processing: Optimized for multi-core systems with concurrent operations
- Resource Management: Intelligent thread allocation based on tool capabilities
- Performance Tuning: Easy adjustment of thread counts via Discord commands or CLI flags
Supported Tools with Threading:
- Subdomain Enumeration: Subfinder with configurable thread pools
- Live Host Detection: Httpx with parallel HTTP probing
- Vulnerability Scanning: Nuclei with concurrent template execution
- Port Scanning: Naabu with high-speed parallel port discovery
- XSS Detection: Dalfox with concurrent payload testing
- SQL Injection Testing: SQLMap with Interlace for parallel testing
- Technology Detection: Httpx with parallel technology fingerprinting
- URL Collection: Urlfinder and JSFinder with concurrent crawling
- Backup File Discovery: Fuzzuli with parallel backup file enumeration
- Clone the repository:
git clone https://github.com/yourusername/AutoAR.git
cd AutoAR- Set up environment variables:
cp env.example .env
# Edit .env with your configuration- Required Environment Variables:
DISCORD_BOT_TOKEN=your_discord_bot_token
DISCORD_WEBHOOK=your_discord_webhook_url- Optional API Keys (for enhanced functionality):
SECURITYTRAILS_API_KEY=your_key
SHODAN_API_KEY=your_key
VIRUSTOTAL_API_KEY=your_key
GITHUB_TOKEN=your_token
# ... and many more (see docker-compose.yml for full list)- Build and run:
docker compose build
docker compose up -d- Verify installation:
docker logs autoar-bot- Install dependencies:
# Python dependencies
pip install -r requirements.txt
# System dependencies (Ubuntu/Debian)
sudo apt update
sudo apt install -y subfinder amass assetfinder httpx nuclei nmap sqlmap dalfox ffuf gobuster dirb dirbuster wafw00f whatweb wpscan nikto masscan naabu naabu-probe httpx-probe
# Additional tools
go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest- Configure the system:
chmod +x *.sh modules/*.sh
cp env.example .env
# Edit .env with your configuration- Run the Discord bot:
python discord_bot.pyAutoAR supports three operational modes to fit your workflow:
# Using Docker Compose
docker-compose up autoar-discord
# Without Docker
export AUTOAR_MODE=discord
export DISCORD_BOT_TOKEN=your_token_here
python discord_bot.py# Using Docker Compose
docker-compose --profile api up autoar-api
# Without Docker
export AUTOAR_MODE=api
export API_HOST=0.0.0.0
export API_PORT=8000
python api_server.pyAccess API documentation at: http://localhost:8000/docs
# Using Docker Compose
docker-compose --profile full up autoar-full
# Without Docker
export AUTOAR_MODE=both
export DISCORD_BOT_TOKEN=your_token_here
export API_HOST=0.0.0.0
export API_PORT=8000
python launcher.pyπ For detailed API documentation, see API_README.md and API_QUICKSTART.md
Once the bot is running, use these slash commands in Discord:
/subdomains domain:example.com [threads:100]- Enumerate subdomains/livehosts domain:example.com [threads:100]- Find live hosts/cnames domain:example.com- Extract CNAME records/urls domain:example.com [threads:100]- Collect URLs/tech domain:example.com [threads:100]- Detect technologies
/nuclei domain:example.com [threads:100]- Run Nuclei scans/wpdepconf domain:example.com- WordPress plugin confusion/dalfox domain:example.com [threads:100]- XSS detection/sqlmap domain:example.com [threads:100]- SQL injection testing/backup_scan domain:example.com [threads:100] [full:false]- Backup file discovery
/js domain:example.com- JavaScript analysis/github scan repo:owner/repo- GitHub repository secrets scanning/github org:company- GitHub organization reconnaissance/github-wordlist org:company- Generate wordlists from GitHub org/s3 bucket:example-bucket- S3 bucket scanning/dns domain:example.com- DNS takeover detection/ports domain:example.com [threads:100]- Port scanning
/github scan repo:microsoft/PowerShell- Scan specific repository for secrets/github org:microsoft- Scan entire organization (50 repos max)/github-wordlist org:microsoft- Generate wordlists from organization files
/lite domain:example.com- Light reconnaissance/fastlook domain:example.com- Quick scan/domain domain:example.com- Full domain analysis
- New simplified commands (database-backed):
/monitor_updates_add url:<URL> [strategy:hash|size|headers|regex] [pattern:<regex>]/monitor_updates_remove url:<URL>/monitor_updates_start [interval:900](starts monitors for all targets from DB)/monitor_updates_stop/monitor_updates_list
Access the container and use the CLI directly:
# Enter the container
docker exec -it autoar-bot bash
# Basic reconnaissance (with threading)
/app/main.sh subdomains get -d example.com -t 100
/app/main.sh livehosts get -d example.com -t 100
/app/main.sh cnames get -d example.com
/app/main.sh urls collect -d example.com -t 100
/app/main.sh tech detect -d example.com -t 100
# Vulnerability scanning (with threading)
/app/main.sh nuclei run -d example.com -t 100
/app/main.sh dalfox run -d example.com -t 100
/app/main.sh sqlmap run -d example.com -t 100
/app/main.sh ports scan -d example.com -t 100
/app/main.sh backup scan -d example.com -t 100 --full
/app/main.sh wpDepConf scan -d example.com
# Specialized scans
/app/main.sh js scan -d example.com
/app/main.sh github scan -r owner/repo
/app/main.sh github org -o company -m 50
/app/main.sh github-wordlist scan -o company
/app/main.sh s3 scan -b bucket-name
/app/main.sh dns takeover -d example.com
# Workflows
/app/main.sh lite run -d example.com
/app/main.sh fastlook run -d example.com
/app/main.sh domain run -d example.com
# Updates Monitoring (CLI)
## Database-backed workflow
# Add/remove target
/app/main.sh monitor updates add -u https://example.com --strategy hash
/app/main.sh monitor updates add -u https://site/blog --strategy regex --pattern '([A-Z][a-z]{2,8} [0-9]{1,2}, [0-9]{4}|[0-9]{4}-[0-9]{2}-[0-9]{2})'
/app/main.sh monitor updates remove -u https://example.com
# Start/stop monitors for all DB targets
/app/main.sh monitor updates start --all --interval 900 --daemon
/app/main.sh monitor updates list
/app/main.sh monitor updates stop --all
Notes:
- Targets are stored in PostgreSQL (`updates_targets`), and detected changes are recorded in (`updates_events`).
- The monitor maintains per-target state under `$AUTOAR_RESULTS_DIR/updates/` for PID and last-seen values.
# Database operations
/app/main.sh db domains list
/app/main.sh db subdomains list -d example.com
/app/main.sh db subdomains export -d example.com -o results.txtAutoAR includes powerful GitHub reconnaissance capabilities for discovering secrets and generating targeted wordlists.
Scan individual repositories for exposed secrets and sensitive information:
# Scan a specific repository
/app/main.sh github scan -r owner/repository
# Example: Scan Microsoft's PowerShell repository
/app/main.sh github scan -r microsoft/PowerShellFeatures:
- π Secrets Detection: Finds API keys, passwords, tokens, and other sensitive data
- π HTML Reports: Generates detailed HTML reports with findings
- π― Pattern Matching: Uses advanced regex patterns to identify secrets
- π File Analysis: Scans all files in the repository
Scan entire organizations to discover repositories and their secrets:
# Scan an organization (default: 50 repos max)
/app/main.sh github org -o microsoft
# Scan with custom repository limit
/app/main.sh github org -o microsoft -m 100Features:
- π’ Organization-wide Scan: Discovers all public repositories
- π Bulk Secret Detection: Scans multiple repositories in parallel
- π Progress Tracking: Real-time progress updates via Discord
- π Summary Reports: Consolidated findings across all repositories
Generate targeted wordlists from organization's ignore files and patterns:
# Generate wordlist from organization
/app/main.sh github-wordlist scan -o microsoft
# With custom GitHub token
/app/main.sh github-wordlist scan -o microsoft -t your_github_tokenFeatures:
- π Ignore File Analysis: Extracts patterns from .gitignore files
- π― Targeted Wordlists: Creates organization-specific wordlists
- π Pattern Extraction: Finds common file patterns and extensions
- π Multiple Sources: Analyzes various ignore file formats
All GitHub scans generate comprehensive results:
new-results/
βββ github-microsoft/
β βββ dependency-confusion/
β β βββ microsoft-powershell/
β β βββ microsoft-vscode/
β β βββ dependency-confusion-summary.txt
β βββ wordlists/
β βββ github-patterns.txt
β βββ github-wordlist.txt
β βββ corser_gitignore.txt
Set up your GitHub token for enhanced functionality:
# In your .env file or environment
GITHUB_TOKEN=your_github_personal_access_tokenToken Permissions Required:
repo- Access to repository contentsread:org- Read organization membershipread:user- Read user profile information
AutoAR supports configurable threading across all scanning tools for optimal performance:
All Discord commands support optional threads parameter (default: 100):
/subdomains domain:example.com threads:200
/nuclei domain:example.com threads:50
/ports domain:example.com threads:500
All CLI commands support -t or --threads flag:
# High-performance scanning
./modules/subdomains.sh get -d example.com -t 200
./modules/nuclei.sh run -d example.com -t 50
./modules/ports.sh scan -d example.com -t 500
# Conservative scanning (lower resource usage)
./modules/subdomains.sh get -d example.com -t 25
./modules/nuclei.sh run -d example.com -t 10- High-end systems: 200-500 threads for maximum speed
- Standard systems: 100 threads (default) for balanced performance
- Resource-constrained: 25-50 threads to avoid overwhelming the system
- Network-limited: Lower thread counts to avoid rate limiting
| Variable | Description | Default |
|---|---|---|
DISCORD_BOT_TOKEN |
Discord bot token | Required |
DISCORD_WEBHOOK |
Discord webhook URL | Required |
DISCORD_ONLY |
Discord-only mode (no local files) | false |
SAVE_TO_DB |
Save results to database | true |
DB_TYPE |
Database type (postgresql/sqlite) | postgresql |
DB_HOST |
Database host | Required for PostgreSQL |
VERBOSE |
Verbose logging | true |
Configure these for enhanced functionality:
- SecurityTrails:
SECURITYTRAILS_API_KEY - Shodan:
SHODAN_API_KEY - VirusTotal:
VIRUSTOTAL_API_KEY - GitHub:
GITHUB_TOKEN - AWS:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY - And 20+ more (see docker-compose.yml)
- Nuclei Templates: Place custom templates in
nuclei_templates/ - Wordlists: Add custom wordlists to
Wordlists/ - Regex Patterns: Customize patterns in
regexes/ - Rate Limits: Adjust
NUCLEI_RATE_LIMITandNUCLEI_CONCURRENCY
AutoAR/
βββ modules/ # Core scanning modules
β βββ subdomains.sh # Subdomain enumeration
β βββ livehosts.sh # Live host detection
β βββ nuclei.sh # Nuclei integration
β βββ wp_plugin_confusion.sh # WordPress scanning
β βββ ... # Other modules
βββ python/ # Python utilities
β βββ discord_bot.py # Discord bot
β βββ db_handler.py # Database operations
β βββ wp_update_confusion.py # WP confusion scanner
βββ lib/ # Shared libraries
β βββ logging.sh # Logging utilities
β βββ utils.sh # Common utilities
β βββ discord.sh # Discord integration
βββ nuclei_templates/ # Nuclei vulnerability templates
βββ Wordlists/ # Wordlists and patterns
βββ regexes/ # Custom regex patterns
βββ docker-compose.yml # Docker configuration
βββ Dockerfile # Container definition
βββ main.sh # CLI entry point
Create custom scanning workflows by combining modules:
# Custom reconnaissance workflow
/app/main.sh subdomains get -d example.com
/app/main.sh livehosts get -d example.com
/app/main.sh urls collect -d example.com
/app/main.sh nuclei run -d example.com
/app/main.sh dalfox run -d example.com# List all domains
/app/main.sh db domains list
# Export subdomains for a domain
/app/main.sh db subdomains export -d example.com -o subdomains.txt
# Clean up old data
/app/main.sh cleanup run --domain example.com# Process multiple domains from a file
while read domain; do
/app/main.sh domain run -d "$domain"
done < domains.txt- API Keys: Store sensitive API keys in environment variables
- Rate Limiting: Respect API rate limits to avoid service disruption
- Rate Limiting: Configure rate limits for external APIs to avoid blocking
- Legal Compliance: Ensure you have permission to scan target domains
- Data Privacy: Be mindful of sensitive data in scan results
AutoAR now includes a full-featured REST API! Access all scanning capabilities programmatically for integration with CI/CD, custom dashboards, and automation workflows.
# Using Docker Compose
docker-compose --profile api up autoar-api
# Without Docker
export AUTOAR_MODE=api
export API_HOST=0.0.0.0
export API_PORT=8000
python api_server.py- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
# Subdomain Enumeration
curl -X POST "http://localhost:8000/scan/subdomains" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
# Live Hosts Discovery
curl -X POST "http://localhost:8000/scan/livehosts" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
# URL Collection
curl -X POST "http://localhost:8000/scan/urls" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
# Technology Detection
curl -X POST "http://localhost:8000/scan/tech" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
# Port Scanning
curl -X POST "http://localhost:8000/scan/ports" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'# Nuclei Vulnerability Scanner
curl -X POST "http://localhost:8000/scan/nuclei" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
# DNS Takeover Check
curl -X POST "http://localhost:8000/scan/dns-takeover" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'
# Reflection Vulnerabilities
curl -X POST "http://localhost:8000/scan/reflection" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}'# JavaScript Analysis
curl -X POST "http://localhost:8000/scan/js" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com", "subdomain": "api.example.com"}'
# S3 Bucket Security
curl -X POST "http://localhost:8000/scan/s3" \
-H "Content-Type: application/json" \
-d '{"bucket": "my-bucket", "region": "us-east-1"}'
# GitHub Repository Secrets
curl -X POST "http://localhost:8000/scan/github" \
-H "Content-Type: application/json" \
-d '{"repo": "owner/repository"}'# Check scan status
curl "http://localhost:8000/scan/{scan_id}/status"
# Get scan results
curl "http://localhost:8000/scan/{scan_id}/results"
# Download results as file
curl -O "http://localhost:8000/scan/{scan_id}/download"
# List all scans
curl "http://localhost:8000/scans"import requests
import time
API_BASE = "http://localhost:8000"
# Start a scan
response = requests.post(
f"{API_BASE}/scan/subdomains",
json={"domain": "example.com"}
)
scan_data = response.json()
scan_id = scan_data["scan_id"]
print(f"Scan started: {scan_id}")
# Wait for completion
while True:
status = requests.get(f"{API_BASE}/scan/{scan_id}/status").json()
if status["status"] in ["completed", "failed"]:
break
time.sleep(5)
# Get results
results = requests.get(f"{API_BASE}/scan/{scan_id}/results").json()
print(f"Output: {results['output']}")const axios = require('axios');
async function runScan() {
// Start scan
const { data } = await axios.post('http://localhost:8000/scan/subdomains', {
domain: 'example.com'
});
const scanId = data.scan_id;
console.log(`Scan started: ${scanId}`);
// Wait for completion
let status;
do {
const statusResponse = await axios.get(
`http://localhost:8000/scan/${scanId}/status`
);
status = statusResponse.data.status;
await new Promise(resolve => setTimeout(resolve, 5000));
} while (status === 'running');
// Get results
const results = await axios.get(
`http://localhost:8000/scan/${scanId}/results`
);
console.log('Results:', results.data);
}name: Security Scan
on: [push]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Run AutoAR Scan
run: |
RESPONSE=$(curl -X POST "${{ secrets.AUTOAR_API }}/scan/nuclei" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com"}')
SCAN_ID=$(echo $RESPONSE | jq -r '.scan_id')
# Wait for completion
while true; do
STATUS=$(curl -s "${{ secrets.AUTOAR_API }}/scan/$SCAN_ID/status" | jq -r '.status')
if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then
break
fi
sleep 10
done
# Download results
curl -o results.txt "${{ secrets.AUTOAR_API }}/scan/$SCAN_ID/download"AutoAR supports three operational modes:
docker-compose up autoar-discord
# or
export AUTOAR_MODE=discord
python discord_bot.pydocker-compose --profile api up autoar-api
# or
export AUTOAR_MODE=api
python api_server.pydocker-compose --profile full up autoar-full
# or
export AUTOAR_MODE=both
python launcher.pyAll scan endpoints return a scan ID for tracking:
{
"scan_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "started",
"message": "Scan started successfully",
"command": "/app/main.sh subdomains get -d example.com"
}Check status:
{
"scan_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "running|completed|failed",
"started_at": "2024-01-15T10:00:00.000000",
"completed_at": "2024-01-15T10:05:00.000000",
"output": "scan output...",
"error": null
}A test suite is included:
# Run automated tests
python test_api.py
# Run curl examples
./examples/curl_examples.sh
# Run Python examples
python examples/api_example.pyCurrent Implementation: No authentication (designed for localhost/internal use)
For Production:
- Add Authentication: Implement API keys or JWT tokens
- Use HTTPS: Deploy behind reverse proxy (nginx, traefik) with SSL/TLS
- Rate Limiting: Prevent abuse and resource exhaustion
- Firewall Rules: Restrict access by IP address
- Network Isolation: Use Docker networks or VPNs
Example nginx reverse proxy with SSL:
server {
listen 443 ssl http2;
server_name api.autoar.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- ProjectDiscovery for amazing tools
- Nuclei for vulnerability templates
- Subfinder for subdomain enumeration
- Httpx for HTTP probing
- All the open-source security tools that make this project possible
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Discord: Join our Discord server for real-time support