analyzing-typosquatting-domains-with-dnstwist
यह क्या करती है
यह टूल किसी डोमेन नाम के ऐसे कई रूप बनाता है जो असली नाम से बहुत मिलते-जुलते दिखते हैं। फिर जांचता है कि ये नाम रजिस्टर हुए हैं या नहीं, और क्या उन पर मौजूद वेबसाइटें असली वेबसाइट की नकल कर रही हैं। इससे धोखाधड़ी की कोशिशों का पता चलता है।
कब इस्तेमाल करें
- ✓जब आपको शक हो कि कोई मिलते-जुलते वेबसाइट नाम से लोगों को बेवकूफ बना रहा है।
- ✓जब आप अपने ब्रांड की नकल करने वाली धोखेबाज़ साइटें जांचना चाहते हैं।
- ✓जब ईमेल या मैसेज में मिले किसी संदिग्ध लिंक की जांच करनी हो।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-typosquatting-domains-with-dnstwist/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“'mycompany.com' से मिलते-जुलते उन डोमेन की जांच करो जो धोखाधड़ी के लिए इस्तेमाल हो सकते हैं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल आपके दिए डोमेन से मिलते-जुलते हजारों डोमेन नाम बनाता है। फिर देखता है कि ये नाम रजिस्टर हुए हैं या नहीं, और उनसे जुड़ी वेबसाइटें असली वेबसाइट से दिखने में कितनी मिलती हैं। ज़्यादा मिलती हों तो धोखाधड़ी की संभावना होती है।
तकनीकी सामग्री (मूल 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
dnstwistinstalled (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.
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7661
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
gitcrawl
394kयह आपके एजेंट को GitHub issues और pull requests के सेव आर्काइव में खोजने, मिलते-जुलते मामलों को समूह में रखने और लाइव स्थिति जांचने देती है।
slacrawl
394kयह आपके एजेंट को स्थानीय Slack आर्काइव में संदेश खोजने और गिनने, उसकी ताज़गी जांचने और ज़रूरत पड़ने पर उसे ताज़ा करने देती है।
goplaces
394kयह आपके एजेंट को Google Places से जगहें खोजने, उनका विवरण और समीक्षाएं पाने, और जगह के नाम हल करने में मदद करती है, स्क्रिप्ट के लिए JSON आउटपुट के साथ।