mcpField
P
performing-brand-monitoring-for-impersonation

performing-brand-monitoring-for-impersonation

github.com/mukul975セキュリティ35.2k41 回インストール8 週間前に更新
リポジトリ

performing-brand-monitoring-for-impersonation について

ドメイン、ソーシャルメディア、アプリなどでブランドのなりすましを監視する組織向けのセキュリティガイドです。自動スキャン、リスク評価、削除依頼の作成を扱います。

主な機能

  1. 01類似ドメインやドメインスクワッティングのスキャン
  2. 02証明書透明性ログの監視
  3. 03ソーシャルメディア上のなりすまし確認
  4. 04偽造モバイルアプリの検出
  5. 05リスク指標に基づく検出結果の優先付け
  6. 06削除依頼の生成

活用シーン

  1. 01企業ブランドを装うフィッシングドメインの発見
  2. 02幹部になりすましたSNSプロフィールの検出
  3. 03アプリストアでの偽造アプリの特定
  4. 04なりすましサイトの不正利用報告の準備

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill performing-brand-monitoring-for-impersonation

インストール後、Claude Code で/performing-brand-monitoring-for-impersonationを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

LICENSE
references/
api-reference.md
scripts/
agent.py

詳細

なりすまし対策のためのブランド監視の実施

概要

ブランドなりすまし攻撃は、類似ドメイン、偽のソーシャルメディアプロフィール、偽造モバイルアプリ、正規ブランドを模倣したフィッシングサイトなどを通じて、消費者の信頼を悪用します。2025年においても、ブランドなりすましは最もコストの大きいサイバー脅威の一つであり続け、AI で生成されたフィッシングメールのクリック率は54%に達しました。このスキルでは、自動スキャンとアラートを用いて、ドメインスクワッティング、ソーシャルメディアでのなりすまし、偽モバイルアプリ、無許可のロゴ使用、ダークウェブ上のブランド言及を検出する包括的なブランド監視プログラムの構築について説明します。

使用するタイミング

  • なりすまし対策のブランド監視を伴うセキュリティ評価を実施する場合
  • 関連するセキュリティイベントに対してインシデント対応手順に従う場合
  • 定期的なセキュリティテストや監査活動を実施する場合
  • 実地テストを通じてセキュリティ管理策を検証する場合

前提条件

  • dnstwist、requests、beautifulsoup4、Levenshtein、tweepy ライブラリを備えた Python 3.9 以上
  • API キー:VirusTotal、Google Safe Browsing、Twitter/X API、Shodan
  • ブランド資産のリスト:ドメイン、商標、ロゴ、経営陣の氏名
  • Certificate Transparency 監視(Certstream または crt.sh)
  • ドメイン登録と TLD の状況に関する理解

主要な概念

攻撃対象領域

ブランドなりすましは複数のチャネルにまたがります。ドメインスクワッティング(タイポスクワッティング、ホモグリフ、TLD の変化)、フィッシングサイト(ブランドを盗用したクローンサイト)、ソーシャルメディア(経営陣や企業になりすました偽プロフィール)、モバイルアプリ(アプリストア上の偽造アプリ)、メールのなりすまし(表示名とドメインの偽装)、ダークウェブ(フォーラムやマーケットプレイスでのブランド言及)です。

検出アプローチ

効果的なブランド監視では、次の手法を組み合わせます。dnstwist によるドメイン順列スキャンや CT ログ監視などのプロアクティブなスキャン、スクリーンショット比較やロゴ検出によるウェブクローリング、プロフィール名の照合や投稿内容の分析によるソーシャルメディア監視、名前とアイコンの類似性検出によるアプリストア監視、フォーラムのスクレイピングやマーケットプレイスの追跡によるダークウェブ監視です。

リスクの優先順位付け

すべてのなりすましが悪意のあるものとは限りません。リスク要因には、アクティブなウェブコンテンツ(特にログインページ)、SSL 証明書の有無、MX レコードの設定(メール受信能力)、正規サイトとの視覚的類似性、最近の登録日、サイバー犯罪と関連する地域でのホスティングが含まれます。

ワークフロー

ステップ 1:マルチチャネルのブランド監視システム
import subprocess
import requests
import json
from datetime import datetime
from urllib.parse import urlparse
import Levenshtein

class BrandMonitor:
    def __init__(self, brand_config):
        self.brand_name = brand_config["name"]
        self.domains = brand_config["domains"]
        self.keywords = brand_config["keywords"]
        self.executive_names = brand_config.get("executives", [])
        self.logo_hash = brand_config.get("logo_hash", "")
        self.findings = []

    def scan_domain_squatting(self):
        """Detect typosquatting and lookalike domains."""
        all_results = []
        for domain in self.domains:
            cmd = ["dnstwist", "--registered", "--format", "json",
                   "--nameservers", "8.8.8.8", "--threads", "30", domain]
            try:
                result = subprocess.run(cmd, capture_output=True, text=True, timeout=300)
                if result.returncode == 0:
                    domains = json.loads(result.stdout)
                    registered = [d for d in domains if d.get("dns_a") or d.get("dns_aaaa")]
                    all_results.extend(registered)
                    print(f"[+] Domain squatting scan for {domain}: "
                          f"{len(registered)} registered lookalikes")
            except (subprocess.TimeoutExpired, Exception) as e:
                print(f"[-] Error scanning {domain}: {e}")

        for entry in all_results:
            self.findings.append({
                "type": "domain_squatting",
                "indicator": entry.get("domain", ""),
                "fuzzer": entry.get("fuzzer", ""),
                "dns_a": entry.get("dns_a", []),
                "ssdeep_score": entry.get("ssdeep_score", 0),
                "detected_at": datetime.now().isoformat(),
            })
        return all_results

    def check_google_safe_browsing(self, urls, api_key):
        """Check URLs against Google Safe Browsing API."""
        url = f"https://safebrowsing.googleapis.com/v4/threatMatches:find?key={api_key}"
        body = {
            "client": {"clientId": "brand-monitor", "clientVersion": "1.0"},
            "threatInfo": {
                "threatTypes": ["MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE"],
                "platformTypes": ["ANY_PLATFORM"],
                "threatEntryTypes": ["URL"],
                "threatEntries": [{"url": u} for u in urls],
            },
        }
        resp = requests.post(url, json=body, timeout=15)
        if resp.status_code == 200:
            matches = resp.json().get("matches", [])
            print(f"[+] Google Safe Browsing: {len(matches)} threats found")
            return matches
        return []

    def monitor_social_media_impersonation(self, platform="twitter"):
        """Detect social media profiles impersonating brand or executives."""
        suspicious_profiles = []
        # Search for profiles with similar names
        for name in self.executive_names + [self.brand_name]:
            # Using a general search approach
            search_url = f"https://api.twitter.com/2/users/by/username/{name.replace(' ', '')}"
            # Note: In production, use authenticated Twitter API
            suspicious_profiles.append({
                "search_term": name,
                "platform": platform,
                "note": "Requires authenticated API access for full search",
            })
        return suspicious_profiles

    def monitor_app_stores(self):
        """Check for fake mobile apps impersonating the brand."""
        fake_apps = []
        for keyword in self.keywords:
            # Google Play Store search (unofficial)
            url = f"https://play.google.com/store/search?q={keyword}&c=apps"
            try:
                resp = requests.get(url, timeout=15, headers={
                    "User-Agent": "Mozilla/5.0"
                })
                if resp.status_code == 200:
                    # Parse results for brand name matches
                    from bs4 import BeautifulSoup
                    soup = BeautifulSoup(resp.text, "html.parser")
                    app_links = soup.find_all("a", href=lambda h: h and "/store/apps/details" in h)
                    for link in app_links:
                        app_name = link.get_text(strip=True)
                        if any(k.lower() in app_name.lower() for k in self.keywords):
                            fake_apps.append({
                                "name": app_name,
                                "url": f"https://play.google.com{link['href']}",
                                "platform": "google_play",
                                "keyword": keyword,
                            })
            except Exception as e:
                print(f"[-] App store search error: {e}")
        return fake_apps

    def generate_monitoring_report(self):
        report = {
            "brand": self.brand_name,
            "generated": datetime.now().isoformat(),
            "total_findings": len(self.findings),
            "findings_by_type": {},
            "high_priority": [],
        }
        for finding in self.findings:
            ftype = finding["type"]
            if ftype not in report["findings_by_type"]:
                report["findings_by_type"][ftype] = 0
            report["findings_by_type"][ftype] += 1

            # High priority: has web similarity or MX records
            if finding.get("ssdeep_score", 0) > 50:
                report["high_priority"].append(finding)

        with open(f"brand_monitoring_{self.brand_name.lower()}.json", "w") as f:
            json.dump(report, f, indent=2)
        print(f"[+] Brand monitoring report: {len(self.findings)} findings")
        return report

monitor = BrandMonitor({
    "name": "MyCompany",
    "domains": ["mycompany.com", "mycompany.org"],
    "keywords": ["mycompany", "mybrand", "myproduct"],
    "executives": ["CEO Name", "CTO Name"],
})
monitor.scan_domain_squatting()
report = monitor.generate_monitoring_report()
ステップ 2:テイクダウン要請の生成
def generate_takedown_request(finding, brand_info):
    """Generate abuse report for domain/site takedown."""
    request = f"""Subject: Abuse Report - Brand Impersonation / Phishing

Dear Abuse Team,

We are writing to report a domain that is impersonating {brand_info['name']}
for apparent phishing/fraud purposes.

Infringing Domain: {finding.get('indicator', '')}
IP Address: {', '.join(finding.get('dns_a', ['Unknown']))}
Detection Method: {finding.get('fuzzer', 'domain similarity analysis')}
Web Similarity Score: {finding.get('ssdeep_score', 'N/A')}%
Detection Date: {finding.get('detected_at', '')}

Our legitimate domain(s): {', '.join(brand_info['domains'])}

This domain appears to be impersonating our brand through {finding.get('fuzzer', 'typosquatting')}.
We request immediate suspension of this domain.

Evidence of infringement is available upon request.

Regards,
{brand_info['name']} Security Team
"""
    return request

検証基準

  • dnstwist による順列スキャンでドメインスクワッティングが検出されること
  • Google Safe Browsing のチェックで既知の脅威が特定されること
  • Certificate Transparency 監視で新しいフィッシング用証明書が検出されること
  • ソーシャルメディア監視でなりすましプロフィールが特定されること
  • アプリストア監視で偽造アプリケーションが検出されること
  • 必要な証拠を備えたテイクダウン要請が生成されること

参考資料

コメント