Skillpedia
التحليل وجداول البيانات35k · #7661

analyzing-typosquatting-domains-with-dnstwist

ما الذي تفعله

تنشئ هذه المهارة تنويعات لأسماء نطاقات تشبه الاسم الأصلي كثيرًا. تتحقق مما إذا كانت هذه الأسماء المشابهة مسجلة، وهل تشير إلى مواقع تنتحل هوية الأصلي، لتساعد على إيجاد محاولات الاحتيال.

متى تستخدمها

  • ✓عندما تشك في أن أحدًا يستخدم اسم موقع مشابهًا لخداع الناس.
  • ✓عندما تريد التحقق من مواقع احتيالية تقلد علامتك التجارية.
  • ✓عندما تحتاج إلى التحقيق في رابط مشبوه وصلك عبر بريد أو رسالة.

رابط المهارة

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-typosquatting-domains-with-dnstwist/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-typosquatting-domains-with-dnstwist/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“تحقق من النطاقات المشابهة لـ «mycompany.com» التي قد تكون احتيالية.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تولّد هذه المهارة آلاف أسماء النطاقات المشابهة للاسم الذي تزوّدها به. ثم تتحقق مما إذا كانت هذه الأسماء مسجلة، وهل المواقع المرتبطة بها تشبه الأصلي بصريًا، مما يدل على احتمال الاحتيال.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Analyzing Typosquatting Domains with DNSTwist

Overview

DNSTwist is a domain name permutation engine that generates similar-looking domain names to detect typosquatting, homograph phishing attacks, and brand impersonation. It creates thousands of domain permutations using techniques like character substitution, transposition, insertion, omission, and homoglyph replacement, then checks DNS records (A, AAAA, NS, MX), calculates web page similarity using fuzzy hashing (ssdeep) and perceptual hashing (pHash), and identifies potentially malicious registered domains.

When to Use

  • When investigating security incidents that require analyzing typosquatting domains with dnstwist
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • Python 3.9+ with dnstwist installed (pip install dnstwist[full])
  • Optional: GeoIP database for IP geolocation
  • Optional: Shodan API key for enrichment
  • Network access to perform DNS queries
  • Understanding of DNS record types and domain registration

Key Concepts

Domain Permutation Techniques

DNSTwist generates permutations using: addition (appending characters), bitsquatting (bit-flip errors), homoglyph (visually similar Unicode characters like rn vs m), hyphenation (adding hyphens), insertion (inserting characters), omission (removing characters), repetition (repeating characters), replacement (replacing with adjacent keyboard keys), subdomain (inserting dots), transposition (swapping adjacent characters), vowel-swap (swapping vowels), and dictionary-based (appending common words).

Fuzzy Hashing and Visual Similarity

DNSTwist uses ssdeep (locality-sensitive hash) to compare HTML content and pHash (perceptual hash) to compare screenshots of web pages. This helps identify cloned phishing sites that visually mimic the legitimate site. A high similarity score indicates a likely phishing page.

Detection Workflow

The typical workflow is: generate domain permutations -> resolve DNS records -> check for registered domains -> compare web page similarity -> flag suspicious domains -> alert security team -> request takedown. For a typical corporate domain, dnstwist generates 5,000-10,000 permutations.

Workflow

Step 1: Basic Domain Permutation Scan

import subprocess
import json
import csv
from datetime import datetime

def run_dnstwist_scan(domain, output_file=None):
    """Run dnstwist scan against a target domain."""
    cmd = [
        "dnstwist",
        "--registered",     # Only show registered domains
        "--format", "json", # Output in JSON
        "--nameservers", "8.8.8.8,1.1.1.1",
        "--threads", "50",
        "--mxcheck",        # Check MX records
        "--ssdeep",         # Fuzzy hash comparison
        "--geoip",          # GeoIP lookup
        domain,
    ]

    print(f"[*] Scanning permutations for: {domain}")
    result = subprocess.run(cmd, capture_output=True, text=True, timeout=600)

    if result.returncode == 0:
        results = json.loads(result.stdout)
        registered = [r for r in results if r.get("dns_a") or r.get("dns_aaaa")]
        print(f"[+] Found {len(registered)} registered lookalike domains")

        if output_file:
            with open(output_file, "w") as f:
                json.dump(registered, f, indent=2)
            print(f"[+] Results saved to {output_file}")

        return registered
    else:
        print(f"[-] dnstwist error: {result.stderr}")
        return []

results = run_dnstwist_scan("example.com", "typosquat_results.json")

Step 2: Analyze and Prioritize Results

def analyze_results(results, legitimate_ips=None):
    """Analyze dnstwist results and prioritize threats."""
    legitimate_ips = legitimate_ips or set()
    high_risk = []
    medium_risk = []
    low_risk = []

    for entry in results:
        domain = entry.get("domain", "")
        fuzzer = entry.get("fuzzer", "")
        dns_a = entry.get("dns_a", [])
        dns_mx = entry.get("dns_mx", [])
        ssdeep_score = entry.get("ssdeep_score", 0)

        risk_score = 0
        risk_factors = []

        # High similarity to legitimate site
        if ssdeep_score and ssdeep_score > 50:
            risk_score += 40
            risk_factors.append(f"high web similarity ({ssdeep_score}%)")


…
الأسئلة الشائعة

ما هو typosquatting؟

هو أن يسجّل أحدهم اسم نطاق بخطأ إملائي شائع في الاسم الأصلي، على أمل أن يخطئ الناس في كتابته فيصلوا إلى موقع مختلف قد يكون ضارًا.

ما هي «homoglyphs»؟

هي حروف تبدو متشابهة لكنها مختلفة (مثل «rn» و«m»). وقد تستخدم أسماء النطاقات هذه الحروف لخداع المستخدمين، فتبدو كأنها الموقع الأصلي.

لماذا من المهم التحقق مما إذا كان النطاق مسجلًا؟

إذا لم يكن اسم النطاق المشابه مسجلًا، فلا يمكن استخدامه لاستضافة موقع احتيالي. والتحقق من التسجيل يساعدنا على التركيز على التهديدات الحقيقية.

التفاصيل

الوصف الأصلي من المؤلف

Generate domain permutations with dnstwist and check DNS resolution to detect typosquatting, homograph phishing, and brand impersonation domains registered against your organization. Use when asked to monitor for lookalike domains, investigate a phishing domain, or assess brand-impersonation risk.

repo: mukul975/Anthropic-Cybersecurity-Skills

الشعبية

نجوم GitHub
35k
الترتيب
#7661
الترخيص
Apache-2.0
آخر تحديث
31‏/8‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة