Home
Softono
b

brunosergi

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
2

Software by brunosergi

darkweb-forums-tracker
Open Source

darkweb-forums-tracker

# πŸ•΅οΈ DarkWeb Forums Tracker > **A tool I built to automatically monitor darkweb forums and deliver threat intelligence alerts to Discord** Tired of manually checking darkweb forums for threat intelligence? I created this automation system that uses AI agents to scrape forum posts, detect keyword alerts, and deliver professional threat intel straight to your Discord. It's a personal project for my portfolio, but I hope it helps other cybersecurity folks stay informed about underground activities without the manual work. <div align="center"> [![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?logo=docker)](https://docker.com) [![AI](https://img.shields.io/badge/Google_Gemini-AI-FF6B35?logo=googlegemini)](https://ai.google.dev) [![n8n](https://img.shields.io/badge/n8n-Automation-FF6D5A?logo=n8n)](https://n8n.io) [![Playwright MCP](https://custom-icon-badges.demolab.com/badge/Playwright_MCP-Browser_Automation-2EAD33?logo=playwright&logoColor=fff)](https://github.com/microsoft/playwright-mcp) [![Supabase](https://img.shields.io/badge/Supabase-Backend-3ECF8E?logo=supabase)](https://supabase.com) [![Discord](https://img.shields.io/badge/Discord-Integration-5865F2?logo=discord)](https://discord.com) <img src="images/forum_posts_discord.png" alt="DarkWeb Forums Discord Feed" width="350"> </div> ## 🎯 The Problem I'm Solving After spending way too much time manually monitoring darkweb forums for threat intelligence, I realized we all face the same frustrations: - **⏰ Manual monitoring takes forever** - Checking multiple forums every day eats up your time - **πŸŒ™ Easy to miss important stuff** - Critical posts happen while you're sleeping or busy - **πŸ“Š Information overload** - Hundreds of posts with no good way to prioritize what matters - **πŸ”„ Same routine every day** - Manually checking the same forums over and over - **πŸ“± Hard to share with the team** - Screenshot and copy-pasting isn't scalable - **πŸ›‘οΈ Stealth requirements** - Forums detect and block automated scrapers ## πŸ’‘ What I Built So I built this **DarkWeb Forums Tracker** to automate the tedious monitoring routine: ✨ **AI Does the Monitoring** - Google Gemini powered agents scrape forums with human-like behavior πŸ€– **Workflows Handle Everything** - n8n orchestrates the entire forum monitoring pipeline automatically πŸ“± **Discord Delivers Alerts** - Real-time notifications with screenshots for keyword matches πŸ–₯️ **Human-in-the-Loop** - VNC interface allows manual intervention for CAPTCHAs and login challenges 🐳 **Easy Setup** - Just run `docker compose up -d` and you're monitoring forums πŸ• **Every 4 Hours** - Set-and-forget automation that runs around the clock ## πŸ‘₯ Who Might Find This Useful If you're dealing with threat intelligence monitoring, this might help: - **πŸ›‘οΈ SOC Teams** - Early warning system for emerging threats - **πŸ•΅οΈ Threat Hunters** - Monitor threat actor communications and TTPs - **πŸ“‘ Threat Intel Analysts** - Automate darkweb data collection - **πŸ‘οΈ Security Managers** - Executive summaries of underground activities - **πŸ”’ Security Consultants** - Threat intelligence as a service for clients - **🏒 MSP Teams** - Monitor threats targeting your client industries ## πŸš€ Quick Start **Prerequisites**: Docker, Supabase Cloud account, Discord webhook, Google Gemini API key ```bash # Clone and setup git clone https://github.com/brunosergi/darkweb-forums-tracker.git cd darkweb-forums-tracker cp .env.example .env # Configure your .env with Supabase and API credentials # Launch the platform docker compose up -d # Configure N8N credentials at http://localhost:5678 # Activate both workflows and start monitoring! ``` > **πŸ“– Complete Setup Guide**: See [SETUP.md](SETUP.md) for detailed step-by-step configuration **Services**: N8N (5678) β€’ VNC (6080) β€’ Discord alerts every 4 hours ## πŸ› οΈ What's Under the Hood ### Core Tools - **[n8n](https://n8n.io)** - Visual workflows that connect everything together - **[Playwright MCP](https://github.com/microsoft/playwright-mcp)** - AI-powered browser automation with stealth capabilities - **[Google Gemini](https://ai.google.dev)** - The LLM that reads and analyzes forum content - **[Supabase](https://supabase.com)** - Cloud PostgreSQL database with file storage - **[Discord Webhooks](https://discord.com)** - Where your team gets the real-time alerts - **[Docker](https://docker.com)** - Everything runs in containers ### Forum Sources ## πŸ“‹ How It Works 1. **πŸ•΅πŸΏ DarkForums.st** - Track database leaks and breach discussions 2. **πŸ• Scheduled Monitoring** - System checks configured forums every 4 hours 3. **πŸ€– AI Agent Scraping** - Playwright MCP with browser automation extracts forum posts and timestamps 4. **πŸ” Smart Deduplication** - Only processes new posts (no duplicates from database) 5. **🎯 Entity Detection** - Advanced keyword matching with canonical names, variations, and text normalization 6. **πŸ”„ Retry Logic** - 2-attempt retry system with intelligent backoff for failed operations 7. **πŸ“Έ Screenshot & Analysis** - For alerts: captures screenshots and generates AI summaries 8. **πŸ“± Discord Delivery** - Comprehensive logging with color-coded alerts and detailed status updates 9. **πŸ’Ύ Database Storage** - Enhanced schema with timestampz format and entity tracking ## πŸ–₯️ Human-in-the-Loop VNC Interface ### **Common Scenarios** - **CAPTCHA Solving**: AI gets stuck on DDoS-Guard or forum CAPTCHAs - **Manual Login**: First-time authentication for login-protected forums - **Bot Detection**: Bypass anti-bot measures that require human interaction - **Session Recovery**: Re-authenticate when login sessions expire ### **How It Works** 1. **AI Agent Running**: Playwright MCP browser automation in progress 2. **Challenge Detected**: Agent encounters CAPTCHA or login requirement 3. **Manual Intervention**: Connect to VNC and solve the challenge 4. **AI Continues**: Agent resumes automated scraping after manual help The VNC interface runs a full Chrome browser where you can see exactly what the AI agent sees and interact with any elements that require human input. <div align="center"> <img src="images/vnc_browser_interaction.png" alt="VNC Browser Interface - AI Agent Forum Access" width="500"> </div> <div align="center"> <img src="images/vnc_manual_captcha.png" alt="VNC Manual Captcha Solving" width="350" style="margin-right: 10px;"> <img src="images/vnc_manual_login.png" alt="VNC Manual Login" width="350"> </div> ### **Quick Manual Access** When you need to manually control the browser for troubleshooting, authentication, or CAPTCHA solving: **VNC Web Interface:** Access http://localhost:6080 - Press **Alt+F2** and enter: `chromium` - Or right-click desktop β†’ Applications β†’ run terminal and type: `chromium &` **Container Terminal:** ```bash docker exec -it darkweb-forums-tracker-playwright bash chromium & ``` Perfect for solving CAPTCHAs, setting up authentication cookies, debugging failed scrapes, or manually navigating complex login flows that the AI agent couldn't handle automatically. ## πŸ’‘ V1 MVP Features βœ… **Schedule trigger** - Starts each 4 hours βœ… **Discord notifications** - Send scan started info (helps human attention if something goes wrong) βœ… **Forum URL loop** - Given URLs for forums to iterate through βœ… **AI Agent scanning** - Scan current URL target in loop βœ… **Error handling** - IF loop success β†’ continue workflow, IF loop fail β†’ failure branch (bot_captcha, login_needed, etc) βœ… **Deduplication** - Remove duplicate posts βœ… **Keyword branch separation** - Add keywords to "Keywords" node in array format (user customizable) βœ… **Alert workflows** - IF has any keyword β†’ alert branch (screenshot + AI summary), IF no keywords β†’ normal branch βœ… **Human-in-the-Loop VNC** - Web-based browser GUI for manual CAPTCHA solving and login assistance βœ… **Shared browser sessions** - VNC and Playwright MCP use same Chromium executable with shared user data directory for persistent login sessions βœ… **AI Agent retry logic** - 2-attempt retry system with intelligent backoff and Discord notifications βœ… **Enhanced entity detection** - Smart keyword matching with canonical names, variations, and text normalization βœ… **Timestamp format standardization** - All dates stored in timestampz format for proper temporal analysis βœ… **Advanced Discord logging** - Comprehensive status tracking with color-coded alerts and detailed error reporting βœ… **Database storage** - Saves everything for historical analysis and tracking βœ… **Discord results** - Send to Discord with distinction between normal/alert posts using entity-based detection ## πŸ—ΊοΈ What I'm Planning Next ### 🏒 **Forum & Data Improvements** - **Multiple forums support** - Track breach forums, lockbit, xss.is, etc. - **Scroll down** a little bit before taking screenshot for better view - **Modularize workflows** into multiple workflows to separate concerns ### πŸ€– **Authentication & Anti-Bot** - **Solve captcha and login sub-workflow tools** - Call AI Agents to handle automatically - **Discord notifications** asking for human presence when captcha/forum blocks occur - **Commercial/residential proxies** support for anti-bot problems (IP rotation, captcha solver) - **AI Agent auto-login** - Provide forum credentials in .env for AI Agent usage ### ⚑ **Technical Enhancements** - **AI agent N8N model selector** - Define which LLM to use and AI Agent fallback - **2nd AI Agent retry logic** - Apply same 2-attempt retry system to alert post analysis workflow - **pg_vector** - Vectorize Supabase data and turn forum posts into RAG for AI chat - **Better schedule trigger** - Configure minutes/hours for each forum URL path - **Tor proxy** to reach .onion forums - **More notification apps** - Slack, Telegram, etc. These features will transform it from a simple forum monitor into a comprehensive darkweb threat intelligence platform. The goal is to make it reliable enough that security teams actually depend on it for underground threat detection. --- <div align="center"> **⭐ Star this repo if you find it useful!** [πŸ“– Setup Guide](SETUP.md) β€’ [βš™οΈ Workflows](n8n/workflows) Just a guy building tools for the cybersecurity community πŸ›‘οΈ </div>

Workflow Automation SIEM & Threat Detection
32 Github Stars
self-hosted-n8n-template
Open Source

self-hosted-n8n-template

# πŸš€ N8N with Workers Template > **Complete self-hosted n8n stack with Redis queue mode for scalable workflow automation** A production-ready template that combines **n8n workflow automation**, **Redis queue processing**, and **PostgreSQL database** to create a horizontally scalable automation platform. Perfect for teams running heavy workflows that need reliable background processing. <div align="center"> [![Docker](https://img.shields.io/badge/Docker-Ready-2496ED?logo=docker)](https://docker.com) [![n8n](https://img.shields.io/badge/n8n-Automation_w/_Workers-DC382D?logo=n8n)](https://n8n.io) [![Redis](https://img.shields.io/badge/Redis-Queue-FF6D5A?logo=redis)](https://redis.io) [![PostgreSQL](https://img.shields.io/badge/PostgreSQL-Database-4169E1?logo=postgresql)](https://postgresql.org) <img src="images/n8n-template-diagram.jpg" alt="N8N Architecture Diagram" width="700"> </div> ## πŸ”₯ Why This Stack is Perfect for Heavy Automation ### **⚑ Scalable Architecture** - **Main n8n Instance** - Handles UI and API while staying responsive - **Worker Processes** - Execute workflows in background, scale horizontally - **Redis Queue** - Reliable job distribution and retry handling - **PostgreSQL Database** - Enterprise-grade data persistence ### **🐳 One-Command Deployment** - **Docker Compose** - Complete stack launches with single command - **Auto-configuration** - Database, queue, and workers pre-configured - **Production Ready** - Health checks, persistence, and monitoring included ## πŸš€ Quick Start ### Deploy the Complete Stack ```bash # Clone the repository git clone https://github.com/brunosergi/self-hosted-n8n-template.git cd self-hosted-n8n-template # Configure environment cp .env.example .env # Edit .env with your settings (especially N8N_ENCRYPTION_KEY and POSTGRES_PASSWORD) # Launch everything docker compose up -d ``` ### Your Automation Platform is Ready! - **πŸŽ›οΈ n8n Workflow Builder**: http://localhost:5678 - **πŸ“Š Queue Monitoring**: Redis CLI via `docker exec -it redis redis-cli` ## πŸ“‹ What You Get ### **Core Infrastructure** - **n8n Main Instance** - Web UI, API, and workflow management - **n8n Worker Process** - Background workflow execution from queue - **Redis Queue System** - Job distribution and retry handling - **PostgreSQL Database** - Workflow storage and execution history ### **Production Features** - **Health Checks** - All services monitored and auto-restart - **Data Persistence** - Workflows and data survive container restarts - **Horizontal Scaling** - Add more workers as your automation grows - **Queue Reliability** - Failed jobs retry automatically ## βš™οΈ Essential Configuration Copy `.env.example` to `.env` and set these critical values: ```bash # Security (REQUIRED) N8N_ENCRYPTION_KEY=your-super-secret-encryption-key-here POSTGRES_PASSWORD=your-super-secret-postgres-password # Optional N8N_PORT=5678 GENERIC_TIMEZONE=Europe/Berlin ``` ## πŸ”§ Scaling Your Automation ### Add More Workers When workflows start queuing up, just add more workers to docker-compose.yml: ```yaml # Add to docker-compose.yml n8n-worker-2: container_name: n8n-worker-2 image: n8nio/n8n:latest user: "1000:1000" restart: unless-stopped command: worker environment: - GENERIC_TIMEZONE=${GENERIC_TIMEZONE:-Europe/Berlin} - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY} - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false - DB_TYPE=postgresdb - DB_POSTGRESDB_HOST=postgres - DB_POSTGRESDB_PORT=5432 - DB_POSTGRESDB_USER=postgres - DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD} - DB_POSTGRESDB_DATABASE=postgres - DB_POSTGRESDB_SCHEMA=n8n_data - DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres?schema=n8n_data - EXECUTIONS_MODE=queue - QUEUE_BULL_REDIS_HOST=redis - QUEUE_BULL_REDIS_PORT=6379 - QUEUE_BULL_REDIS_DB=2 - QUEUE_HEALTH_CHECK_ACTIVE=true volumes: - n8n-data:/home/node/.n8n networks: [app-network] depends_on: postgres: { condition: service_healthy } redis: { condition: service_healthy } n8n: { condition: service_healthy } # For worker 3, 4, etc., just change the container_name ``` Then restart to apply changes: ```bash docker compose up -d ``` All workers automatically pull jobs from the same Redis queue! ### Monitor Your Queue ```bash # Check queue status docker exec -it redis redis-cli > LLEN bull:queue:default # View service health docker compose ps ``` ## πŸ—οΈ How Queue Mode Works 1. **Main Instance** - Receives triggers (webhooks, timers) and creates jobs 2. **Redis Queue** - Stores pending workflow executions 3. **Workers** - Pick up jobs and execute workflows independently 4. **Database** - Stores results and maintains workflow state This means your UI stays fast even when processing hundreds of workflows! ## πŸ› Quick Troubleshooting **Worker not processing jobs?** - Check logs: `docker logs n8n-worker` - Verify encryption keys match between main and worker **Queue backing up?** - Add more worker instances - Check for failed workflows blocking the queue **Need to backup data?** ```bash docker exec postgres pg_dump -U postgres postgres > backup.sql ``` --- <div align="center"> **πŸš€ Ready to scale your automation?** *The complete n8n stack for serious workflow automation* ⚑ </div>

Workflow Automation PaaS & Self-hosting
14 Github Stars