アップデート一覧に戻る
New releaseAug 20, 2026

cdncheck v1.2.49

指定されたIPアドレスに対して使用されている様々な技術を検出するユーティリティ。

共有

cdncheck

機能インストール使い方Discordに参加


cdncheckは、DNS/IPネットワークアドレスに関連するテクノロジーを識別するためのツールです。

image

機能

  • CDNCLOUDWAFの検出
  • ライブラリとして簡単に使用可能
  • 拡張可能なプロバイダ
  • IP、DNS入力のサポート
  • テキスト、JSONL出力
  • 出力のフィルタリング

インストール

cdncheckのインストールにはgo1.19が必要です。以下のコマンドを実行して最新バージョンをインストールしてください:

go install -v github.com/projectdiscovery/cdncheck/cmd/cdncheck@latest

使い方

cdncheck -h

これによりツールのヘルプが表示されます。以下がサポートするすべてのスイッチです。

Usage:
  ./cdncheck [flags]

Flags:
INPUT:
   -i, -input string[]  list of ip / dns to process

DETECTION:
   -cdn    display only cdn in cli output
   -cloud  display only cloud in cli output
   -waf    display only waf in cli output

MATCHER:
   -mcdn, -match-cdn string[]      match host with specified cdn provider (cloudfront, fastly, google, leaseweb)
   -mcloud, -match-cloud string[]  match host with specified cloud provider (aws, google, oracle)
   -mwaf, -match-waf string[]      match host with specified waf provider (cloudflare, incapsula, sucuri, akamai)

FILTER:
   -fcdn, -filter-cdn string[]      filter host with specified cdn provider (cloudfront, fastly, google, leaseweb)
   -fcloud, -filter-cloud string[]  filter host with specified cloud provider (aws, google, oracle)
   -fwaf, -filter-waf string[]      filter host with specified waf provider (cloudflare, incapsula, sucuri, akamai)

OUTPUT:
   -resp               display technology name in cli output
   -o, -output string  write output in plain format to file
   -v, -verbose        display verbose output
   -j, -jsonl          write output in json(line) format
   -nc, -no-color      disable colors in cli output
   -version            display version of the project
   -silent             only display results in output

CONFIG:
   -r, -resolver string[]  list of resolvers to use (file or comma separated)
   -e, -exclude            exclude detected ip from output
   -retry int              maximum number of retries for dns resolution (must be at least 1) (default 2)

UPDATE:
   -up, -update                 update cdncheck to latest version
   -duc, -disable-update-check  disable automatic cdncheck update check

新しいプロバイダを追加するには?

provider.yamlファイルには、CDNWAFCloudのプロバイダのリストが含まれています。このリストにはURLASNCIDRが含まれており、generate-indexプログラムを使用して最終的なsources_data.jsonファイルにコンパイルされます。

provider.yamlファイルの例:

cdn:
  # asn contains the ASN numbers for providers
  asn:
    leaseweb:
      - AS60626

  # urls contains a list of URLs for CDN providers
  urls:
    cloudfront:
      - https://d7uri8nf7uskq.cloudfront.net/tools/list-cloudfront-ips
    fastly:
      - https://api.fastly.com/public-ip-list

  # cidr contains the CIDR ranges for providers
  cidr:
    akamai:
      - "23.235.32.0/20"
      - "43.249.72.0/22"
      - "103.244.50.0/24"
      - "103.245.222.0/23"
      - "103.245.224.0/24"
      - "104.156.80.0/20"

URL、ASN、または静的CIDRのリストからスクレイピングできる新しいプロバイダは、以下の簡単な手順に従ってprovider.yamlファイルに追加できます:

  • cmd/generate-index/provider.yamlファイルを含むGitHubリポジトリをフォークします。
  • フォークしたリポジトリをローカルマシンにクローンし、cmd/generate-indexディレクトリに移動します。
  • provider.yamlファイルを開き、追加するプロバイダの種類(CDN、WAF、Cloud)のセクションを見つけます。
  • 新しいプロバイダの情報をprovider.yamlファイルの適切なセクションに追加します。
  • 説明的なコミットメッセージを付けて変更をコミットします。
  • 変更をGitHub上のフォークしたリポジトリにプッシュします。
  • 変更を元のリポジトリにプルリクエストとして送信します。

その他のプロバイダ

CNAMEおよびWappalyzerベースの追加はother.goファイルで行えます。変数に値を追加するだけで完了です。

// cdnCnameDomains contains a map of CNAME to domains to cdns
var cdnCnameDomains = map[string]string{
	"cloudfront.net":         "amazon",
	"amazonaws.com":          "amazon",
    ...
}

// cdnWappalyzerTechnologies contains a map of wappalyzer technologies to cdns
var cdnWappalyzerTechnologies = map[string]string{
	"imperva":    "imperva",
	"incapsula":  "incapsula",
	...
}

cdncheckをライブラリとして使用

特定のIPがクラウド/CDN/WAF上で動作しているかをチェックするヘルパーライブラリです。

このライブラリはgithub.com/projectdiscovery/cdncheckをインポートして使用できます。以下に基本的な例を示します。

package main

import (
	"fmt"
	"net"
	"github.com/projectdiscovery/cdncheck"
)

func main() {
	client := cdncheck.New()
	ip := net.ParseIP("173.245.48.12")

	// checks if an IP is contained in the cdn denylist
	matched, val, err := client.CheckCDN(ip)
	if err != nil {
		panic(err)
	}

	if matched {
		fmt.Printf("%v is a %v\n", ip, val)
	} else {
		fmt.Printf("%v is not a CDN\n", ip)
	}

	// checks if an IP is contained in the cloud denylist
	matched, val, err = client.CheckCloud(ip)
	if err != nil {
		panic(err)
	}

	if matched {
		fmt.Printf("%v is a %v\n", ip, val)
	} else {
		fmt.Printf("%v is not a Cloud\n", ip)
	}

	// checks if an IP is contained in the waf denylist
	matched, val, err = client.CheckWAF(ip)
	if err != nil {
		panic(err)
	}

	if matched {
		fmt.Printf("%v WAF is %v\n", ip, val)
	} else {
		fmt.Printf("%v is not a WAF\n", ip)
	}
}

cdncheckprojectdiscoveryチームによって❤️を込めて作られ、MITライセンスの下で配布されています。

Discordに参加

カテゴリ