A local SQLite based Threat Intelligence ETL and SOC analyst triage pipeline (kev_etl.py) built with Python. Ingesting the CISA Known Exploited Vulnerabilities (KEV) catalog and optionally enriches the threat_intel.db with any recent Indicators of Compromise (IOCs) from abuse.ch ThreatFox.
- Automated ETL Pipeline (
--sync): Extracts, normalizes, deduplicates, and upserts vulnerability records into a local SQLite database (threat_intel.db), reporting newly added CVEs on each run. - Multi-Feed Enrichment (
--threatfox): Optionally ingests recent IOCs (IPs, domains, URLs, file hashes, and malware family metadata) from abuse.ch ThreatFox into a dedicatedthreatfox_iocstable. - Fast Local SOC Triage: Filter stored vulnerabilities by vendor, specific CVE ID, known ransomware usage, or upcoming/overdue remediation deadlines (
--due-days). - Detailed Remediation View (
--details): Inspect full vulnerability descriptions, CISA required actions, and notes directly in the terminal. - Portable Reporting (
--export): Export any filtered triage query tokev_export.csvorkev_export.json.
- Python: 3.10+
- Dependencies:
pandasrequests
-
Clone or navigate to the project directory:
cd ~/projects/ThreatIntelETL
-
Create and activate a virtual environment:
python3 -m venv .venv source .venv/bin/activate -
Install required packages:
pip install pandas requests
- Authentication: None required (public JSON feed).
- Target Table:
cisa_kev
ThreatFox requires a free abuse.ch Auth-Key supplied via the ABUSECH_AUTH_KEY environment variable:
- Register or log in at the abuse.ch Authentication Portal and generate an
Auth-Key. - Export the key in your terminal session before running a sync:
export ABUSECH_AUTH_KEY="your_auth_key_here"
Note: If
ABUSECH_AUTH_KEYis not set,--syncwill still updatecisa_kevnormally and gracefully skip ThreatFox ingestion.
Sync the CISA KEV catalog:
python3 kev_etl.py --syncSync both CISA KEV and the last 3 days of ThreatFox IOCs (1–7 days supported):
export ABUSECH_AUTH_KEY="your_auth_key_here"
python3 kev_etl.py --sync --threatfox --days 3Show the 15 most recently added KEV entries (default query behavior):
python3 kev_etl.pyFilter by vendor and known ransomware campaign usage:
python3 kev_etl.py --vendor Microsoft --ransomwareLook up a specific CVE with full description and required action:
python3 kev_etl.py --cve CVE-2024-21413 --detailsFind CVEs due within the next 7 days (including overdue items) linked to ransomware:
python3 kev_etl.py --due-days 7 --ransomwareExport matching records to CSV or JSON:
python3 kev_etl.py --vendor Microsoft --ransomware --export csv
python3 kev_etl.py --due-days 14 --limit 25 --export json| Flag | Description |
|---|---|
--sync |
Run the Extract -> Transform -> Load pipeline against the CISA KEV feed. |
--threatfox |
Include ThreatFox recent IOCs during --sync (requires ABUSECH_AUTH_KEY). |
--days N |
Lookback window in days (1–7, default: 3) for ThreatFox IOC ingestion. |
--vendor TEXT |
Case-insensitive substring filter on the vendor column (e.g., Microsoft). |
--cve CVE-ID |
Look up an exact CVE identifier (e.g., CVE-2024-21413). |
--ransomware |
Filter to vulnerabilities where ransomware_use is Known. |
--due-days N |
Show CVEs with a due_date on or before N days from today (sorted by deadline). |
--details |
Print full vulnerability names, descriptions, required actions, and notes. |
--export {csv,json} |
Write query results to kev_export.csv or kev_export.json. |
--limit N |
Maximum number of records to display or export (default: 15). |
cisa_kev: Keyed bycve_id, storingvendor,product,vuln_name,date_added,due_date,ransomware_use,description,required_action,notes, andingested_at.threatfox_iocs: Keyed byioc_id, storingioc_value,ioc_type,threat_type,malware,confidence,first_seen,reporter,tags, andingested_at.
In support data wrangling and the transformation concepts used within this pipeline and project see docs and reference below:
- Data Analysis with Python (NumPy, Matplotlib, and Pandas) by Bernd Klein
python-course.eu- Relevant concepts applied in
kev_etl.py: PandasDataFrameconstruction, column mapping, normalization, handling missing/NaNvalues, deduplication and exporting the structured data to CSV and JSON.
- Relevant concepts applied in