A comprehensive web-based platform for managing, enriching, and analyzing Indicators of Compromise (IOCs). Built for Security Operations Centers (SOCs), Computer Emergency Response Teams (CERTs), and threat intelligence teams.
- IOC Management: Create, read, update, and delete IOCs with support for multiple indicator types
- Supported IOC Types: IPv4, IPv6, Domain, URL, MD5, SHA1, SHA256, SHA512, SSDEEP, Email
- Risk Classification: Severity levels (Low, Medium, High, Critical) with confidence scoring
- TLP Support: Traffic Light Protocol (WHITE, GREEN, AMBER, RED) for information sharing
- Tagging System: Organize IOCs with customizable colored tags
- IOC Expiration: Automatic TTL-based expiration with configurable policies
- Collaborative Review: Mark IOCs for review to enable collaborative editing by any user
- Lifecycle Management: Full approval workflow with Draft β In Review β Active β Archived states
- Operating System Tagging: Tag hash-based IOCs (MD5, SHA1, SHA256, SHA512, SSDEEP) with target OS (Windows x64/x86, Linux ELF, macOS, Android APK, and more)
- IOC Sharing: Generate anonymized shareable links for individual IOCs
- VirusTotal Integration: Automatic malware analysis, reputation scoring, and MITRE ATT&CK mapping for hashes and URLs
- URLScan.io Integration: URL screenshot, verdict, and page analysis
- GeoIP Lookup: Geographic location data for IP addresses (MaxMind GeoLite2)
- ASN Lookup: Autonomous System Number and organization information
- Domain Enrichment: WHOIS data, DNS records (A, AAAA, MX, NS, TXT), and SSL/TLS certificate details
- URL Enrichment: HTTP headers, server fingerprinting, technology detection, security headers, and favicon hashing
- Smart Caching: Intelligent per-service database caching to minimize API calls
- Cache Refresh: Force-refresh stale enrichment data with the Refresh IOC Enrichment button
- IOC Relationships: Link related indicators (resolves_to, contains, communicates_with, downloads_from, drops, connects_to, etc.)
- Relationship Graph: Interactive multi-hop visualization of IOC relationships powered by Cytoscape.js (1β3 hop traversal, multiple layouts, dark mode support)
- Comments & Discussions: Threaded comments with @mentions and Markdown support
- YARA Rule Generation: Auto-generate YARA and YARA-X detection rules for all IOC types
- Hunting Queries: Auto-generate ready-to-use threat hunting queries for Splunk, KQL (Microsoft Sentinel / Defender XDR), Sigma, and CrowdStrike Falcon
- STIX 2.1 Export: Export IOCs in STIX format for TAXII sharing
- Audit Logging: Complete audit trail of all actions with user tracking
- Change Tracking: Track who created and last updated each IOC
- Email Reports: Automated daily and weekly reports with statistics and trends
- Lifecycle Digest: Daily email digest of pending approvals, approvals, rejections, and archives
- Dashboard: Real-time metrics and visualizations
- Search & Filter: Advanced filtering by type, severity, tags, lifecycle status, and date ranges
- Bulk Import: Import multiple IOCs at once
- Dark Mode: Toggle between light and dark themes with persistent preference
- Responsive Design: Optimized for desktop and mobile browsers
- Relationship Graph View: Visual graph alongside the traditional list view on IOC detail pages
- Admin Panel: Centralized administration interface
- Reports Configuration: Web-based email/SMTP configuration with hot-reload
- API Key Management: Secure API key configuration (VirusTotal, URLScan.io, etc.)
- Audit Logs Viewer: Search, filter, and purge audit logs with clickable resource links
- User Management: Create, edit, and manage user accounts and permissions
- Reviewer Management: Grant or revoke the reviewer flag per user (independent of role)
- Operating System Management: Configure target OS options for hash IOCs
- Role-Based Access Control (RBAC): Admin, User, and Viewer roles
- Multi-Factor Authentication (MFA): Optional per-user TOTP-based 2FA with QR code setup, backup codes, and rate limiting
- User Management: User registration, authentication, and session management
- Registration Control: Enable/disable public registration
- Comprehensive Audit Trail: Track all user actions, IOC changes, and system events
- Admin Audit Viewer: Advanced search and filtering of audit logs with smart resource linking
- Python 3.8+
- SQLite (default) or PostgreSQL/MySQL
- SMTP server (for email reports)
- VirusTotal API key (optional)
- URLScan.io API key (optional)
- MaxMind GeoLite2 databases (optional, for GeoIP/ASN)
-
Clone the repository
git clone https://github.com/JMousqueton/IoCManager.git cd IoCManager -
Create virtual environment
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env with your settings (API keys, SMTP, etc.) nano .env -
Initialize database
python scripts/init_db.py
-
Download GeoIP database (optional)
python scripts/download_asn_db.py
-
Start the application
python run.py
-
Access the application
- Open browser: http://localhost:5000
- Default admin credentials:
admin/admin(change immediately!)
Configuration can be done via:
.envfile - Edit manually for initial setup- Admin Panel (recommended) - Web-based configuration with hot-reload for:
- API keys (VirusTotal, URLScan.io)
- Email/SMTP settings
- Report recipients
Key configuration options in .env:
# Flask Configuration
SECRET_KEY=your-secret-key-here
FLASK_ENV=development
FLASK_DEBUG=True
# Server Binding
FLASK_HOST=127.0.0.1
FLASK_PORT=5000
# VirusTotal API
VIRUSTOTAL_API_KEY=your-virustotal-api-key
VIRUSTOTAL_CACHE_DAYS=7 # Cache duration (default: 7 days)
VIRUSTOTAL_RATE_LIMIT=4 # Requests per minute (free tier: 4)
# URLScan.io API
URLSCAN_API_KEY=your-urlscan-api-key
URLSCAN_CACHE_DAYS=7
URLSCAN_RATE_LIMIT=1
# Domain & URL Enrichment Cache
DOMAIN_ENRICHMENT_CACHE_DAYS=30
URL_ENRICHMENT_CACHE_DAYS=7
# Email Reports
REPORT_ENABLED=True
DAILY_REPORT_RECIPIENTS=cert-team@example.com
WEEKLY_REPORT_RECIPIENTS=cert-team@example.com,management@example.com
# SMTP Configuration
MAIL_SERVER=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=your-email@example.com
MAIL_PASSWORD=your-app-password
# IOC Expiration
IOC_DEFAULT_TTL_DAYS=90
IOC_AUTO_EXPIRE_ENABLED=True
# IOC Lifecycle Management
DRAFT_RETENTION_DAYS=30 # Auto-archive drafts older than N days
NOTIFICATION_RETENTION_DAYS=7 # Purge processed notifications after N days
# Authentication
REGISTRATION_ENABLED=False # Disable public registrationSee .env.example for all available options.
- Navigate to Add IOC from the menu
- Select IOC type (IPv4, Domain, Hash, etc.)
- Enter the IOC value
- Set severity, confidence, and TLP level
- Add description and tags
- For hash types (MD5, SHA1, SHA256, etc.), optionally select a target Operating System
- Choose a Lifecycle Status: To be reviewed (default), Active, or Draft
- Click Create IOC
IOCs created as To be reviewed are immediately placed in the approval queue and reviewers are notified.
Click Enrich IOC on any IOC detail page to automatically fetch threat intelligence:
- IP addresses β GeoIP location, ASN, and organization data
- Hashes β VirusTotal malware analysis, detection rate, MITRE ATT&CK techniques
- URLs β URLScan.io screenshot/verdict, VirusTotal URL analysis, HTTP headers, server fingerprinting, GeoIP of resolved IP
- Domains β WHOIS registration data, DNS records (A, AAAA, MX, NS, TXT), SSL/TLS certificates
Once enriched, the button changes to Refresh IOC Enrichment β clicking it clears the service cache and re-fetches fresh data from each source.
Link related IOCs together:
- Open an IOC detail page
- Click Add Relationship in the Related IOCs section
- Search for target IOC
- Select relationship type (resolves_to, contains, downloads_from, etc.)
- Add optional notes
The Graph View tab on the detail page visualizes the full relationship network with configurable hop depth (1β3).
- Open any IOC detail page
- Click Generate YARA
- Copy or download the rule (
.yar) - Toggle to YARA-X syntax if needed (
.yarax)
Supported for all IOC types: hashes (uses VT enrichment for additional hashes), IPs, domains, URLs.
- Open any IOC detail page
- Click Hunting Queries
- Select a platform tab: Splunk, KQL / Sentinel, Sigma, or CrowdStrike
- Copy to clipboard or download with the native file extension (
.spl,.kql,.yml,.fql)
Queries use enrichment data where available (e.g. all known hashes from VirusTotal). Timeframe defaults to the last 30 days β adjust index names and table names for your environment.
Add comments to IOCs for collaboration:
- Use Markdown formatting for rich text
- @mention users to notify them
- Reply to create threaded discussions
- Edit/Delete your own comments
Click Share on any IOC detail page to copy an anonymized shareable link. The shared view strips sensitive metadata for safe external sharing.
IOCs follow a structured approval workflow to ensure quality and accountability.
| State | Description |
|---|---|
| Draft | Work in progress β only the creator and admins can see and edit it |
| In Review | Submitted for approval β reviewers are notified and can approve or reject |
| Active | Approved and operational β visible to all users |
| Archived | Retired β kept for historical reference, no longer active |
Draft βββ In Review βββ Active βββ Archived
β β
ββββ (rejected) βββ Draft ββββ Restore
- Create an IOC β it defaults to In Review and reviewers are notified automatically
- Alternatively, save as Draft to continue editing before submitting
- On a Draft IOC, click Submit for Review when ready
- Once approved, the IOC becomes Active
- If rejected, the IOC returns to Draft with a rejection reason you can address
- A badge in the navbar shows the number of IOCs pending review
- Navigate to Approvals in the top menu to see the full queue
- On any IOC in review, click Approve to make it active or Reject with a reason
- Reviewers can also Archive active IOCs and Restore archived ones
On any Active IOC detail page:
- Toggle the "To be reviewed" switch
- The lifecycle status automatically moves to In Review and reviewers are notified
- Toggling it off restores the status to Active
The reviewer flag is independent of the user's role and can be granted to any user:
- Navigate to Admin β Reviewers
- Click Grant next to any user to give them reviewer privileges
- Click Revoke to remove reviewer access
Enhance account security with optional TOTP-based two-factor authentication:
Enabling MFA:
- Navigate to your profile page
- Click "Enable MFA" in the Multi-Factor Authentication section
- Scan the QR code with your authenticator app (Google Authenticator, Authy, Microsoft Authenticator)
- Enter the 6-digit verification code to confirm setup
- Save your 10 backup codes in a secure location (each can only be used once)
Logging in with MFA:
- Enter your username and password as usual
- You'll be redirected to an MFA verification page
- Enter the 6-digit code from your authenticator app
- Alternatively, check "Use a backup code instead" and enter one of your backup codes
Managing MFA:
- View Backup Codes: See how many backup codes you have remaining
- Regenerate Codes: Generate new backup codes if you've used most of them (requires MFA verification)
- Disable MFA: Turn off MFA protection (requires password + current MFA code)
Security Features:
- Rate limiting: Maximum 10 failed verification attempts per 15 minutes
- Session timeout: MFA verification must be completed within 5 minutes
- Backup codes: 10 one-time use codes for device loss scenarios
- Audit logging: All MFA events (enable, disable, login attempts) are logged
- Admin visibility: Admins can see which users have MFA enabled
Note: MFA is optional and configured per-user. Existing users are not affected when MFA is added to the system.
Access comprehensive administration features:
API Keys Tab:
- Configure VirusTotal API key
- Configure URLScan.io API key
- Hot-reload configuration without restart
Reports Tab:
- Configure SMTP server settings (server, port, TLS/SSL)
- Set email credentials
- Configure report recipients (daily/weekly)
- Enable/disable automated reports
- Changes apply immediately without restart
Audit Logs Tab:
- Search and filter audit logs by:
- Resource type (IOC, User, Tag, Configuration, Comment)
- Action (CREATE, UPDATE, DELETE, LOGIN, ENRICH, EXPORT, SEARCH)
- User
- Date range
- Smart filtering: Selecting "IOC" includes IOC, IOCRelationship, and Comment entries
- Click on resources to view details (opens in new tab)
- Purge logs older than 30 days
Users Tab:
- Create, edit, and delete user accounts
- Assign roles (Admin, User, Viewer)
- Activate/deactivate accounts
- View user statistics (IOCs created, audit logs)
Reviewers Tab:
- Grant or revoke reviewer privileges per user
- Independent of the user's role
Operating Systems Tab:
- Manage target OS options displayed for hash-type IOCs
- Customize icons and descriptions
Configure automated reports in .env:
REPORT_ENABLED=True
DAILY_REPORT_RECIPIENTS=team@example.com
WEEKLY_REPORT_RECIPIENTS=team@example.com,management@example.comSchedule with cron:
# Daily report at 8 AM
0 8 * * * cd /path/to/IoCManager && /path/to/venv/bin/python scripts/send_daily_report.py
# Weekly report at 8 AM every Monday
0 8 * * 1 cd /path/to/IoCManager && /path/to/venv/bin/python scripts/send_weekly_report.pySchedule lifecycle tasks with cron:
# Daily lifecycle digest email (notifies reviewers of pending IOCs and creators of decisions)
0 8 * * * cd /path/to/IoCManager && PYTHONPATH=. venv/bin/python3 scripts/send_daily_lifecycle_digest.py >> /var/log/iocmanager-digest.log 2>&1
# Retention policy enforcement (auto-archives stale drafts and expired active IOCs)
0 2 * * * cd /path/to/IoCManager && PYTHONPATH=. venv/bin/python3 scripts/enforce_retention_policies.py >> /var/log/iocmanager-retention.log 2>&1Configure retention in .env:
DRAFT_RETENTION_DAYS=30 # Drafts untouched for 30 days β auto-archived
NOTIFICATION_RETENTION_DAYS=7 # Processed notifications purged after 7 daysAutomatically expire old IOCs:
# Configure in .env
IOC_DEFAULT_TTL_DAYS=90
IOC_AUTO_EXPIRE_ENABLED=True
# Schedule expiration check
0 2 * * * cd /path/to/IoCManager && /path/to/venv/bin/python scripts/expire_iocs.pyUse update.sh for production deployments:
- Git update checking with backup of code and database
- Dependency management and automatic migration runs
- Systemd service restart (
iocmanager) and health check - Automatic rollback on failure
- Logs to
/var/log/iocmanager-update.log
What's Logged:
- User authentication (LOGIN, LOGOUT)
- IOC operations (CREATE, UPDATE, DELETE, ENRICH, EXPORT)
- User management (CREATE, UPDATE, DELETE users)
- Configuration changes (API keys, email settings)
- Comment activity
- Review and lifecycle status changes
Accessing Audit Logs (Admin only):
- Navigate to Admin β Audit Logs
- Use filters to find specific events
- Click on resources for detailed view
- Use purge button to clean old logs
Export IOCs for TAXII sharing:
- Navigate to IOC detail page
- Click Export STIX
- Download STIX 2.1 JSON bundle
| Role | Permissions |
|---|---|
| Admin | Full access: manage users, delete any content, access admin panel, configure system settings. Can approve/reject/archive/restore IOCs. |
| User | Create and edit own IOCs and comments. Can submit IOCs for review. Can edit IOCs marked for review. |
| Viewer | Read-only access to IOCs and comments |
The Reviewer flag is a permission modifier independent of the user role. It can be combined with any role:
| Permission | Viewer | User | Admin | Reviewer (any role) |
|---|---|---|---|---|
| View IOCs | β | β | β | β |
| Create IOCs | β | β | ||
| Edit own IOCs | β | β | ||
| Submit for review | β | β | ||
| Approve / Reject | β | β | ||
| Archive / Restore | β | β | ||
| Admin panel | β |
Reviewer access is managed in Admin β Reviewers.
The dashboard provides:
- Total IOCs count
- Active vs. Inactive indicators
- Severity distribution
- Recently added IOCs
- Enrichment statistics
- User activity
- CSRF Protection: All forms protected with CSRF tokens
- Session Management: Secure session handling with configurable timeouts
- Password Hashing: Werkzeug password hashing (bcrypt)
- SQL Injection Prevention: SQLAlchemy ORM with parameterized queries
- XSS Prevention: Markdown sanitization with Bleach
- Multi-Factor Authentication (MFA): Optional per-user TOTP-based 2FA:
- QR code setup with standard authenticator apps
- 10 one-time backup recovery codes per user
- Rate limiting (10 attempts per 15 minutes)
- Encrypted secret storage using Fernet symmetric encryption
- Backup codes hashed with bcrypt
- Complete audit trail of MFA events
- Comprehensive Audit Logging: All user actions, IOC operations, and configuration changes
IoCManager/
βββ app/
β βββ __init__.py # Flask app factory
β βββ config.py # Configuration
β βββ models/ # Database models
β β βββ ioc.py
β β βββ user.py
β β βββ comment.py
β β βββ cache.py
β β βββ notification.py
β β βββ operating_system.py
β β βββ ...
β βββ routes/ # Flask blueprints
β β βββ ioc.py
β β βββ auth.py
β β βββ admin.py
β β βββ comment.py
β β βββ ...
β βββ services/ # Business logic
β β βββ virustotal.py
β β βββ urlscan.py
β β βββ geoip.py
β β βββ domain_enrichment.py
β β βββ url_enrichment.py
β β βββ yara_generator.py
β β βββ hunting_query_generator.py
β β βββ report_generator.py
β β βββ notification_service.py
β βββ utils/ # Utilities
β β βββ markdown.py
β βββ templates/ # Jinja2 templates
βββ scripts/ # Management & automation scripts
β βββ init_db.py
β βββ download_asn_db.py
β βββ send_daily_report.py
β βββ send_weekly_report.py
β βββ expire_iocs.py
β βββ send_daily_lifecycle_digest.py
β βββ enforce_retention_policies.py
βββ instance/ # Instance-specific files (DB, uploads)
βββ update.sh # Automated deployment script
βββ .env # Environment variables
βββ requirements.txt # Python dependencies
βββ run.py # Application entry point
export FLASK_ENV=development
export FLASK_DEBUG=True
python run.pyContributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow PEP 8 style guide
- Write docstrings for functions and classes
- Add tests for new features
- Update documentation as needed
Issue: Email reports not sending
- Solution: Check SMTP settings in
.env, verifyREPORT_ENABLED=True
Issue: VirusTotal enrichment failing
- Solution: Verify API key, check rate limits (4 requests/minute for free tier)
Issue: GeoIP data not available
- Solution: Run
python scripts/download_asn_db.pyto download MaxMind databases
Issue: Permission denied errors
- Solution: Ensure scripts are executable:
chmod +x scripts/*.py
This project is licensed under the MIT License - see the LICENSE file for details.
- Flask - Web framework
- Bootstrap 5 - UI framework
- Cytoscape.js - Graph visualization
- VirusTotal - Malware analysis
- URLScan.io - URL analysis
- MaxMind - GeoIP data
- YARA - Malware detection rules
- STIX - Threat intelligence format
- Sigma - Generic SIEM detection format
- Project Link: https://github.com/JMousqueton/IoCManager
- Issues: https://github.com/JMousqueton/IoCManager/issues
Give a βοΈ if this project helped you!
Built with β€οΈ for the cybersecurity community
