Add domain squatting detection feature and UI#120
Draft
Zacgoose wants to merge 8 commits intoCyberDrain:devfrom
Draft
Add domain squatting detection feature and UI#120Zacgoose wants to merge 8 commits intoCyberDrain:devfrom
Zacgoose wants to merge 8 commits intoCyberDrain:devfrom
Conversation
Introduces domain squatting detection to protect against typosquatting, homoglyph, and combosquatting attacks. Updates schema, detection rules, and documentation; adds new protected domains; enhances the options UI with collapsible config sections and domain squatting controls; and integrates the detector module into the background script. We have also tuned the re-scan amount and triggers to be more aggressive since the performance of the page scanning is much better now
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces comprehensive domain squatting detection to protect users from typosquatting, homoglyph substitution, and combosquatting attacks. The feature uses four detection algorithms (Levenshtein distance, homoglyph detection, typosquatting patterns, and combosquatting) to identify suspicious domains that closely resemble legitimate sites.
Key Changes:
- Adds a new
DomainSquattingDetectormodule with multiple detection algorithms - Integrates domain squatting checks into the content script's protection flow, running before phishing detection
- Updates scan timing parameters to be more aggressive (MAX_SCANS increased from 5 to 8, SCAN_COOLDOWN reduced from 1200ms to 800ms)
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/modules/domain-squatting-detector.js |
New module implementing domain squatting detection with Levenshtein, homoglyph, typosquat, and combosquat algorithms |
scripts/content.js |
Integrates domain squatting detection, adjusts scan timing/frequency, adds domain squatting warning banners |
scripts/background.js |
Initializes domain squatting detector, handles check_domain_squatting messages |
scripts/blocked.js |
Adds domain squatting-specific display logic and technical details |
options/options.js |
Implements collapsible config sections UI, adds domain squatting webhook configuration |
options/options.html |
Adds webhook checkbox for domain squatting events, moves inline scripts to options.js |
options/options.css |
Adds styles for collapsible sections and expandable lists |
rules/detection-rules.json |
Defines domain squatting configuration with 30+ protected domains |
config/managed_schema.json |
Adds schema for domain squatting policy management |
docs/features/domain-squatting-detection.md |
New comprehensive documentation for the feature |
docs/settings/detection-rules.md |
Updates to explain dual protection of URL allowlist |
docs/SUMMARY.md |
Adds Features section with domain squatting documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Signed-off-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Signed-off-by: Zacgoose <107489668+Zacgoose@users.noreply.github.com>
Contributor
Author
|
This needs some more work, I will come back to it soon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces domain squatting detection to protect against typosquatting, homoglyph, and combosquatting attacks.
Updates schema, detection rules, and documentation; adds new protected domains; enhances the options UI with collapsible config sections and domain squatting controls; and integrates the detector module into the background script.
We have also tuned the re-scan amount and triggers to be more aggressive since the performance of the page scanning is much better now