Threat intel
Classify IPs, domains, URLs, and file hashes offline, then enrich them against threat-intel reputation feeds
- Connector software
- Free and open source
- Service credentials
- Not needed
- Query Farm hosting
- Available · $10/month organization minimum
Use with an agent
Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.
npx skills add Query-farm/vgi-skills --skill orchard
Copy this request into your coding agent to get started.
Use https://query.farm/products/orchard/connectors/threatintel/index.md to help me query Threat intel with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.
See what you can query
Example output · captured
- Connector release
- v0.5.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('10.0.0.5'), ('malware-c2.example'),
('https://good.example/login'), ('44d88612fea8a8f36de82e1278abb02f'), ('not-an-indicator!!')
), typed AS (
SELECT ioc,
threatintel.main.indicator_type(ioc) AS kind,
threatintel.main.is_private_ip(ioc) AS is_private
FROM iocs
)
SELECT typed.ioc, typed.kind, t.description, typed.is_private,
typed.kind IS NOT NULL AND NOT typed.is_private AS needs_lookup
FROM typed
LEFT JOIN threatintel.main.indicator_types AS t ON t.indicator_type = typed.kind
ORDER BY needs_lookup DESC, typed.ioc
| ioc | kind | description | is_private | needs_lookup |
|---|---|---|---|---|
| 185.220.101.1 | ipv4 | IPv4 address in dotted-quad notation | false | true |
| 44d88612fea8a8f36de82e1278abb02f | md5 | MD5 file hash (32 hexadecimal characters) | false | true |
| https://good.example/login | url | Absolute HTTP or HTTPS URL | false | true |
| malware-c2.example | domain | DNS domain name (hostname) | false | true |
| 10.0.0.5 | ipv4 | IPv4 address in dotted-quad notation | true | false |
Quick start
Choose where to run Threat intel, then follow the steps below.
The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.
1. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
2. Attach the connector
Attach the release directly
Downloads the latest release for your platform and caches it locally.
ATTACH 'threatintel' AS threatintel (
TYPE vgi,
LOCATION 'github-auto://Query-farm/vgi-threatintel'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'threatintel' AS threatintel (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-threatintel:0.5.0'
);
3. Run a query
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('10.0.0.5'), ('malware-c2.example'),
('https://good.example/login'), ('44d88612fea8a8f36de82e1278abb02f'), ('not-an-indicator!!')
), typed AS (
SELECT ioc,
threatintel.main.indicator_type(ioc) AS kind,
threatintel.main.is_private_ip(ioc) AS is_private
FROM iocs
)
SELECT typed.ioc, typed.kind, t.description, typed.is_private,
typed.kind IS NOT NULL AND NOT typed.is_private AS needs_lookup
FROM typed
LEFT JOIN threatintel.main.indicator_types AS t ON t.indicator_type = typed.kind
ORDER BY needs_lookup DESC, typed.ioc
Run the connector on a server you manage. You operate the service and choose who can connect.
1. Deploy the connector on your server
Follow the connector’s deployment instructions. Use its supported HTTP transport, or launch it remotely over SSH. The connection guide explains both options.
2. Install the vgi extension
Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach the connector
For an HTTP deployment, replace the example URL with your endpoint. Add the authentication options your deployment requires. For SSH, use the SSH connection instructions.
ATTACH 'threatintel' AS threatintel
(TYPE vgi, LOCATION 'https://your-connector.example.com');
4. Run a query
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('10.0.0.5'), ('malware-c2.example'),
('https://good.example/login'), ('44d88612fea8a8f36de82e1278abb02f'), ('not-an-indicator!!')
), typed AS (
SELECT ioc,
threatintel.main.indicator_type(ioc) AS kind,
threatintel.main.is_private_ip(ioc) AS is_private
FROM iocs
)
SELECT typed.ioc, typed.kind, t.description, typed.is_private,
typed.kind IS NOT NULL AND NOT typed.is_private AS needs_lookup
FROM typed
LEFT JOIN threatintel.main.indicator_types AS t ON t.indicator_type = typed.kind
ORDER BY needs_lookup DESC, typed.ioc
Query Farm operates Threat intel for your team. Hosting has a $10 monthly minimum per organization; usage counts toward it. From $2.97 per instance-month ($10 monthly minimum).
1. Create your hosted connector
Open the console, choose your organization and deployment size, and add any service credentials there.
2. Install the vgi extension
SET allow_extension_repositories = 'allowed';
CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
WITH PREFIX 'https://duckdb-extensions.query.farm';
INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;
INSTALL vgi FROM community;
LOAD vgi;
3. Attach your deployment
Copy the ATTACH statement from your deployment in the console and run it in DuckDB or Haybarn. Use threatintel as the catalog alias for the query below.
4. Run a query
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('10.0.0.5'), ('malware-c2.example'),
('https://good.example/login'), ('44d88612fea8a8f36de82e1278abb02f'), ('not-an-indicator!!')
), typed AS (
SELECT ioc,
threatintel.main.indicator_type(ioc) AS kind,
threatintel.main.is_private_ip(ioc) AS is_private
FROM iocs
)
SELECT typed.ioc, typed.kind, t.description, typed.is_private,
typed.kind IS NOT NULL AND NOT typed.is_private AS needs_lookup
FROM typed
LEFT JOIN threatintel.main.indicator_types AS t ON t.indicator_type = typed.kind
ORDER BY needs_lookup DESC, typed.ioc
Technical details
- Verified connector release
- v0.5.0
- Engine
- 2.0.1
- VGI protocol
- 3.4.0
- Verified on
- December 1, 2026
Pin a version for production
When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.
Attach the release directly
Uses the verified release each time you attach the connector.
ATTACH 'threatintel' AS threatintel (
TYPE vgi,
LOCATION 'github-auto://Query-farm/[email protected]'
);
Attach the signed image
Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.
ATTACH 'threatintel' AS threatintel (
TYPE vgi,
LOCATION 'oci://ghcr.io/query-farm/vgi-threatintel:0.5.0'
);
Overview
Enrich cyber indicators against threat-intel reputation sources; classify offline
Enrich and classify cyber threat indicators — IPs, domains, URLs, and file hashes — against threat-intelligence reputation feeds directly in SQL. This VGI worker turns DuckDB into a threat-hunting and indicator-of-compromise (IoC) triage engine: parse and type any indicator offline, screen out private/reserved IPs, then look up reputation verdicts (malicious flag, score, categories, source) from a pluggable feed — all without leaving your query.
It is built for SOC analysts, threat hunters, incident responders, and detection engineers who want to enrich and prioritize indicators in place rather than juggling separate enrichment scripts and spreadsheets. The worker is a defensive security tool intended for authorized use only, and it composes with sibling VGI workers such as vgi-ioc, vgi-cve, vgi-yara, and vgi-sigma to build a full SQL-native threat-intelligence stack.
Under the hood the worker is a standalone process that DuckDB attaches over Apache Arrow via the vgi-go SDK. It deliberately hard-codes no single feed: it speaks a simple normalized reputation JSON over GET {base_url}?indicator=<value>, so you point it at any adapter that maps a provider's response into that shape. Popular feeds plug in behind this one interface, including AlienVault OTX, abuse.ch URLhaus, abuse.ch ThreatFox, and VirusTotal — each with its own API key, rate limits, and terms of use.
SQL functions
Two offline scalars triage indicators with no network call: indicator_type classifies a string as ipv4/ipv6/domain/url/md5/sha1/sha256 (or NULL when unrecognized), and is_private_ip flags private/reserved IP addresses that should never be sent to an external feed. The reputation table function then enriches a single indicator against the configured source — selected with base_url plus optional api_key and timeout_ms — and returns at most one verdict row with the malicious flag, score, categories, source, and last_seen.
A typical workflow first triages a whole column of indicators with the two offline scalars — indicator_type to classify each observable and is_private_ip to screen out internal hosts — and then enriches only the survivors with reputation('1.2.3.4'). Private/reserved IPs and unknown indicators return zero rows with no error, so enrichment stays cheap and safe. See the vgi-threatintel source repository for adapter examples and the full normalized-feed contract.
Catalog
Everything threatintel exposes once attached — read straight from the worker's
released build.
main 1 view · 3 functions
Threat-intel indicator classification and reputation-enrichment functions.
Schema examples (12)
Classify an IPv4 address string into its indicator (IoC) type.
SELECT threatintel.main.indicator_type('8.8.8.8') AS kind;
Flag a private/reserved (RFC1918) IP that should never be sent to an external reputation feed.
SELECT threatintel.main.is_private_ip('10.0.0.5') AS is_private;
Enrich a single indicator against the configured reputation source, projecting the verdict fields.
SELECT indicator, malicious, score, categories
FROM threatintel.main.reputation('1.2.3.4');
Look up an indicator against an explicit reputation adapter with an API key, keeping only the malicious flag, score, and categories.
SELECT malicious, score, categories
FROM threatintel.main.reputation('evil.example.com', base_url := 'https://my-reputation-adapter.internal/reputation', api_key := 'YOUR_KEY');
8 more examples
Triage a mixed batch of indicators: classify each with indicator_type, attach the type's description from the indicator_types view, flag private IPs with is_private_ip, and mark which rows need a reputation lookup (4 of the 6 here: the private 10.0.0.5 and the unrecognized string do not).
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('10.0.0.5'), ('malware-c2.example'),
('https://good.example/login'), ('44d88612fea8a8f36de82e1278abb02f'), ('not-an-indicator!!')
), typed AS (
SELECT ioc,
threatintel.main.indicator_type(ioc) AS kind,
threatintel.main.is_private_ip(ioc) AS is_private
FROM iocs
)
SELECT typed.ioc, typed.kind, t.description, typed.is_private,
typed.kind IS NOT NULL AND NOT typed.is_private AS needs_lookup
FROM typed
LEFT JOIN threatintel.main.indicator_types AS t ON t.indicator_type = typed.kind
ORDER BY needs_lookup DESC, typed.ioc;
| ioc | kind | description | is_private | needs_lookup |
|---|---|---|---|---|
| 185.220.101.1 | ipv4 | IPv4 address in dotted-quad notation | false | true |
| 44d88612fea8a8f36de82e1278abb02f | md5 | MD5 file hash (32 hexadecimal characters) | false | true |
| https://good.example/login | url | Absolute HTTP or HTTPS URL | false | true |
| malware-c2.example | domain | DNS domain name (hostname) | false | true |
| 10.0.0.5 | ipv4 | IPv4 address in dotted-quad notation | true | false |
Count a batch of indicators per IoC type, listing every type in the indicator_types view (types absent from the batch show 0; the unrecognized string matches no type and is not counted).
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('8.8.8.8'), ('10.0.0.5'), ('malware-c2.example'),
('44d88612fea8a8f36de82e1278abb02f'),
('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'), ('not-an-indicator!!')
)
SELECT t.indicator_type, count(i.ioc) AS n_indicators
FROM threatintel.main.indicator_types AS t
LEFT JOIN iocs AS i ON threatintel.main.indicator_type(i.ioc) = t.indicator_type
GROUP BY t.indicator_type
ORDER BY t.indicator_type;
Sanity-check a reputation adapter: compare the type the feed reports for a looked-up indicator with the offline indicator_type classification (types_agree is false when the adapter mislabels it). Requires a reachable base_url; returns no rows when the feed does not know the indicator.
SELECT r.indicator, r.type AS feed_type,
threatintel.main.indicator_type(r.indicator) AS offline_type,
r.type = threatintel.main.indicator_type(r.indicator) AS types_agree
FROM threatintel.main.reputation('malware-c2.example',
base_url := 'https://my-reputation-adapter.internal/reputation') AS r
ORDER BY r.indicator;
Classify a 64-hex-character file hash as sha256.
SELECT threatintel.main.indicator_type('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855') AS kind;
Flag a private/reserved (RFC1918) IP that should not be looked up.
SELECT threatintel.main.is_private_ip('10.0.0.5') AS private;
A routable public IP is not private (safe to enrich).
SELECT threatintel.main.is_private_ip('8.8.8.8') AS private;
A private/reserved IP is triaged to zero reputation rows before any network call.
SELECT count(*) AS n FROM threatintel.main.reputation('10.0.0.5');
An unsupported indicator string yields zero reputation rows (no lookup).
SELECT count(*) AS n FROM threatintel.main.reputation('not-an-indicator');
indicator_types
Reference table of the indicator (IoC) types this worker classifies — the exact closed set of values indicator_type() can return — each with a description and a canonical example. Browse it to learn the classifier's output space; VALUES-backed, so it scans offline with no network call.
List every IoC type the worker recognizes, with a description and a canonical example of each.
SELECT indicator_type, description, example
FROM threatintel.main.indicator_types
ORDER BY indicator_type;
Look up the canonical example and human description for a single indicator type (sha256).
SELECT description, example
FROM threatintel.main.indicator_types
WHERE indicator_type = 'sha256';
Count a batch of indicators per IoC type, listing every type in the indicator_types view (types absent from the batch show 0; the unrecognized string matches no type and is not counted).
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('8.8.8.8'), ('10.0.0.5'), ('malware-c2.example'),
('44d88612fea8a8f36de82e1278abb02f'),
('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'), ('not-an-indicator!!')
)
SELECT t.indicator_type, count(i.ioc) AS n_indicators
FROM threatintel.main.indicator_types AS t
LEFT JOIN iocs AS i ON threatintel.main.indicator_type(i.ioc) = t.indicator_type
GROUP BY t.indicator_type
ORDER BY t.indicator_type;
indicator_type (value VARCHAR)
Classify an indicator as ipv4/ipv6/domain/url/md5/sha1/sha256, or NULL if unrecognized
Classify an IPv4 address; returns 'ipv4'.
SELECT threatintel.main.indicator_type('8.8.8.8');
Classify a 32-hex-character file hash as 'md5'.
SELECT threatintel.main.indicator_type('44d88612fea8a8f36de82e1278abb02f');
Triage a mixed batch of indicators: classify each with indicator_type, attach the type's description from the indicator_types view, flag private IPs with is_private_ip, and mark which rows need a reputation lookup (4 of the 6 here: the private 10.0.0.5 and the unrecognized string do not).
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('10.0.0.5'), ('malware-c2.example'),
('https://good.example/login'), ('44d88612fea8a8f36de82e1278abb02f'), ('not-an-indicator!!')
), typed AS (
SELECT ioc,
threatintel.main.indicator_type(ioc) AS kind,
threatintel.main.is_private_ip(ioc) AS is_private
FROM iocs
)
SELECT typed.ioc, typed.kind, t.description, typed.is_private,
typed.kind IS NOT NULL AND NOT typed.is_private AS needs_lookup
FROM typed
LEFT JOIN threatintel.main.indicator_types AS t ON t.indicator_type = typed.kind
ORDER BY needs_lookup DESC, typed.ioc;
| ioc | kind | description | is_private | needs_lookup |
|---|---|---|---|---|
| 185.220.101.1 | ipv4 | IPv4 address in dotted-quad notation | false | true |
| 44d88612fea8a8f36de82e1278abb02f | md5 | MD5 file hash (32 hexadecimal characters) | false | true |
| https://good.example/login | url | Absolute HTTP or HTTPS URL | false | true |
| malware-c2.example | domain | DNS domain name (hostname) | false | true |
| 10.0.0.5 | ipv4 | IPv4 address in dotted-quad notation | true | false |
is_private_ip (value VARCHAR)
Report whether an indicator is a private/reserved IP (RFC1918/loopback/etc.); false for non-IPs
An RFC1918 address is private; returns true.
SELECT threatintel.main.is_private_ip('10.0.0.5');
A routable public address; returns false (safe to look up).
SELECT threatintel.main.is_private_ip('8.8.8.8');
reputation (indicator VARCHAR, base_url := VARCHAR, api_key := VARCHAR, timeout_ms := BIGINT)
Look up one indicator against a threat-intel reputation source; returns at most one verdict row
A private/reserved IP is triaged to zero verdict rows before any network call (no public-reputation budget spent on internal hosts); count(*) returns 0.
SELECT count(*) AS rows_for_private_ip
FROM threatintel.main.reputation('10.0.0.5');
An unsupported indicator string yields zero verdict rows (no lookup); count(*) returns 0.
SELECT count(*) AS rows_for_unsupported
FROM threatintel.main.reputation('not-an-indicator');
Try these queries
Classify an IPv4 address string into its indicator (IoC) type.
SELECT threatintel.main.indicator_type('8.8.8.8') AS kind
Uses indicator_type
Flag a private/reserved (RFC1918) IP that should never be sent to an external reputation feed.
SELECT threatintel.main.is_private_ip('10.0.0.5') AS is_private
Uses is_private_ip
Enrich a single indicator against the configured reputation source, projecting the verdict fields.
SELECT indicator, malicious, score, categories
FROM threatintel.main.reputation('1.2.3.4')
Uses reputation
Look up an indicator against an explicit reputation adapter with an API key, keeping only the malicious flag, score, and categories.
SELECT malicious, score, categories
FROM threatintel.main.reputation('evil.example.com', base_url := 'https://my-reputation-adapter.internal/reputation', api_key := 'YOUR_KEY')
Uses reputation
Count a batch of indicators per IoC type, listing every type in the indicator_types view (types absent from the batch show 0; the unrecognized string matches no type and is not counted).
WITH iocs(ioc) AS (
VALUES ('185.220.101.1'), ('8.8.8.8'), ('10.0.0.5'), ('malware-c2.example'),
('44d88612fea8a8f36de82e1278abb02f'),
('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'), ('not-an-indicator!!')
)
SELECT t.indicator_type, count(i.ioc) AS n_indicators
FROM threatintel.main.indicator_types AS t
LEFT JOIN iocs AS i ON threatintel.main.indicator_type(i.ioc) = t.indicator_type
GROUP BY t.indicator_type
ORDER BY t.indicator_type
List every IoC type the worker recognizes, with a description and a canonical example of each.
SELECT indicator_type, description, example
FROM threatintel.main.indicator_types
ORDER BY indicator_type
Uses indicator_types
13 more examples in the Catalog, each listed under the table or function it uses.
Questions it can answer
Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.
- What indicator type does the string 8.8.8.8 classify as?
- How many reputation rows are returned for the private IP address 10.0.0.5 (which is triaged out before any lookup)?
- Using the worker's indicator_types reference view, how many distinct indicator (IoC) types does this worker recognize?
- According to the indicator_types reference view, what is the canonical example value for the sha256 indicator type?
Threat intel is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.
Related workers
Indicators of compromise
Security & forensics
Pull indicators of compromise out of threat reports and defang or refang them safely
YARA
Security & forensics
Scan blobs and text for malware with YARA rules, straight from SQL
TLS fingerprints
Security & forensics
Compute JA3, JA3S, and JA4 TLS fingerprints from raw handshake bytes or extracted fields