id int64 1 19k | telegram_id int64 6.21k 255k | channel large_stringclasses 3
values | category large_stringclasses 1
value | text large_stringlengths 1 4.1k | timestamp timestamp[us]date 2025-01-22 09:47:09 2026-08-17 12:39:06 | views int64 1 39.3k | embedding_id null | processed bool 1
class | urls large_stringlengths 2 641 | hashes large_stringlengths 2 408 | cves large_stringlengths 2 108 | fwd_from_id null | fwd_date null | reply_to_id null | embedding listlengths 768 768 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 254,845 | ctinow | cti_alerts | OpenAIβs Upcoming Astra Model Raises Autonomous Cyberattack Concerns
https://ift.tt/KRwtIzk | 2026-08-10T14:39:23 | 64 | null | true | ["https://ift.tt/KRwtIzk"] | [] | [] | null | null | null | [
-0.04629780352115631,
0.028990445658564568,
-0.02410105988383293,
0.05198335275053978,
-0.00742289237678051,
-0.04213860258460045,
0.01971559226512909,
-0.03367028012871742,
-0.0014996909303590655,
-0.03155997768044472,
0.03787913918495178,
0.012647840194404125,
-0.05368144437670708,
0.082... |
2 | 254,844 | ctinow | cti_alerts | CISA: SonicWall SMA1000 flaws now exploited by ransomware gangs
https://ift.tt/uPWEz0U | 2026-08-10T14:39:22 | 65 | null | true | ["https://ift.tt/uPWEz0U"] | [] | [] | null | null | null | [
0.014212860725820065,
0.008449099026620388,
0.011885742656886578,
0.011906217783689499,
-0.010690171271562576,
-0.013280483894050121,
0.029392819851636887,
-0.03141716495156288,
-0.10203002393245697,
-0.0022360736038535833,
-0.029791466891765594,
0.04025009274482727,
0.0452595092356205,
0.... |
3 | 254,843 | ctinow | cti_alerts | Kimsuky Builds Offline AI Stack to Boost Phishing and Automate Malware Development
https://ift.tt/evU137O | 2026-08-10T14:29:26 | 73 | null | true | ["https://ift.tt/evU137O"] | [] | [] | null | null | null | [
0.009948160499334335,
0.03149174153804779,
-0.03300129249691963,
0.005171387922018766,
-0.029172709211707115,
-0.03617249056696892,
0.10039806365966797,
-0.012401414103806019,
0.045789025723934174,
0.03447467088699341,
0.005527302622795105,
-0.004017597530037165,
-0.016009684652090073,
0.1... |
4 | 254,842 | ctinow | cti_alerts | Why transparent AI agents matter more than you think
https://ift.tt/YUquXRI | 2026-08-10T14:29:25 | 72 | null | true | ["https://ift.tt/YUquXRI"] | [] | [] | null | null | null | [
-0.018725555390119553,
0.05861609801650047,
-0.04486273229122162,
0.012688420712947845,
-0.02089378982782364,
-0.01980317384004593,
0.04893409460783005,
0.02475464902818203,
-0.013357301242649555,
0.03317943960428238,
0.015918204560875893,
0.03038201481103897,
0.005236399360001087,
0.08057... |
5 | 254,841 | ctinow | cti_alerts | Stealthium Targets Security Blind Spots in AI Accelerators and Neo-Clouds
https://ift.tt/NZ2cG6V | 2026-08-10T14:24:25 | 73 | null | true | ["https://ift.tt/NZ2cG6V"] | [] | [] | null | null | null | [
-0.0073174680583179,
0.05480228364467621,
-0.028864867985248566,
0.06705693900585175,
-0.01610570400953293,
-0.023021725937724113,
0.09730187803506851,
-0.01205336581915617,
0.03288165107369423,
0.010114472359418869,
-0.0005075140506960452,
-0.013774818740785122,
-0.026162246242165565,
0.1... |
6 | 254,840 | ctinow | cti_alerts | Margarita Howardβs HX5 Operationalizes CMMC Compliance Before AI Rules Arrive
https://ift.tt/VbF60ij | 2026-08-10T14:19:11 | 81 | null | true | ["https://ift.tt/VbF60ij"] | [] | [] | null | null | null | [
-0.026103606447577477,
0.015814177691936493,
-0.009119505062699318,
-0.04842144623398781,
0.007199313957244158,
0.00028892536647617817,
0.041885700076818466,
0.02842690236866474,
-0.039630670100450516,
0.01814272627234459,
0.01896744780242443,
0.059808120131492615,
-0.026479387655854225,
0... |
7 | 254,839 | ctinow | cti_alerts | 10th August β Threat Intelligence Report
https://ift.tt/HCfSkpK | 2026-08-10T14:14:40 | 85 | null | true | ["https://ift.tt/HCfSkpK"] | [] | [] | null | null | null | [
-0.011554677039384842,
-0.015969213098287582,
-0.0049889544025063515,
0.010976266115903854,
-0.05416938289999962,
-0.05271291360259056,
0.05108792334794998,
0.0037667127326130867,
0.027651991695165634,
0.016287287697196007,
0.010133398696780205,
0.037016067653894424,
-0.013855159282684326,
... |
8 | 254,838 | ctinow | cti_alerts | Cisco Warns of High-Severity ClamAV Vulnerabilities With Public PoC
https://ift.tt/TwpvdV4 | 2026-08-10T14:09:10 | 97 | null | true | ["https://ift.tt/TwpvdV4"] | [] | [] | null | null | null | [
-0.030504191294312477,
0.003060992807149887,
0.008427774533629417,
0.005410268437117338,
0.04190349951386452,
-0.023362068459391594,
0.00191931938752532,
-0.037308041006326675,
0.031239431351423264,
0.035498108714818954,
-0.0011556382523849607,
-0.010380927473306656,
0.034244291484355927,
... |
9 | 254,837 | ctinow | cti_alerts | When Credentials Are No Longer Enough: Device Trust in the AI Era
https://ift.tt/tpUvXuT | 2026-08-10T14:09:09 | 90 | null | true | ["https://ift.tt/tpUvXuT"] | [] | [] | null | null | null | [
0.017178568989038467,
0.01497542392462492,
0.018399037420749664,
-0.020016023889183998,
-0.03319167718291283,
-0.03192220628261566,
0.08305509388446808,
-0.06113371625542641,
0.0333382785320282,
-0.02339980937540531,
0.01685248501598835,
0.005927075166255236,
0.03483453765511513,
0.0286498... |
10 | 254,836 | ctinow | cti_alerts | Blockchain and AI: Why Trusted Data Matters
https://ift.tt/r4nNTsh | 2026-08-10T13:49:33 | 125 | null | true | ["https://ift.tt/r4nNTsh"] | [] | [] | null | null | null | [
0.0041465009562671185,
0.06650236248970032,
-0.01397752482444048,
0.008316414430737495,
-0.025847528129816055,
-0.02324889786541462,
0.01858285814523697,
0.0011380803771317005,
0.05051831901073456,
0.03286854550242424,
0.01385198812931776,
0.010364185087382793,
0.004491760395467281,
0.0794... |
11 | 254,835 | ctinow | cti_alerts | 9.2 Million Israeli Records Sold as a New Breach Are 20 Years Old
https://ift.tt/sCrBd3T | 2026-08-10T13:49:32 | 127 | null | true | ["https://ift.tt/sCrBd3T"] | [] | [] | null | null | null | [
-0.04536833614110947,
0.08167606592178345,
0.00406359089538455,
0.04003892466425896,
-0.04909847304224968,
-0.020926816388964653,
0.08551841229200363,
0.023702535778284073,
0.0035751480609178543,
0.03912823274731636,
0.012082104571163654,
-0.010339299216866493,
-0.0251205712556839,
0.08675... |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
osint-radar
Goal
Public Telegram channels post real cybersecurity threat intelligence constantly β new CVEs, breach reports, malware analysis β but the signal is scattered across sources, in different formats, with no way to ask a direct question about it. osint-radar collects that information automatically from three broadcast-only channels, understands what each message actually means (not just its keywords), and lets you ask a question in Discord and get a real, sourced answer β grounded in messages that were actually posted, not invented. The result is a continuously-updated intelligence feed you can query in natural language, set up alerts on, and have delivered as a daily briefing.
Contents
- Architecture
- Data Ingestion & Storage
- EDA
- RAG Pipeline
- Application Layer β Discord Bot
- Setup
- Using This as an Actual CTI Tool
- Honest Limitations and What's Still Open
Architecture
Data Ingestion & Storage
Everything below happens before the RAG loop ever sees a message β it's how raw Telegram posts become a queryable dataset.
Data Ingestion & Storage
Everything below happens before the RAG loop ever sees a message β it's how raw Telegram posts become a queryable dataset.
Ingestion
- Live listener (
scripts/run_listener.py) β persistent Telethon connection; commits each incoming post to MySQL and appends to the day's JSONL archive. - Backfill (
src/ingestion/backfill.py) β pages through channel history; bad handles log a warning and return[]rather than crashing. - Incremental resume β at startup queries
MIN(MAX(timestamp) per channel)and re-fetches only newer messages; first run triggers a full backfill capped at 3,500 per channel. Pass--skip-backfillto skip entirely.
python scripts/run_listener.py # normal start (incremental backfill)
python scripts/run_listener.py --skip-backfill # no backfill, live only
Channel selection
Only broadcast-only channels with no linked discussion group are eligible (entity.broadcast == True AND entity.linked_chat_id is None, verified via scripts/check_channels.py) β comment-enabled channels mix expert alerts with user replies.
Several candidate categories were evaluated and excluded:
- vulnerability_exploit cluster (cve_feed, arpsyndicate, vxunderground, MalwareResearch) β passed Telegram resolution but had comments enabled; not broadcast-only.
- hacktivist_ddos cluster (NoName05716, DarkStormTeams, TheRipperSec, fattahh_ir) β all four failed with
UsernameInvalidError; current handles not verified. - One further category excluded on content grounds: posts were stolen credential dumps, not breach reporting.
The three channels that passed all checks:
| Channel | Category |
|---|---|
ctinow |
cti_alerts |
thehackernews |
cti_alerts |
cveNotify |
cti_alerts |
Storage
messages stores full text plus channel, timestamp, views, fwd_from_id, fwd_date, reply_to_id, and JSON-encoded urls/hashes/cves; a composite unique key on (channel, message_id) prevents duplicates.
processed (BOOLEAN, default FALSE) is an analysis status flag only β flipped to TRUE after the vector is written to FAISS, so /status can report unindexed message count. Every row is fully populated at insert time.
watches stores per-user subscriptions: discord_user_id, term, category (keyword or product), and last_checked_message_id (high-water mark to prevent re-notification).
Raw archive
Each message is written to data/raw/messages_YYYY-MM-DD.jsonl (keyed on Telegram timestamp) before the MySQL commit β the write is independent, so a failed DB commit doesn't lose the record. This directory is the HF dataset source for the Gradio phase.
Entity extraction
src/analysis/entity_extraction.py provides three pure functions that run at insert time:
| Function | Pattern captured |
|---|---|
extract_urls |
HTTP/HTTPS URLs |
extract_hashes |
MD5 (32 hex), SHA1 (40 hex), SHA256 (64 hex) |
extract_cves |
CVE-YYYY-NNNNN+ (case-insensitive) |
All three deduplicate and preserve first-seen order; results are JSON-encoded into urls/hashes/cves. This powers /cve's exact SQL lookup (bypassing embeddings) and cross-channel CVE correlation.
For rows ingested before entity extraction was wired in:
python scripts/extract_entities_backfill.py
Processes NULLs in 500-row batches; safe to re-run.
EDA β findings
Notebooks run against the collected dataset (10,485 messages across three channels at the time these figures were generated β the live count is higher and grows continuously).
Message volume over time
Each channel is plotted on its own x-axis β collection windows are unequal (documented data-quality flag). Raw cross-channel counts are misleading; compute_channel_statistics returns messages-per-active-day for fair comparison.
Text length distribution
thehackernews posts long-form summaries; cveNotify posts short structured advisories; ctinow sits between. The 300-character truncation per retrieved message (applied at generation time) strips more context from longer posts.
Entity coverage
cveNotify has near-total CVE coverage; thehackernews has moderate CVE coverage with higher URL density; hash coverage is low across all three. The 69 cross-channel CVE pairs (same CVE in β₯2 channels) form the embedding evaluation positive set used below.
RAG Pipeline
This is the core of the project. Instead of asking a language model to recall facts from training data β where it may hallucinate β RAG retrieves the actual relevant messages first, then generates an answer using only those. Every bot response is grounded in real posts. The pipeline has four stages, in order: Embed β Store β Retrieve β Generate.
| Stage | What it means | Where it happens |
|---|---|---|
| Embed | Turn text into a vector capturing meaning | all-mpnet-base-v2, src/analysis/embeddings.py |
| Store | Keep vectors searchable | FAISS index, data/processed/faiss_index.bin |
| Retrieve | Find the closest matches to a question | recommend_similar(), src/analysis/novelty_filter.py |
| Generate | Answer using only the retrieved messages | flan-t5-large, src/generation/digest_generator.py |
1. Embed β model comparison
No labelled relevance data exists, so evaluation uses a same-CVE weak-label proxy: cross-channel message pairs sharing a CVE are positives; random pairs with no CVE overlap are negatives (69 of each). The gap metric is mean(positive cosine similarities) β mean(negative cosine similarities) β larger is better.
| Model | Dimensions | Size | Gap | Positive sim | Negative sim |
|---|---|---|---|---|---|
all-mpnet-base-v2 |
768 | ~420 MB | +0.4067 | 0.6735 | 0.2667 |
all-MiniLM-L6-v2 |
384 | ~90 MB | +0.3772 | β | β |
bge-small-en-v1.5 |
384 | ~130 MB | +0.2008 | β | β |
Winner: sentence-transformers/all-mpnet-base-v2 β highest gap by a clear margin; slower at CPU inference, but the gap advantage justified the choice.
Caveats to be honest about:
- 69 positive pairs is a small sample, especially after filtering cross-channel overlaps. The gap estimates have wide uncertainty intervals.
bge-small-en-v1.5should be evaluated with its recommended query instruction prefix ("Represent this sentence for searching relevant passages: "). The evaluation here omits the prefix, which likely suppresses its gap score. Its true performance relative to MiniLM is understated.
Embeddings for all 10,485 messages were computed after model selection and saved to data/processed/embeddings.npy (shape: 10,485 Γ 768), with a parallel index array at data/processed/message_ids.npy.
2. Store β MySQL, FAISS, and offline clustering
Vectors are made searchable in two separate ways, both built on the same embeddings but serving different purposes β this is not one mechanism, it's two:
- FAISS (
IndexFlatIP,src/analysis/novelty_filter.py) β the live, query-time index. This is what Retrieve actually uses. - HDBSCAN (
src/analysis/clustering.py) β an offline, no-query pass over the whole corpus, run once, assigning cluster IDs and marking sparse points as noise. Not called at query time; used for EDA and reporting.
Proof, not just a diagram. Every row in messages also has an embedding_vector column β the actual 768-number vector, stored as JSON, reconstructed from the FAISS index for presentation purposes:
SELECT id, text, embedding_vector FROM messages WHERE id = <any id>;
Cluster size distribution (top 20)
| Metric | Value |
|---|---|
| Clusters found | 190 |
| Noise percentage | ~72.5% |
| Silhouette score (non-noise) | ~0.29 |
Why high noise is expected: a 72.5% noise rate is correct, not a failure β CTI feeds post constant one-off advisories (novel CVEs, breaking incidents, product patches) that appear once or use varied language. The 27.5% that cluster represent repeatedly-reported topics; a silhouette score of 0.29 on that non-noise subset is acceptable given CTI language heterogeneity.
3. Retrieve
recommend_similar() (src/analysis/novelty_filter.py) embeds an incoming query with the same model used for storage, then does a top-k cosine similarity search against the FAISS index. This is what powers /search and the daily briefing β one live query in, the k most similar real messages out, with similarity scores attached.
Run /search <topic> in Discord to watch Retrieve (and Generate, next) execute on real data.
4. Generate β what worked and what didn't
Two models were tested:
google/flan-t5-base (failure) β 250M parameters. Echoed the prompt's question labels literally ("What happened?", "Why does it matter?") instead of answering them β a known small-model failure mode, diagnosed directly from output.
google/flan-t5-large (partial success, current default) β 780M parameters. Avoids the echo failure but is extractive, not abstractive: it copies from its best source rather than synthesising across all three messages, and typically drops the second half of the two-part prompt. For short alert posts this is a real ceiling, not a tuning issue.
Output is capped at 2,000 characters; each retrieved message is truncated to 300 characters before generation. Test the end-to-end pipeline without starting the bot:
python scripts/demo_pipeline.py
Application Layer β Discord Bot
This is what the RAG pipeline serves: a live interface where Retrieve and Generate run on demand.
How the bot fits into Discord's architecture
The bot process is a client to Discord's Gateway (WebSocket, receiving interaction events) and simultaneously the backend server for the CTI logic β both models (all-mpnet-base-v2, flan-t5-large), the FAISS index, and the MySQL pool are loaded once at startup in scripts/run_bot.py and held in memory; no per-query reloading.
How a slash command executes
- User types
/search ransomware targeting healthcare. - Discord's Gateway delivers the interaction event to the bot.
- Handler calls
await interaction.response.defer()immediately β extends Discord's 3-second deadline past embed/generate time. - CPU-bound work (
embed_model.encode(),generate_digest()) runs viaasyncio.to_thread(), leaving the event loop free for other commands. await interaction.followup.send(result)delivers the formatted digest.
Background tasks (run independently of user commands)
update_index_task (every 5 min, runs in asyncio.to_thread):
- Queries
processed == FALSErows, encodes text, appends vectors to FAISS index - Saves index + message-ID array to disk; reloads to sync in-memory state
- Marks rows
processed = TRUE; DMs users whoseWatchterms match new messages
daily_briefing_task (fires every minute, acts at UTC hour 8):
- Queries newest message per channel from the last 24 h; uses the most-recent as query
- Runs
generate_digest/format_digest_for_discord; posts to briefing channel - Requires
DISCORD_BRIEFING_CHANNEL_IDin.env; silently disabled if absent
Command reference
| Command | What it does | Example |
|---|---|---|
/search <query> |
Embeds query, retrieves top-3 similar messages via FAISS, generates a synthesised digest | /search Log4Shell exploitation |
/status |
Reports total message count, pending-unindexed count, FAISS index modification time, and per-channel breakdown | /status |
/cve <CVE-ID> |
Exact SQL lookup by CVE ID across all messages; returns up to 5 results with channel, timestamp, and text snippet; bypasses semantic search intentionally | /cve CVE-2024-3400 |
/watch <term> |
Registers a keyword watch; you receive a DM whenever that term appears (case-insensitive substring) in newly-indexed messages | /watch Ivanti |
/track <product> |
Same as /watch but labelled category=product for distinction |
/track Fortinet VPN |
/unwatch <term> |
Removes your watch for that term | /unwatch Ivanti |
/mywatches |
Lists your active keyword and product watches (ephemeral β only you see it) | /mywatches |
!digest [date] |
Prefix-command version: generates a digest for latest messages | !digest |
!search <query> |
Prefix-command version of /search |
!search Cl0p ransomware |
Starting the bot
python scripts/run_bot.py
Loads both models, FAISS index, and message DataFrame into memory, then connects to Discord; both background tasks start automatically.
Setup
Prerequisites
- Python 3.11
- A running MySQL instance (local or remote)
- A Telegram account with API credentials from my.telegram.org/apps
- A Discord bot token from the Discord Developer Portal
Installation
# 1. Clone and enter the repo
git clone <repo-url>
cd osint-radar
# 2. Create and activate a virtual environment
python -m venv .venv
# Linux / macOS
source .venv/bin/activate
# Windows
.venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
Environment variables
Copy .env.example to .env and fill in every value before running anything.
cp .env.example .env
The full variable list:
| Variable | Purpose |
|---|---|
TELETHON_API_ID |
Telegram App API ID (from my.telegram.org) |
TELETHON_API_HASH |
Telegram App API hash |
TELETHON_PHONE |
Your phone number in E.164 format, e.g. +12125551234 |
DISCORD_BOT_TOKEN |
Bot token from the Discord Developer Portal |
DISCORD_BRIEFING_CHANNEL_ID |
Channel ID for daily auto-briefing (optional β omit to disable) |
MYSQL_HOST |
MySQL host, default localhost |
MYSQL_PORT |
MySQL port, default 3306 |
MYSQL_USER |
MySQL username |
MYSQL_PASSWORD |
MySQL password |
MYSQL_DB |
Database name, default osint_radar |
HF_TOKEN |
Hugging Face token (optional β only needed to push to HF Hub) |
To find a Discord channel ID: open Discord Settings β Advanced β enable Developer Mode, then right-click any channel and choose Copy Channel ID.
Database schema
mysql -u $MYSQL_USER -p $MYSQL_DB < src/storage/schema.sql
The schema uses CREATE TABLE IF NOT EXISTS, so it is safe to re-run against a database that already has some tables β it will only add what is missing, never drop or truncate.
Using This as an Actual CTI Tool
Defensive monitoring (protecting your own environment)
/watchor/trackany product, vendor, or CVE relevant to your infrastructure β DM alert within 5 minutes of a new mention/statusto verify the index is updating and the bot is alive/cve <ID>for instant cross-source lookup during patch meetings- 08:00 UTC daily briefing delivers yesterday's posts as a team standup input
Threat-landscape awareness
/searchany campaign, threat actor, or vulnerability class to see how it's reported across independent sources- Cross-source results signal reporting consensus β not visible from reading one feed at a time
- Downloads last month
- 65




