Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow different "warning" levels #2063

Closed
bdresser opened this issue Jul 11, 2018 · 1 comment
Closed

Allow different "warning" levels #2063

bdresser opened this issue Jul 11, 2018 · 1 comment

Comments

@bdresser
Copy link

bdresser commented Jul 11, 2018

Rather than a monolithic blacklist, we could include different levels of warning that we display to the user.

Could correlate to severity of reported issue, number of reports, recency of compromise, etc.

Probably needs some discussion or research.

Relates to MetaMask/metamask-extension#4776

@blurpesec
Copy link
Contributor

blurpesec commented Aug 10, 2018

Kicking off discussion here.

Currently eth-phishing-detect detects and spits out the following messages:

  1. { type: 'whitelist', result: false } - In the event of a domain being on the whitelist.
  2. { type: 'blacklist', result: true } - In the event of a domain being on the blacklist.
  3. { type: 'fuzzylist', result: true, match: NUM } - In the event of a domain having a sufficiently-small string edit distance from one of the domains on the fuzzylist.
  4. { type: 'all', result: false } - In the event of a domain not being whitelisted, blacklisted, or detected by the fuzzylist.

I propose that we change this to include more information on levenshtein-checks. The suggested outputs will then be:

  1. { type: 'whitelist', result: false, input: 'example.com' } - In the event of a domain being on the whitelist.
  2. { type: 'blacklist', result: true, input: 'example.com' } - In the event of a domain being on the blacklist.
  3. { type: 'fuzzylist', editdistance: NUM, result: true, input: 'example.com', match: 'example.com' } - In the event of a domain having a sufficiently-small string edit distance from one of the domains on the fuzzylist. NUM, in this instance is a specific number (the edit distance from the levenshtein distance detection).
    Example 1: { type: 'fuzzylist', editdistance: 2, result: true, input: 'mycriptto.com', match: 'mycrypto.com' } the editdistance would be 2 because the levenshtein distance between mycriptto.com and the detected domain mycrypto.com is 2.
  4. { type: 'all', result: false, input: 'example.com' } - In the event of a domain not being whitelisted, blacklisted, nor detected by the fuzzylist.

As it pertains to MetaMask, MetaMask can handle the occurrences independently.

  • A return of { type: 'fuzzylist', editdistance: 2, result: true, input: 'mycriptto.com', fuzzydomain: 'mycrypto.com' }, MetaMask could choose to show a warning instead of a block, due to the check returning true because of fuzzylist detection with a severity of 9 (the number of letters in mycrypto.com minus the edit distance between the input domain and mycrypto.com) out of 11 (the number of letters in mycrypto.com the closest detected fuzzy comparison within detectable range), or 81.8% severity.
  • A return of { type: 'blacklist', result: true, input: 'myeitherwallet.com' }, MetaMask can choose to show a block, because this domain, itself, has been strictly blacklisted, having a severity of 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants