Post

Building IOC&YARA MGMT โ†’ ZIoCHub - From IIS Text Files to a Modern IOC Management Platform

Building IOC&YARA MGMT โ†’ ZIoCHub - From IIS Text Files to a Modern IOC Management Platform

The Story Behind ZIoCHub ๐Ÿš€

So, hereโ€™s the thingโ€ฆ ๐Ÿ˜…

Anyone whoโ€™s been following my work knows that about a year ago, I built a system based on IIS that had one simple goal: to serve IOC feeds from the SOC team to various security systems in the network. I didnโ€™t overthink it - just made something super simple based on TXT files.

โ€œItโ€™s just text files, how complicated can it be?โ€ ๐Ÿค”

Well, it workedโ€ฆ but you know how these things go. ๐Ÿคทโ€โ™‚๏ธ

Then the SOC team grew, and suddenly there were way more requirements popping up everywhere like mushrooms after rain:

  • โŒ No tracking of who submitted what (whoops, forgot to add that!)
  • โŒ Junior analysts making mistakes (putting hashes in URL files, forgetting to add their names, not documenting datesโ€ฆ classic!)
  • โŒ Need for temporary IOC blocking (because sometimes you just need to block something for a week, not forever)
  • โŒ Need to track IOCs and remove duplicates (because apparently copy-paste is hard)
  • โŒ And moreโ€ฆ and moreโ€ฆ and MORE! ๐Ÿ˜ค

โ€œFeature creep? Whatโ€™s that?โ€ - Me, probably ๐Ÿคฆโ€โ™‚๏ธ

At first, I built a simple web system that allowed analysts to update IOCs through the web interface. It gave a very minimal solution (think: โ€œit works on my machineโ€ level of minimal), but as time passed, the need for something more comprehensive kept growing.

โ€œJust one more featureโ€ฆโ€ - Famous last words ๐ŸŽญ

So I decided to dust off the old development lab (literally, there was dust ๐Ÿ•ท๏ธ) and write some proper code on Linux! ๐Ÿง

Since we have a MISP system running on Ubuntu, I decided to develop the new system alongside it - it would receive data from MISP and from analysts, and generate feeds for the various security systems in the organization.

โ€œThis time Iโ€™ll do it right!โ€ - Me, definitely this time ๐Ÿ’ช

That evolution is today ZIoCHub โ€“ the same platform, renamed and grown into ZIoCHub v2.0 Beta: a full IOC & YARA management portal for SOC operations, still 100% offline-first.


Meet ZIoCHub v2.0 Beta ๐ŸŽฏ

This project is particularly close to my heart ๐Ÿ’š, mainly because it combines several open-source projects I already knew and loved, but specifically focuses on one thing: IOCs (and YARA). The goal was simple: create something that analysts would actually want to use, not just tolerate. Something that gives them the drive to do more cybersecurity-related work instead of just staring at screens and filling out forms.

โ€œIf theyโ€™re going to spend 8 hours a day on this, it better be enjoyable!โ€ - My inner UX designer ๐ŸŽจ

And you know what? It worked! The modern UI, smooth animations, and intuitive workflow actually made IOC managementโ€ฆ dare I say itโ€ฆ fun? Well, at least less painful! ๐Ÿ˜„


Standing on the Shoulders of (Open Source) Giants ๐Ÿงฑ

So hereโ€™s the thing about ZIoCHub โ€“ I didnโ€™t write everything from scratch. Iโ€™m not that crazy. ๐Ÿคช

I basically went on a shopping spree through the open-source aisle and grabbed everything that wasnโ€™t nailed down:

  • Flask for the web framework โ€“ because Django felt like bringing a tank to a knife fight ๐Ÿ”ช
  • Flask-Login for authentication โ€“ because writing session management from scratch is how you become the security incident ๐Ÿ”
  • Flask-SQLAlchemy for the ORM โ€“ because raw SQL strings are just stored procedures with extra anxiety ๐Ÿ˜ฐ
  • SQLite for the database โ€“ because when your server is air-gapped, telling the SOC team โ€œjust install PostgreSQLโ€ is a great way to get uninvited from lunch ๐Ÿฝ๏ธ
  • Tailwind CSS for styling โ€“ because life is too short to write margin-left: 12px for the 47th time ๐ŸŽจ
  • Chart.js for dashboards โ€“ because managers donโ€™t read tables, they read colorful lines going up ๐Ÿ“ˆ
  • vis.js for the campaign graph โ€“ because I wanted analysts to feel like theyโ€™re in a spy movie connecting red strings on a corkboard ๐Ÿ•ต๏ธ
  • Prism for syntax highlighting โ€“ because staring at monochrome YARA rules is a form of punishment ๐Ÿ˜ต
  • jsPDF + html2canvas for PDF export โ€“ because apparently โ€œjust screenshot itโ€ isnโ€™t a valid answer to โ€œcan I get a report?โ€ ๐Ÿ“„
  • Flag Icons for country flags โ€“ because IP addresses are boring, but IP addresses with tiny flags are suddenly interesting ๐Ÿณ๏ธ
  • marked + turndown for Markdown โ€“ because some analysts think in Markdown and others think in HTML, and I refuse to pick sides โš–๏ธ
  • geoip2 + MaxMind for GeoIP lookups โ€“ because knowing an IP is malicious is good, but knowing itโ€™s malicious and from somewhere specific is better ๐ŸŒ
  • ldap3 for LDAP/AD auth โ€“ because asking analysts to remember yet another password would have started a mutiny โš“
  • PyMISP for MISP integration โ€“ because manually copy-pasting IOCs from MISP defeats the entire purpose of having MISP ๐Ÿคฆ
  • dxlclient + dxltieclient for McAfee DXL/TIE โ€“ because when management asks โ€œbut what does ePO think about this hash?โ€ youโ€™d better have an answer ๐Ÿคท

At some point I realized I had more import statements than actual business logic. But hey โ€“ why reinvent the wheel when you can import 19 wheels and bolt them together into something beautiful? ๐Ÿ›žโœจ

โ€œGood artists create. Great artists pip install.โ€ โ€“ Definitely not Picasso ๐Ÿ–ผ๏ธ


What is ZIoCHub?

ZIoCHub is a modern IOC (Indicators of Compromise) and YARA rule management platform built specifically for SOC operations in offline/air-gapped environments. Analysts submit indicators; ZIoCHub stores them in a SQLite database; security devices consume plain-text feeds (and optionally TAXII 2.1 / STIX 2.1) for enforcement.

Key Features โœจ

  • ๐Ÿ”’ 100% Offline: No CDN, no external APIs; all assets and dependencies are local.
  • ๐Ÿ“Š Modern Glass UI: Glassmorphism design with light/dark mode and English/Hebrew (i18n).
  • ๐Ÿ—„๏ธ SQLite Backend: Single-file DB, easy backup and restore.
  • ๐Ÿ” Authentication: Local accounts, optional LDAP/AD, admin roles, profile (display name, avatar), change password, optional โ€œmust change passwordโ€ on first login.
  • ๐Ÿ“ก MISP Integration: Automatic IOC pull from a local MISP instance with configurable intervals.
  • ๐Ÿ“œ YARA Rule Management: Upload, approval workflow, quality scoring (10โ€“50 pts), campaign linking, syntax highlighting (Prism).
  • ๐ŸŽฏ Campaign Management: Visual graph (vis.js) of campaigns and associated IOCs (and YARA).
  • ๐Ÿ“ˆ Champs Analysis: Analyst leaderboard, multiple scoring methods (Weighted, Flat, By Type, Campaign Focus, Time Decay, Quality, Goal-Based, Smart), streak bonuses, team goals, rank tracking, activity spotlight, news ticker.
  • ๐Ÿ“‰ Feed Pulse: Real-time feed health (incoming/outgoing IOCs, anomalies) with sanity checks and analyst exclusions.
  • ๐Ÿ“‘ Intelligence Reports: Period-based reports (day/week/month) with KPIs, type distribution, feed health, analyst activity, export to PDF.
  • ๐ŸŒ Multi-vendor Feeds: Standard, Palo Alto (EDL), Checkpoint (CSV); plus YARA feeds and TAXII 2.1 / STIX 2.1 for clients (e.g. Cisco IronPort ESA).
  • ๐Ÿ“œ IOC History: Full lifecycle per IOC (created, edited, deleted, expired, excluded, unexcluded).
  • ๐Ÿ“ IOC Notes: Analyst notes per IOC (by type+value); notes survive IOC deletion cycles.
  • ๐Ÿ›ก๏ธ Allowlist / Safety Net: Admin-managed allowlist to prevent blocking critical infrastructure.
  • ๐Ÿ” Sanity Checks: Automatic anomaly detection (local IPs, short domains, critical infra).
  • ๐ŸŒ GeoIP Intelligence: Country, TLD, and email domain analytics; Rare Find badges.
  • ๐Ÿ”’ SSL/TLS: Certificate upload via Admin UI; HTTP-to-HTTPS redirect.
  • ๐Ÿ“‹ CEF / Syslog: Optional CEF audit logging with 48-hour local rotation and UDP syslog.

The UI โ€“ Screen by Screen (with placeholders for screenshots)

Below, each main tab (and Profile / Admin) has a placeholder image and a short description. Replace the image path with your own screenshot when you have it (e.g. under assets/images/ziochub/).


1. Live Stats

ZIoCHub โ€“ Live Stats dashboard

What you see here: Real-time dashboard with IOC counts by type (IP, Domain, URL, Email, Hash), Top Countries / TLDs / Email Domains leaderboards (with flag icons), and a live feed of the latest IOCs. Auto-refresh; all data is GeoIP-based and active (non-expired) only.


2. Feed Pulse

ZIoCHub โ€“ Feed Pulse

What you see here: Real-time feed health monitoring โ€“ incoming IOCs, outgoing (expired) IOCs, deletions, and Sanity anomalies (local IPs, short domains, critical infra). Analysts can mark anomalies as exclude/un-exclude to control what appears in the feed.


3. Search & Investigate

ZIoCHub โ€“ Search & Investigate

What you see here: Full-text search across all IOCs with filters: value, type, ticket, user, date, expiration status. Inline edit and delete; view full history per IOC (created, edited, deleted, expired, excluded, unexcluded).


4. Submit IOCs

ZIoCHub โ€“ Submit IOCs

What you see here: Single and bulk submission. Single: auto type detection, refanger cleaning, TTL, campaign, allowlist check. Bulk: CSV and TXT import with preview (staging), auto-detection, metadata extraction, and conflict handling before final submit.


5. YARA Manager

ZIoCHub โ€“ YARA Manager

What you see here: Upload .yar files, preview, edit, approve/reject (workflow). Quality scoring (10โ€“50 pts), campaign linking, and syntax highlighting (Prism) for easier reading.


6. Champs Analysis

ZIoCHub โ€“ Champs Analysis

What you see here: Analyst leaderboard with eight scoring methods (Weighted, Flat, By Type, Campaign Focus, Time Decay, Quality, Goal-Based, Smart), streak bonuses, rank trends, team goals, Activity Spotlight, and News Ticker. The method is selected in Admin โ†’ Scoring.


7. Campaign Graph

ZIoCHub โ€“ Campaign Graph

What you see here: Interactive graph (vis.js) of campaigns and their linked IOCs (and YARA). Create, link, and export to CSV.


8. Hunterโ€™s Playbook

ZIoCHub โ€“ Hunter's Playbook

What you see here: Customizable quick-links panel (e.g. VirusTotal, OTX) for external investigation tools.


9. Intelligence Reports

ZIoCHub โ€“ Intelligence Reports

What you see here: Period-based reports (day/week/month): KPIs, type distribution, feed health score, analyst activity, comparison vs. previous period. Export to PDF (html2canvas + jsPDF).


10. Profile & Change Password

ZIoCHub โ€“ Profile & Change Password

What you see here: User profile โ€“ display name, avatar, role description, email โ€“ and change-password flow. Admins can enforce โ€œmust change passwordโ€ on first login.


11. Admin Panel

ZIoCHub โ€“ Admin Panel

What you see here: User management (create, edit, deactivate, avatars, system users), settings (Auth: local/LDAP, LDAP, MISP, CEF/Syslog UDP), Allowlist editor, SSL/TLS certificate upload, and Champs scoring method (Weighted, Flat, By Type, Campaign Focus, Time Decay, Quality, Goal-Based, Smart).


The Architecture ๐Ÿ—๏ธ

Why SQLite?

For an offline SOC environment, SQLite is perfect:

  • โœ… Single-file database โ€“ easy backup/restore
  • โœ… No external dependencies
  • โœ… Fast and reliable
  • โœ… Works on any platform

Why Flask?

Flask gives us:

  • โœ… Lightweight and flexible
  • โœ… Easy to deploy
  • โœ… Perfect for offline environments
  • โœ… Great for REST APIs and server-rendered pages

Feed Generation

ZIoCHub exposes many feed endpoints:

Standard: /feed/ip, /feed/domain, /feed/url, /feed/hash, /feed/md5, /feed/sha1, /feed/sha256
Palo Alto (EDL): /feed/pa/ip, /feed/pa/domain, /feed/pa/url (URLs without protocol), /feed/pa/md5, etc.
Checkpoint (CSV): /feed/cp/ip, /feed/cp/domain, etc. with observe numbers
YARA: /feed/yara-list, /feed/yara-content/<filename>
TAXII 2.1 / STIX 2.1: Discovery, API roots, collection indicators for active IOCs (e.g. for Cisco IronPort ESA)

Only active (non-expired) IOCs are included in feeds. Content-Type for text feeds: text/plain.


Security Features ๐Ÿ”

  • Authentication: Flask-Login; optional LDAP/AD with local fallback.
  • Passwords: Scrypt hashing (Werkzeug).
  • Input validation: Regex for all IOC types; refanger for obfuscated input.
  • Allowlist: Prevents blocking critical assets.
  • SQL injection: SQLAlchemy ORM (parameterized queries).
  • SSL/TLS: Certificate upload via Admin; gunicorn serves HTTPS; HTTP redirect to HTTPS.
  • Audit: CEF format; 48-hour local rotation; optional UDP syslog.
  • Feed endpoints: Public (no auth) โ€“ restrict access via firewall.
  • DEV_MODE: Must not be used in production (dev auto-login, LDAP mock).

API & Integration ๐Ÿ”Œ

ZIoCHub provides API endpoints for IOC CRUD, search, bulk submit, campaigns, YARA, reports, stats, and admin. Authentication is required (session/cookie). Example usage and exact paths are documented in the project README (Installation, API Endpoints, Feed Endpoints). Health checks and deployment details (ports, systemd) are also in the README.


Deployment ๐Ÿš€

Online (Linux with Internet)

1
2
3
scp -r ZIoCHub/ user@server:/tmp/
cd /tmp/ZIoCHub
sudo ./setup.sh

Offline (Air-Gapped)

On a machine with internet:

1
2
./package_offline.sh
# Transfer ziochub_installer.zip to server

On the target server:

1
2
3
unzip ziochub_installer.zip -d ziochub_install
cd ziochub_install
sudo ./setup.sh --offline

Upgrade Existing

1
2
3
sudo ./setup.sh --upgrade
# or
sudo ./setup.sh --upgrade --offline

Default credentials: admin / admin. Change immediately in production.


What Makes This Special? ๐ŸŒŸ

  1. Offline-first โ€“ No CDN, no external calls; everything local.
  2. Analyst-centric โ€“ UI designed so analysts actually want to use it (Champs, Playbook, Reports).
  3. Feed diversity โ€“ One system, multiple outputs (Standard, PA, CP, YARA, TAXII 2.1).
  4. Campaign visualization โ€“ vis.js graph of campaigns and IOCs.
  5. Safety first โ€“ Allowlist, sanity checks, full IOC history and notes.

Conclusion ๐ŸŽ‰

What started as a simple IIS + text-file solution evolved into ZIoCHub v2.0 Beta: a full IOC & YARA management platform for SOC teams in offline/air-gapped environments. The combination of modern UI, robust backend, MISP/TAXII integration, and 100% offline architecture makes it a single place to submit, track, and feed IOCs and YARA to security devices.

If youโ€™re in a SOC and need offline IOC (and YARA) management with multiple feed formats and TAXII 2.1 support, take a look at ZIoCHub.


Get Started

Repository: https://github.com/Zwerd/ziochub

Documentation: See the project README for installation, ports, systemd, UI overview, feed endpoints, API, MISP integration, configuration, maintenance, and troubleshooting.

Highlights:

  • โœ… 100% offline; multi-format feeds (Standard, PA, CP, YARA, TAXII 2.1)
  • โœ… Authentication (local + optional LDAP), profiles, Champs, Feed Pulse
  • โœ… IOC history, IOC notes, allowlist, sanity checks
  • โœ… Intelligence reports with PDF export
  • โœ… English & Hebrew (i18n)

Built with โค๏ธ for SOC teams who need offline IOC & YARA management

This post is licensed under CC BY 4.0 by the author.