跳转到内容
搜索文档

威胁情报 API (Threat Intelligence APIs)

最后更新 查看 MarkdownAgent 设置

Cloudflare 提供了一系列端点,涵盖互联网安全和洞察的各个领域。根据您的 Cloudflare 套餐方案类型,每个月 API 调用的限制会有所不同。

情报端点 定义
ASN Intelligence (ASN 情报) 提供自治系统号 (ASN) 的概述以及该 ASN 的子网列表。
Custom Indicator Feed Download (自定义指标源下载) 提供下载用户创建的任何自定义指标源的功能。
Domain Intelligence (域名情报) 提供有关域名的安全详细信息和统计数据。
Domain History (域名历史) 提供当前和以前分配给某个域名的历史安全威胁和内容类别。
IP Intelligence (IP 情报) 提供 IP 地址的地理位置、ASN、该 ASN 的基础设施类型以及任何安全威胁类别。
Passive DNS by IP (根据 IP 获取被动 DNS) 提供解析到特定 IP 地址的所有域名的列表,包括首次看到和最后看到的日期。
Phishing Intelligence (网络钓鱼情报) 提供有关 URL 的网络钓鱼详细信息。
Miscategorization Intelligence (分类错误报告情报) 允许用户提交修改域名类别的请求,随后由 Cloudflare 情报团队进行审查。
Priority Intelligence Requirements (优先情报需求) 提供一种结构化的方法来识别情报差距、制定精准需求并将其组织到不同的类别中。
Request for Information (信息请求) 创建针对特定情报见解的定向查询,以帮助组织理解并应对即将来临的安全威胁和漏洞。
Threat Events (威胁事件) 允许客户查看 Cloudflare 全球网络上的遥测数据和威胁行动者活动。
WHOIS 提供特定域名的 WHOIS 注册信息。
DDoS Botnet Threat Feed (DDoS 僵尸网络威胁源)
(早期访问)
向服务提供商提供有关从 Cloudflare 全球网络观察到的、参与了 HTTP DDoS 攻击的自身 IP 地址的信息。
Cloudforce One 允许用户列出、删除、获取或更新请求资产。
Brand Protection API (品牌保护 API) 提供创建和删除查询、下载徽标和字符串查询匹配项、读取徽标和字符串查询匹配项的功能。

API 示例

以下可以找到 Threat Intelligence API 调用示例。请确保您使用的是具有适当编辑权限的 API 令牌。如需了解完整的详细信息,请使用上面的链接导航到相应的 API 文档。

ASN Intelligence (ASN 情报)

获取 ASN 概述

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/intel/asn/13335" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "result": {
        "asn": 13335,
        "description": "CLOUDFLARENET",
        "country": "US",
        "type": "isp"
    },
    "success": true,
    "errors": [],
    "messages": []
}

自定义指标源下载 (Custom Indicator Feed Download)

下载自定义指标源

curl "https://api.cloudflare.com/client/v4/accounts/10d79d097895ae7ed7942a2b3832186c/intel/indicator-feeds/31/download" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "result": [
        {
            "type": "bundle",
            "id": "bundle--f4a735b7-b330-465d-8e6e-87b3c6a01287",
            "objects":
                [
                    {
                        "type": "indicator",
                        "spec_version": "2.1",
                        "id": "indicator--3d0ad6e0-3d49-4575-a0cb-d0e5c8b81f08",
                        "created": "2024-07-18T00:00:00Z",
                        "modified": "2024-07-18T00:00:00Z",
                        "name": "Malicious domain ahilesopolker.com",
                        "description": "This domain is associated with malicious activity.",
                        "pattern": "[domain-name:value = 'ahilesopolker.com']",
                        "pattern_type": "stix",
                        "valid_from": "2024-07-18T00:00:00Z"
                    },
                    {
                        "type": "domain-name",
                        "spec_version": "2.1",
                        "id": "domain-name--b252f8d7-5b63-4b59-9d58-8f313db76c35",
                        "value": "ahilesopolker.com",
                        "object_marking_refs": [ "marking-definition--34098fce-860f-48ae-8e50-ebd3cc5e41da" ],
                        "created": "2024-07-18T00:00:00Z",
                        "modified": "2024-07-18T00:00:00Z"
                        }
],
    },
    "success": true,
    "errors": [],
    "messages": []
}

Domain Intelligence (域名情报)

获取域名详细信息

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/intel/domain?domain=cloudflare.com" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "result": {
        "domain": "cloudflare.com",
        "resolves_to_refs": [
            {
                "id": "ipv4-addr--71f6bb54-e0c5-5e7d-b939-5698fc15a102",
                "value": "104.16.133.229"
            },
            {
                "id": "ipv4-addr--015b0df4-7fcd-5409-9b56-cfd300c662f6",
                "value": "104.16.132.229"
            },
            {
                "id": "ipv6-addr--4a7455cd-e8d0-5bfb-8bdb-f6ebb1759508",
                "value": "2606:4700::6810:85e5"
            },
            {
                "id": "ipv6-addr--68f89579-7204-5ebd-a851-e91b3a86fc6d",
                "value": "2606:4700::6810:84e5"
            }
        ],
        "application": {},
        "content_categories": [
            {
                "id": 155,
                "super_category_id": 26,
                "name": "Technology"
            },
            {
                "id": 26,
                "name": "Technology"
            }
        ],
        "additional_information": {},
        "type": "Apex domain",
        "notes": "Apex domain given."
    },
    "success": true,
    "errors": [],
    "messages": []
}

Domain History (域名历史)

获取域名历史分配类别

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/intel/domain-history?domain=cloudflare.com" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "result": [
        {
            "domain": "cloudflare.com",
            "categorizations": [
                {
                    "categories": [
                        {
                            "id": 155,
                            "name": "Technology"
                        }
                    ],
                    "start": "2020-12-16T19:49:30.533482Z",
                    "end": "2023-05-31T08:12:53.547029Z"
                },
                {
                    "categories": [
                        {
                            "id": 115,
                            "name": "Login Screens"
                        },
                        {
                            "id": 155,
                            "name": "Technology"
                        }
                    ],
                    "start": "2023-05-31T08:12:53.547029Z"
                }
            ]
        }
    ],
    "success": true,
    "errors": [],
    "messages": []
}

IP Intelligence (IP 情报)

获取 IP 概述

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/intel/ip?ipv4=1.1.1.1" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "result": [
        {
            "ip": "1.1.1.1",
            "belongs_to_ref": {
                "id": "autonomous-system--2fa28d71-3549-5a38-af05-770b79ad6ea8",
                "value": 13335,
                "type": "isp",
                "country": "US",
                "description": "CLOUDFLARENET"
            },
            "ip_lists": null,
            "ptr_lookup": {
                "ptr_domains": [
                    "one.one.one.one."
                ],
                "ptr_lookup_errors": ""
            },
            "iana_reservations": []
        }
    ],
    "success": true,
    "errors": [],
    "messages": []
}

Passive DNS by IP (根据 IP 获取被动 DNS)

根据 IP 获取被动 DNS

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/intel/dns?ipv4=1.1.1.1&start=2023-07-15&end=2023-07-18&per_page=5" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "result": {
        "reverse_records": [
            {
                "first_seen": "2023-07-15T00:00:00Z",
                "last_seen": "2023-07-18T00:00:00Z",
                "hostname": "internet-ping.svc.starlink.com"
            },
            {
                "first_seen": "2023-07-15T00:00:00Z",
                "last_seen": "2023-07-18T00:00:00Z",
                "hostname": "one.one.one.one"
            },
            {
                "first_seen": "2023-07-15T00:00:00Z",
                "last_seen": "2023-07-18T00:00:00Z",
                "hostname": "ping.ui.com"
            },
            {
                "first_seen": "2023-07-15T00:00:00Z",
                "last_seen": "2023-07-18T00:00:00Z",
                "hostname": "ping.ubnt.com"
            },
            {
                "first_seen": "2023-07-15T00:00:00Z",
                "last_seen": "2023-07-18T00:00:00Z",
                "hostname": "bflow.tiki.video"
            }
        ],
        "count": 778,
        "page": 1,
        "per_page": 5
    },
    "success": true,
    "errors": [],
    "messages": []
}

Phishing Intelligence (网络钓鱼情报)

获取 URL 扫描结果

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/brand-protection/url-info?url=http://worcester-realistic-ellen-portland.trycloudflare.com/login.html" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "errors": [],
    "messages": [],
    "result": [
        {
            "categorizations": [],
            "model_results": [
                {
                    "model_name": "MACHINE_LEARNING_v2",
                    "model_score": 0.999
                }
            ],
            "rule_matches": [
                {
                    "description": "Match frequently used phishing kit (Discord, Facebook, Instagram, Twitter)",
                    "name": "phishkit.social"
                }
            ],
            "scan_status": {
                "last_processed": "Wed, 19 Jul 2023 14:15:28 GMT",
                "scan_complete": true,
                "status_code": 200,
                "submission_id": 23098147
            },
            "url": "http://worcester-realistic-ellen-portland.trycloudflare.com/login.html"
        }
    ],
    "success": true
}

Miscategorization Intelligence (分类错误报告情报)

创建分类错误报告

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/intel/miscategorization" \
--header "Authorization: Bearer <API_TOKEN>" \
--header "Content-Type: application/json" \
--data '{
    "content_adds": [
        82
    ],
    "content_removes": [
        82
    ],
    "indicator_type": "url",
    "ip": null,
    "security_adds": [
        117,
        131
    ],
    "security_removes": [
        117
    ],
    "url": "https://wrong-category.example.com"
}'

# 响应示例:
{
    "result": "",
    "success": true,
    "errors": [],
    "messages": []
}

WHOIS

获取 WHOIS 记录

curl "https://api.cloudflare.com/client/v4/accounts/{account_id}/intel/whois?domain=cloudflare.com" \
--header "Authorization: Bearer <API_TOKEN>" | jq .

# 响应示例:
{
    "result": {
        "domain": "cloudflare.com",
        "created_date": "2009-02-17",
        "updated_date": "2017-05-24",
        "registrant": "DATA REDACTED",
        "registrant_org": "DATA REDACTED",
        "registrant_country": "United States",
        "registrant_email": "https://domaincontact.cloudflareregistrar.com/cloudflare.com",
        "registrar": "CloudFlare, Inc.",
        "nameservers": [
            "ns3.cloudflare.com",
            "ns4.cloudflare.com",
            "ns5.cloudflare.com",
            "ns6.cloudflare.com",
            "ns7.cloudflare.com"
        ]
    },
    "success": true,
    "errors": [],
    "messages": []
}

这篇文档对您有帮助吗?