Skip to content

About

A port of my Russian-language Telegram bot CyberPravoBot as a public Slack bot

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

52 Commits

Folders and files

Repository files navigation

CyberShield

Python   Slack   License

A Slack bot that checks messages and links for scams, phishing, and social engineering using LLMs and VirusTotal.

image

Quick Start

  1. Go to #cybershield-bot Slack test channel.
  2. Type /scamscan followed by any text or links in any channel or in DM @CyberShieldBot:
image
  1. Enjoy the analysis!
image

Features

  • /scamscan <text and links> – Extracts any URLs from the message, runs a background VirusTotal lookup, and feeds the text along with live threat telemetry directly into Llama 3.3 via Groq to get an accurate risk analysis.
  • Scan Message Shortcut – Native integration with Slack's context menu. Right-click or click the three dots on any message to audit it instantly.
  • /scanlink <url> – Queries the VirusTotal API directly to check if any security engines flag the specific domain or infrastructure.
  • /cyberstats – Shows a quick summary of total scans, detected threats, and the average risk score from the local database.

How It Works

The entire backend is built using async libraries (slack-bolt, aiohttp, and aiosqlite). To prevent file-locking crashes when multiple users trigger scans simultaneously, the database is initialized in WAL (Write-Ahead Logging) mode, allowing concurrent reads and writes without freezing the bot.

For security checks, the bot takes a URL, converts it to base64, and sends it to VirusTotal. After getting the telemetry report, the bot appends this data directly into the Groq LLM prompt. This helps Llama 3.3 make a very precise context-aware decision about whether the chat message is a scam, threat, or social engineering.

For 24/7 availability, the bot is officially containerized with Docker and deployed on a remote Hack Club Nest Linux server.

Tech Stack:

  • Python 3.10+
  • Slack-Bolt (Async framework core)
  • Groq SDK & aiohttp (For AI and VirusTotal API)
  • aiosqlite (Database with WAL enabled)

How to Run Locally

Requirements

  • Python 3.10+
  • Groq API Key & VirusTotal API Key
  • Your own Slack App: You need to create an app on the Slack API dashboard, enable Socket Mode, grant required bot permissions, and get your Bot Token (xoxb-) and App Token (xapp-). Check out the HackClub Slack Bot Guide for more details.

Setup Steps

  1. Clone the repository:

    git clone https://github.com/egraich/cybershieldslackbot.git
    cd cybershieldslackbot
  2. Install the dependencies:

    pip install -r requirements.txt
  3. Create Environment Variables: Create a .env file in the root folder and add your secret tokens:

    SLACK_BOT_TOKEN=xoxb-your-slack-bot-token
    SLACK_APP_TOKEN=xapp-your-slack-app-token
    GROQ_API_KEY=your-groq-key
    VIRUSTOTAL_API_KEY=your-vt-key
  4. Launch the bot instance:

    python main.py

Credits

  • slack-bolt – Async Slack framework core.
  • Groq SDK – Llama 3.3 inference provider.
  • VirusTotal API v3 – URL reputation telemetry.

Made by egraich <3

About

A port of my Russian-language Telegram bot CyberPravoBot as a public Slack bot

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages