Ethereum Phishing Domain Detector

1.2.0 · active · verified Sun Apr 19

The `eth-phishing-detect` utility is a JavaScript library designed to identify and block domains known for targeting Ethereum users with phishing attacks. Maintained by MetaMask, it provides an up-to-date list of malicious websites, actively evolving its blocking policy to include sites that impersonate established services or attempt to collect cryptocurrency keys. The package is currently at version `1.2.0` and was last published about 4 years ago (as of April 2026), with prior versions indicating a more active cadence for configuration updates. It differentiates itself through its direct integration and maintenance by a major wallet provider, offering a robust and proactive defense mechanism against specific web3-related threats. Developers can use it to integrate real-time phishing detection into their applications, enhancing user security by preventing access to known harmful sites.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates initializing the `PhishingDetector` with custom lists and checking various domains for phishing status, including legitimate, blacklisted, and fuzzy-matched examples.

import { PhishingDetector } from 'eth-phishing-detect/detector';

// Example configuration (these are just illustrative values)
const whitelist = ['mylegitwallet.com'];
const blacklist = ['fakephishingsite.net'];
const fuzzylist = ['fuzzyphishing.io'];
const tolerance = 2;

const detector = new PhishingDetector({
  whitelist,
  blacklist,
  fuzzylist,
  tolerance
});

// Check a known phishing domain
const resultPhishing = detector.check('fakephishingsite.net');
console.log('Is fakephishingsite.net phishing?', resultPhishing); 
// Expected: { type: 'blacklist', result: true, url: 'fakephishingsite.net' }

// Check a legitimate domain
const resultLegit = detector.check('google.com');
console.log('Is google.com phishing?', resultLegit);
// Expected: { result: false, url: 'google.com' }

// Check a fuzzy match
const resultFuzzy = detector.check('fuzzyphising.io'); // typo 'phising'
console.log('Is fuzzyphising.io phishing?', resultFuzzy);
// Expected: { type: 'fuzzylist', result: true, url: 'fuzzyphising.io', ... }

view raw JSON →