Skip to content

v4.0.0

Latest

Choose a tag to compare

@ygalnezri ygalnezri released this 02 Dec 16:03
6496daf

v4.0.0

A tour of Watcher

A new interface built around an Overview that shows what needs your attention. Watcher now flags the CVEs exploited in the wild (CISA) with their EPSS score, takes screenshots of the pages it monitors, sends 22 editable notifications to Slack, Citadel, TheHive and e-mail, and writes its AI summaries through a gateway with a local AI of its own. It also merges the AI gateway and the HTML summaries of 3.8.0.

Update Procedure

⚠ This release includes database migrations, not reversible for the data they remove. Back up your database first.

Run these from the deployment/ directory, in this order:

  1. Back up: copy your .env files outside the repository, then dump the database into deployment/backups/.

    make backup

  2. Get the 4.0.0 files, keep your .env: the Compose files changed (new screenshotter and llm services). The committed .env is now .env.example: never copy it over yours, add the variables you miss by hand (all have a default).

    git fetch --tags

    git checkout v4.0.0

  3. Stop and pull the new images:

    make down

    make pull

  4. Migrate before starting:

    make migrate

  5. Start:

    make up

  6. Wait for the local AI: its container downloads a model of about 500 MB at its first start (a few minutes). Follow it until listening on, then press Test on the Local AI card of the Connectors page. Until then the summaries use a template and are written again afterwards. No download? Set HTTPS_PROXY in deployment/.env, then make up. Stalled? docker compose restart llm resumes it.

    docker compose logs -f llm

⚠ Notifications are off until a superuser turns them on in Connectors > Notifications. The per-subscriber Slack, Citadel and TheHive choices of five modules are dropped.

⚠ Do not change CONNECTORS_ENCRYPTION_KEY during the update: the saved credentials would become unreadable.

⚠ Cyber Watch removes old rows every night. CVEs and victims older than a year go on the first night: python manage.py purge_cyber_watch --dry-run counts them, CYBER_WATCH_CVE_RETENTION_DAYS and CYBER_WATCH_VICTIM_RETENTION_DAYS at 0 keep them.

ℹ From 3.7.x or 3.8.x: one migration per module, migrate applies the ones your database has not seen. If an AI is hosted inside your network, put its address in NO_PROXY.

ℹ Rollback: restore the dump and go back to the previous image.

Models and local AI

The image is 2.6 GB (4.9 GB before) and works offline.

  • Entity model (dslim/bert-base-NER): in the image, no call to Hugging Face. If it cannot load, Watcher takes the words from the titles.
  • Local AI (new llm container, llama.cpp with Qwen2.5-0.5B): downloads its model from Hugging Face at the first start, into the llm_models volume. It needs access to Hugging Face (HTTPS_PROXY) and up to 2 GB of memory. HF_LOCAL_MODEL and PRELOAD_LOCAL_LLM are gone, and FALLBACK_LLM_PROVIDER=huggingface_local is read as the local AI.
  • Another model: set LOCAL_LLM_HF_REPO=<user>/<repository>:<quantisation> (any GGUF model of Hugging Face) in the .env, then docker compose up -d llm. Check that the quantisation exists in the Files tab of the repository.
  • AI chain: Default AI, then FALLBACK_LLM_PROVIDER, then the local AI (the Local AI connector).
  • Without any AI: the breaking news and the weekly report use a template, trending words get no summary, and Watcher writes them again once an AI answers.
  • Image built with PRELOAD_HF_MODELS=false: no entity model, set HF_HUB_OFFLINE=0 to download it at first use.

Configuration Changes

New optional variables in .env (see Setup Watcher environment and Data Retention in the documentation):

  • CYBER_WATCH_CVE_RETENTION_DAYS, CYBER_WATCH_VICTIM_RETENTION_DAYS: days kept by the nightly Cyber Watch clean-up. Default 365, 0 keeps everything.
  • SUMMARY_RETENTION_DAYS, TIMELINE_RETENTION_DAYS: days kept for the AI summaries and the activity journal. Default 90 and 365, 0 keeps everything.
  • CYBER_WATCH_KEV_URL, CYBER_WATCH_EPSS_API_URL: addresses of the CISA catalogue and of FIRST EPSS. Empty turns the connector off.
  • WATCHER_DOCS_URL, WATCHER_SUPPORT_EMAIL: the documentation address and the support address of the Help menu. Defaults: the public site, no support entry.
  • NER_TORCH_THREADS: cores used by the entity model. Default 2.

⚠ The TLS certificates of the AI endpoints are now verified by default. 3.8.0 did not, unless LITELLM_VERIFY_SSL=True. An internal endpoint with a self-signed certificate needs LITELLM_VERIFY_SSL=False or CA_PATH.

⚠ Keep one gunicorn worker: the scheduler lives in the web process. Do not raise the number of workers.

What's Changed

Breaking Changes

  • Interface: rewritten. Removed without replacement: the customisable dashboards and Wall Display, the layouts of the profile, and the 12 Bootswatch themes (darkly and slate are kept).
  • Home page: Threats Watcher moves from / to /threats_watcher. The home page is the new Overview.
  • API, pagination: these lists no longer answer a plain array but {count, next, previous, results}, 100 per page: /api/cyber_watch/cves/, /api/cyber_watch/ransomware/victims/, /api/cyber_watch/watch-rules/, /api/threats_watcher/trendyword/, /api/threats_watcher/source/, /api/threats_watcher/bannedword/ and /api/threats_watcher/monitored-keywords/. A script reads results and follows next; ?page= and ?page_size= (1000 at most) choose the page.
  • API, fields: posturls is gone from a trending word, and the content of data leak alerts is only in the alert itself (has_content in the lists). An unknown theme id answers 400.
  • API for visitors: anonymous visitors no longer see ticket_id, comments, misp_event_uuid and last_event of a legitimate domain.
  • API without an account: the lists of CVEs, ransomware groups and victims, watch rule hits and monitored keywords answer 401 to a request that carries neither a token nor an API key. A script that sends Authorization: Token <key> is not concerned.
  • API, watch rule hits: a hit lists all its keywords in matched_keywords. matched_keyword is kept and holds the first one.
  • API, alerts: the lists of data leak and website alerts carry has_content instead of content (the alert itself keeps it), and keyword is read-only.
  • Server: the container runs gunicorn (one worker, 16 threads) instead of manage.py runserver. A Compose file of your own must run gunicorn watcher.wsgi:application.
  • Deployment: deployment/docker-compose.overide.yml (misspelled, never loaded by Compose) is removed. SEARX_PROTOCOL is gone from .env.example.

Overview

  • Overview: the new home page, built from a single request (/api/overview/). It shows the week in one figure, the latest AI summary, a card per module, the latest detections, the top vulnerabilities and the trending words. Customise chooses the blocks, on the account.
  • Needs your attention: what waits for a decision, one line per thing, the worst first.
  • The week opens the week: each figure of the greeting card (data leaks, DNS threats, website changes, watch rule matches, CVEs, victims) links to its list already filtered on the last 7 days, all statuses, so the list matches the figure.
  • Insights: a 7 / 30 / 90 days choice on the charts of every module (kept in the address as ?idays=), with the dates it covers; the statistics endpoints accept ?days=7|30|90 (30 by default). Website Monitoring also shows its most frequent extensions, and Legitimate Domains the domains added per day. The globe of the ransomware map turns twice as slowly.
  • Customise: a visitor chooses Modules (the cards) and More with an account (the locked modules) on their own.
  • Breaking news: shown for the 24 hours that follow their generation, as on Threats Watcher.

AI Summaries

  • AI gateway: the summaries are written through LiteLLM (llm_gateway), with one connector per provider. The Default AI switch of a connector makes it the one tried first.
  • HTML summaries: the weekly report, the breaking news and the summary of a word are written as clusters by severity. The page rebuilds them from a short list of tags and styles, never as raw HTML.
  • Summary cards: the same card on the Overview and on Threats Watcher. It shows the topics, their severity and Read more, only when there is more to read.
  • Sources: a report cites the sites it is based on, as stacked icons on the card and one chip per site in the panel.
  • Regenerate: a report, a breaking news or the summary of a word can be written again from the page, with a waiting time set by a superuser in the profile. A summary being written stays shown after a refresh.
  • Retention: a nightly job (03:50) removes the summaries and activity lines older than their retention. python manage.py purge_history [--dry-run] does the same by hand.

Threats Watcher

  • Trends: the words that jump come first (Hot, Rising, New, Steady, Fading), with a small chart of their week. The word cloud is sized by the week.
  • Word window: one sentence on how the word is doing, the articles by day with the icon of their site, and a Read mark.
  • Keyword rules: all of / at least one of / none of, with the matched articles kept.
  • Summaries: the breaking news and the weekly report are cards you click anywhere to read them. The report shows its executive summary and its first topic open, and so does its panel (the other topics are folded, Expand All opens them).
  • main_watch: a title goes through the entity model once, the model uses at most NER_TORCH_THREADS cores, and the jobs start on their own minute.

Cyber Watch

  • Exploited CVEs: once a day Watcher reads the CISA catalogue (connector CISA KEV) and flags the CVEs it holds. The table has an Exploited chip and an Exploitation filter.
  • EPSS: once a day Watcher reads the EPSS score of every CVE (connector FIRST EPSS) and shows it under the severity.
  • CVE scores: the score is read wherever the source keeps it, and asked again for the CVEs published before they were scored. Fixed a score that was never found.
  • Advisories: the figures count the CVEs only. The table has a Type filter and marks an advisory with a chip.
  • Watch rules: one match per rule and object, with all its keywords. Existing matches are merged by the 4.0.0 migration of cyber_watch.
  • World map: the ransomware victims by country, on a flat map or a globe, over the period you choose, with the top countries, a table and a layer for the victims that matched a watch rule.
  • Retention: a nightly job (03:30) and python manage.py purge_cyber_watch [--dry-run] remove the old CVEs and ransomware victims. The exploited CVEs and what a watch rule matched always stay.

Website Monitoring and Legitimate Domains

  • Monitored pages: versions, diff, threshold, ignore patterns and screenshots.
  • Screenshots: taken by the isolated screenshotter service, for pages, data leaks and legitimate domains. A failed capture says why. Its image, ghcr.io/thalesgroup-cert/watcher-screenshotter, is published with every release: make pull gets it and nothing has to be built. SCREENSHOT_SERVICE_URL is http://screenshotter:8080 by default; set it empty to switch the screenshots off. The Helm chart deploys it by default (screenshotter.enabled).
  • Expiry dates: the RDAP server of each extension comes from the IANA bootstrap. A date is lowered only when the registry gives the same earlier date twice. Removed the third-party WHOIS web service and the registrar job of the sites.
  • Domains the registry does not know: after two answers in a row, a legitimate domain goes to Pending actions ("Domain lost"). python manage.py check_expiry_dates <domain> compares the stored date with the registries.
  • Pending actions: several can be approved or rejected at once (500 at most).
  • Fewer false alerts: the first RDAP answer is a starting point, a server banner alert needs a different product or major version, and the MX records are said to be gone after two passes.
  • Changes first: in the panel of a website, the changes to review come first, with a Review button that opens them.
  • Websites and pages: the panel of a website lists its monitored pages and adds one with the address filled in; the panel of a page leads back to its website.
  • Comments: a website has a "Comments" field, and Watcher writes a dated line when it moves or changes a domain on its own.

Notifications and Connectors

  • Notifications: a catalog of 22 notifications with editable messages. The tab uses pills, a count per module, a search and an "Active only" filter. Every type is off until a superuser turns it on.
  • Slack and Citadel messages: a headline, the module in small under it, one line per fact (no more bracketed titles or tables), a coloured dot for the severity of a CVE, and the time (server time) after the module name. A Send a test button in the notification panel posts the saved message marked [TEST]. Citadel messages go out 0.5 s apart and are sent again when the server answers Too Many Requests.
  • Grouped messages: from NOTIFICATION_DIGEST_THRESHOLD alerts (default 4, 0 turns it off) of one notification in a job run, Slack and Citadel get one message that lists them (10 lines, then "... and N more"). TheHive and the e-mail are not grouped.
  • Exploited CVE: new notification when CISA adds a CVE that Watcher holds to its catalogue. Slack, Citadel, TheHive and e-mail.
  • Expiry: new notifications for a domain expiring within 30 days, a date moved earlier twice, a monitored website whose domain is no longer registered.
  • Website change: the message shows the server, the X-Powered-By header, the registrar and the expiry date before and after, and a change of registrar or of expiry date found by the lookup is notified (it was not).
  • Suspicious connector (read only): a threat of DNS Finder already judged Dangerous or Suspicious in a phishing reported to Suspicious says so in its details, and the Overview gets a Phishing reported block (mails, dangerous share, campaigns going on). Set with SUSPICIOUS_URL, SUSPICIOUS_API_KEY and SUSPICIOUS_VERIFY_SSL; empty, it is off.
  • Pause a connector: a Pause button in its panel stops its notifications, fetches and AI calls, and Resume starts them again, settings kept. A module's notifications can all be switched on or off from its heading in the Notifications tab.
  • Connectors: the state of each one in six words, a panel on the right with Overview, Configuration and Deliveries tabs, and twenty-five connectors per page.
  • AI usage: the Overview of an AI connector shows its calls, tokens and estimated cost (LiteLLM price list) over 7, 30 or 90 days. The AI summaries settings of the profile moved there.
  • Notifications by channel: a switch at the top of each column and a counter (5/5) per module and channel switch many at once.
  • Notifications for everyone: a user without the administration sees a Notifications page and chooses, module by module, what Watcher sends them by e-mail.
  • Edit opens the configuration of a connector directly.
  • Scheduled jobs: every job with its last run, its duration, what it counted and when it runs next (JobRun).

Profile & Interface

  • Themes: Clay and Clay Light (glass panels), a Light and a Dark section with filters, and display settings kept on the account.
  • Profile: avatar (a photo can be uploaded: JPEG, PNG or WebP up to 2 MB, cut square and written again as a small JPEG), password and My activity over today, 7 or 30 days. A "Very small" text size replaces the zoom of 3.8.0.
  • Name: the sign-in page, the menu, the README and the documentation say "Cyber Threat Intelligence & Hunting Platform", like the GitHub description. On Darkly the icons next to the titles and the buttons take the blue of the menu.
  • Help menu: the tour of the current page and a link to the support. WATCHER_DOCS_URL and WATCHER_SUPPORT_EMAIL set the documentation address and the support address.
  • Global search: Ctrl+K opens a page or a tab, signs out, changes the theme and sets the effects.
  • Visitors: see every module. The ones that need an account are locked cards, and each page says what the module does with a Sign in to open it button.
  • Activity: a burst of thousands of changes shows once, whole, instead of counting up.
  • Summary of an import: the items are listed by pages (10, 25, 50 or 100), and the reason of an error says what is wrong without repeating the field.
  • Bulk add: a file (.txt or .csv) can be dropped in every form that adds several items. A list goes by batches of 200 with a progress bar, and Undo this import removes what it created.

Security

  • The certificate of TheHive is checked when THE_HIVE_VERIFY_SSL=True, for every call (it only applied to the connector test before). The default is still False.
  • E-mails escape what they display.
  • The page downloads and the screenshot browser only reach public addresses, checked when the connection opens.
  • Regular expressions of monitored pages that could freeze the server are refused.
  • Screenshots and the global search are rate limited, and a screenshot of a legitimate domain requires the right to change legitimate domains.
  • The HTML of the AI summaries is cleaned before it is stored, notified or shown.
  • A visitor can no longer have a keyword summary written: it answers 403.
  • The token of the session of the browser is kept in an httpOnly cookie instead of localStorage, and the OIDC callback no longer puts it in the address (?sso_token=). A script keeps using the Authorization header, which is unchanged (#314).

Tests & CI

  • Cypress specs read their public values with Cypress.expose() and the configuration sets allowCypressEnv: false.
  • The github-pages workflow builds the documentation.

Documentation

  • Tours in the guide: the GIFs of the README (Overview, Threats Watcher, domains, Cyber Watch, connectors, themes...) are shown on the pages of the guide they belong to.
  • The site is built with Zensical (MkDocs-compatible) from the README.md and the docstrings. Sphinx and the committed HTML are gone.

Dependencies

  • Bump django from 6.0.7 to 6.0.11 (December security fixes: SQL injection, cache poisoning, admin information leak), djangorestframework from 3.17.1 to 3.18.3 and django-rest-knox from 5.0.4 to 6.0.0.
  • Bump litellm from 1.95.0 to 1.111.0, openai from 2.53.0 to 3.59.0 and numpy from 1.26.4 to 2.5.5.
  • Bump transformers from 5.12.1 to 5.24.1, tokenizers from 0.22.2 to 0.23.3, cryptography from 50.0.0 to 50.0.2, dnspython from 2.8.0 to 2.9.2, django-auth-ldap from 5.3.0 to 5.4.0 and django-import-export from 4.4.1 to 4.4.6.
  • Bump axios to 1.21.1, @mui/material to 9.6.0, @mui/x-charts to 9.18.1, react-router to 8.5.3 and vite to 8.3.8. npm audit reports no vulnerability (@dicebear/* 9.4.3 fixes an SVG injection, follow-redirects 1.16.3).
  • django stays on 6.0: Django 6.1 requires MySQL 8.4, and Watcher runs on MySQL 8.0. pymisp stays on 2.5.34.1: 3.0 needs python-dateutil 3, which litellm does not accept yet.
  • The image is lighter: the documentation tools (requirements-docs.txt), nltk (nothing used it), git, the test folders of the packages and the language model are no longer in it.
  • package.json declares engines.node: the frontend builds with Node 20.19 or 22.12 and later.

Full Changelog: v3.8.0...v4.0.0