Connect CTI Forecast to your tools
Every guide uses your API key (shown in My account) in place of YOUR_KEY. URLs that contain the key give access to your account: do not publish them.
OpenCTI, Microsoft Sentinel, MISP · TAXII 2.1 PRO
The recommended method: your tool polls CTI Forecast on its own, continuously. In every case: server address https://ctiforecast.com/taxii2/, any username, password = your API key.
When the tool allows it, send the key in a header (X-API-Key: YOUR_KEY) or with Basic authentication (password = your key): this is the case for FortiGate, OPNsense, MISP, Wazuh, Splunk and the scripts below. A key written in the URL (?key=) can end up in the logs of the firewall, a proxy or the tool: keep it for tools that only accept a URL (pfSense, Sophos), and revoke the key in My account if the URL has been shared.
- OpenCTI: enable the TAXII2 connector with
TAXII2_DISCOVERY_URL=https://ctiforecast.com/taxii2/,TAXII2_USERNAME=client,TAXII2_PASSWORD=YOUR_KEY,TAXII2_V21=trueandTAXII2_COLLECTIONS=*.*to fetch everything (formatroot.collection). Check the exact variable names in the documentation for your OpenCTI version. - Microsoft Sentinel: Content hub → Threat Intelligence solution → Threat Intelligence - TAXII connector. API root:
https://ctiforecast.com/taxii2/api/, collection ID (see below), usernameclient, password = your API key, polling frequency: hourly. - MISP: use the misp-taxii tool or a STIX 2.1 import module with the same settings.
| Collection | ID |
|---|---|
| Malicious IPs | 77653c02-ccd7-55e5-8db8-85d421cfba7c |
| Malicious domains and URLs | 6d85c187-7ce5-561a-9cb0-d820a89fd099 |
| Malicious files | 60ef1a80-e85a-56e8-84b6-f6e51e8d3fb6 |
| Vulnerabilities | 00ae1b11-d2b2-550f-91d2-39efc6c29dd7 |
Firewalls: FortiGate · Palo Alto · Sophos · Stormshield · pfSense / OPNsense. Endpoints: Microsoft Defender. SIEM and platforms: Wazuh · MISP · OpenCTI / Sentinel (TAXII) · Splunk.
Useful blocklist options: header=0 (no comment lines), limit= (maximum number of entries, most reliable first), family=4 or 6 (IPv4 or IPv6 only).
The scripts and settings on this page (Defender, Wazuh, Splunk, TAXII/STIX, API examples) are also in our public repository github.com/ctiforecast/integrations (MIT licence). No key is ever stored there: each script reads it from the CTI_FORECAST_KEY variable.
pfSense and OPNsense · block malicious IPs
- Firewall → Aliases, URLs tab on pfSense. On OPNsense: Firewall → Aliases, then +.
- Type: URL Table (IPs). Name:
CTI_FORECAST_IP. - URL:
https://ctiforecast.com/v1/blocklist.txt?type=ip&days=30&key=YOUR_KEY - On OPNsense, keep the key out of the URL: URL
https://ctiforecast.com/v1/blocklist.txt?type=ip&days=30, then, in the alias authentication options, type Header, nameX-API-Key, value your key (or Basic with the key as password). pfSense has no such option: the key must be in the URL. - Update frequency: 1 day.
- Create a Block firewall rule on the WAN interface (and outbound on LAN) with
CTI_FORECAST_IPas source or destination.
With pfBlockerNG, under IP → IPv4, format Auto, add the same URL followed by &family=4 (IPv4 only).
Fortinet FortiGate · block malicious IPs
- Security Fabric → External Connectors, then Create New and, under Threat Feeds, IP Address.
- Name:
CTI_FORECAST_IP. URI of external resource:https://ctiforecast.com/v1/blocklist.txt?type=ip&days=30&header=0 - Enable HTTP basic authentication: any username (for example
cti), password your API key. - Refresh rate:
60minutes. Save, then check with View Entries that the list is loaded. - In Policy & Objects → Firewall Policy, create a DENY policy with
CTI_FORECAST_IPas Source (inbound traffic) and another withCTI_FORECAST_IPas Destination (outbound traffic), at the top of the list.
The number of entries accepted depends on the FortiGate model: add &limit=10000 (for example) to stay within its capacity. The most reliable and most recent addresses come first.
Palo Alto Networks (PAN-OS) · External Dynamic List
- Objects → External Dynamic Lists, then Add. Name:
CTI_FORECAST_IP. Type: IP List. - Source:
https://ctiforecast.com/v1/blocklist.txt?type=ip&days=30&header=0 - Certificate Profile: a profile containing the public certificate authorities, to validate the HTTPS certificate.
- Check Client Authentication: any Username (for example
cti), Password your API key. - Check for updates: Hourly. Click OK, then Commit.
- In Policies → Security, add a Deny rule with
CTI_FORECAST_IPas source address and another as destination address.
List capacity depends on the model: use &limit= to account for it.
Sophos Firewall (v21 and later) · third-party threat feeds
- Protect → Active threat response → Third-party threat feeds, then Add.
- Indicator type: IPv4 address. URL:
https://ctiforecast.com/v1/blocklist.txt?type=ip&family=4&days=30&header=0&key=YOUR_KEY - Polling interval: 1 hour. Click Test connection, then save.
- Action: start with Log only for a few days to check, then switch to Log and drop.
This Sophos feature only accepts IPv4 (hence family=4) and requires the Xstream Protection bundle. Forwarded traffic must go through a firewall rule to be inspected.
Stormshield (SNS)
To our knowledge, Stormshield SNS firewalls cannot natively read an IP address list from a URL, as FortiGate or Palo Alto do. Two options exist: regularly import the addresses as objects (CSV import, or Stormshield Management Center for several firewalls), or automate the update of an object group through the firewall API, for example with the official stormshield.sns Ansible collection. Using Stormshield? Write to us: we will help you set up the method that suits your version.
Microsoft Defender for Endpoint · indicators
Defender receives IPs through its indicators API. First create an application in Microsoft Entra ID → App registrations, give it the Ti.ReadWrite.All application permission (WindowsDefenderATP API), grant admin consent and create a secret. Then run this script daily (cron or Task Scheduler, Python 3, no dependencies):
#!/usr/bin/env python3
# cti-forecast-defender.py: sends CTI Forecast IPs to Microsoft Defender for Endpoint
import json, time, urllib.parse, urllib.request
from datetime import datetime, timedelta, timezone
TENANT, APP_ID, APP_SECRET = "YOUR_TENANT_ID", "YOUR_APPLICATION_ID", "YOUR_SECRET"
CTI_KEY = "YOUR_KEY"
ACTION = "Audit" # alert only; switch to "Block" once you have checked the results
token = json.load(urllib.request.urlopen(urllib.request.Request(
f"https://login.microsoftonline.com/{TENANT}/oauth2/v2.0/token",
data=urllib.parse.urlencode({"client_id": APP_ID, "client_secret": APP_SECRET, "grant_type": "client_credentials",
"scope": "https://api.securitycenter.microsoft.com/.default"}).encode())))["access_token"]
ips = urllib.request.urlopen(urllib.request.Request(
"https://ctiforecast.com/v1/blocklist.txt?type=ip&days=30&header=0&limit=10000",
headers={"X-API-Key": CTI_KEY, "User-Agent": "cti-forecast-defender/1.0"})).read().decode().split()
expire = (datetime.now(timezone.utc) + timedelta(days=3)).strftime("%Y-%m-%dT%H:%M:%SZ")
for i in range(0, len(ips), 500): # at most 500 indicators per call
batch = [{"indicatorValue": ip, "indicatorType": "IpAddress", "action": ACTION, "severity": "Medium",
"title": "CTI Forecast", "description": "Known malicious IP (CTI Forecast)",
"expirationTime": expire, "generateAlert": True} for ip in ips[i:i + 500]]
req = urllib.request.Request("https://api.security.microsoft.com/api/indicators/import",
data=json.dumps({"Indicators": batch}).encode(),
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"})
result = json.load(urllib.request.urlopen(req))["value"]
print(f"{i + len(batch)}/{len(ips)} sent, {sum(r['isFailed'] for r in result)} rejected")
time.sleep(2.5) # limit: 30 calls per minute
Defender accepts 15,000 active indicators per tenant, hence limit=10000, which leaves room for your own indicators. Each IP expires 3 days after it was last sent: an address removed from the feed disappears from Defender on its own.
Wazuh · alert when a known IP shows up in your logs
Wazuh matches logs against CDB lists in key:value format. This script downloads the IPv4 list (the colons in IPv6 addresses would break this format) and converts it. Run it daily with cron on the manager:
#!/bin/sh # /usr/local/bin/cti-forecast-wazuh.sh curl -fsS -H "X-API-Key: YOUR_KEY" "https://ctiforecast.com/v1/blocklist.txt?type=ip&family=4&days=30&header=0" \ | sed 's/$/:cti-forecast/' > /var/ossec/etc/lists/cti-forecast-ip.tmp \ && mv /var/ossec/etc/lists/cti-forecast-ip.tmp /var/ossec/etc/lists/cti-forecast-ip \ && chown wazuh:wazuh /var/ossec/etc/lists/cti-forecast-ip \ && systemctl restart wazuh-manager
Declare the list in /var/ossec/etc/ossec.conf, inside the <ruleset> section:
<list>etc/lists/cti-forecast-ip</list>
Then add a rule to /var/ossec/etc/rules/local_rules.xml:
<group name="cti_forecast,">
<rule id="100900" level="10">
<if_group>web|sshd|firewall</if_group>
<list field="srcip" lookup="address_match_key">etc/lists/cti-forecast-ip</list>
<description>CTI Forecast: known malicious IP ($(srcip))</description>
</rule>
</group>
MISP · add CTI Forecast as a feed
- Sync Actions → Feeds → Add Feed.
- Source format: Freetext Parsed Feed. Input source: Network.
- URL:
https://ctiforecast.com/v1/blocklist.txt?type=sha256&days=7&header=0. In the feed's Headers field:X-API-Key: YOUR_KEY(the key stays out of the URL). - Create one feed per type (sha256, ip, domain…) so MISP files each value under the right attribute.
- Enable the feed and caching, then Fetch and store all feed data.
OpenCTI and Microsoft Sentinel · STIX 2.1 file import PRO
Download a STIX bundle, with source articles as external references:
curl -H "X-API-Key: YOUR_KEY" -o cti-forecast.json \ "https://ctiforecast.com/v1/stix?type=sha256,ip,domain&min_confidence=70&limit=1000"
OpenCTI: Data → Import → upload the file. STIX identifiers are stable, so re-importing the file daily updates existing indicators instead of creating duplicates.
Microsoft Sentinel: Threat intelligence → Import → from a file, STIX format.
Splunk · lookup table
Every day (cron), replace the lookup with today's list:
{ echo "ioc"; curl -fsS -H "X-API-Key: YOUR_KEY" "https://ctiforecast.com/v1/blocklist.txt?type=ip" | grep -v '^#'; } \
> $SPLUNK_HOME/etc/apps/search/lookups/cti_forecast_ip.csv
Then, in a search: | lookup cti_forecast_ip.csv ioc AS src_ip OUTPUT ioc AS cti_match | where isnotnull(cti_match)
Another tool?
The JSON API works with anything that can make an HTTP request: Elastic, QRadar, TheHive, Python scripts or n8n.