Code Monkey home page Code Monkey logo

spotphish's Introduction

SpotPhish: Zero-Hour Phishing Protection

A browser extension for Chrome and Firefox which provides zero-hour phishing protection.

Contents

Latest release

Latest stable release https://github.com/spotphish/spotphish/releases/latest

Introduction

SpotPhish is a Chrome extension which provides zero-hour phishing protection by creating large visual differences between legitimate sites and phishing pages which attempt to mimic them.

Attackers can automatically create thousands of customized phishing emails, domains and pages which, being newly minted, cannot be caught by the blacklist-based methods present on most browsers. High-value individuals and employees of sensitive organizations are especially vulnerable to such zero-hour phishing attacks.

The extension increases the contrast in user experience between browsing a genuine page versus an imitation page in the following manner:

  • Visiting a genuine page triggers a popup with a personal security image, which is displayed for a few seconds.
  • Screenshots of the active browser tab are taken and compared with "mugshots" of protected pages. The user is alerted if the current page visually resembles a protected page, but belongs to an unknown domain.

Screenshots are processed locally in the browser and discarded immediately; they are not stored or sent to an external site. More information and technical details here.

Paypal Greenflag

Real Paypal login page


Paypal Redflag

Paypal phishing page

Installation

To get this running from the source code on your local machine:

  • Clone this git repository
  • Navigate to "chrome://extensions".
  • Click the checkbox next to "Developer mode" in the upper right hand corner.
  • Click the "Load unpacked extension..." button below the "Extensions" title.
  • Select the "spotphish" folder from your filesystem
  • Existing pages will not be affected; reload for protection

Usage

Once the plugin is installed, try visiting the following links:

  • Paypal real login page: You should see a popup with a security image, which will fade in a few seconds. This is an indication that the page is a protected page and its URL has been verified.

  • Paypal phishing sample (Don't worry, it's harmless): This page contains a screenshot of a Paypal phishing page and will trigger an alert warning about possible phishing.

To customize the behaviour of the plugin, click the icon at the right of the address bar and select Settings.

Choose a security image

Your security image is flashed in a popup whenever you visit a protected page. It is an indication that the page URL has been verified and it is safe to enter your credentials. This image is common across all protected pages.

Some points to keep in mind while choosing a security image:

  • An image with personal and emotional significance works better than generic defaults.
  • Choose an image you would miss if it didn't show up. Pictures or animated gifs of pets, loved ones, favorite movie clips are good choices.
  • Pick an image which is not publicly associated with you, like your profile pictures or photos shared on social media.

To upload an image, or to change the selected image, visit Settings → Security Image.

Protecting a page

Protected pages are webpages being monitored by the plugin, as they are potential targets for phishing attempts. Protection comes in two flavours:

  • Basic: Your security image is flashed in a popup whenever you visit a protected page. This means the page URL has been verified to be genuine and you can safely enter your creds.

  • Enhanced: The extension has a "mugshot" of the protected page - a distinctive snippet by which most people would identify the page. In addition to flashing the security image when the original page is visited, the extension monitors all browsing activity, taking periodic snapshots of the active tab. It raises an alarm if the mugshot is present anywhere the snapshot of the current page, and the current page does not belong to a known, safe domain.

Basic mode has negligible overhead and can be turned on for any number of pages. The image comparison in enhanced mode is done using computer vision techniques, and adds some CPU overhead. Therefore, we optimize it to run only under certain conditions: if the page contains a visible password field and is not part of a safe domain. The domain of a protected page is automatically enrolled as a safe domain, i.e. one which is highly unlikely to host phishing pages.

Login pages of popular and heavily-phished sites like Google, Facebook, Amazon and Paypal are protected out of the box. To protect any other login page, say of your bank, visit the page containing the login dialog, click on the SpotPhish icon to the right of the address bar and select Protect Page.

If you want enhanced protection, you will be prompted to select the "mugshot" of the page. Select the area which distictly identifies the brand and function of the page from other such pages - the logo, or login dialog are good choices.

You can manage protected pages from the Settings page of the plugin.

Unprotecting a page

To remove protection from a page, visit Settings → Protected Pages and disable or remove the desired page.

Safe Domains

A safe domain is one which is well managed, secure and highly unlikely to host phishing pages. These include Google, Facebook, Amazon and every domain for which we have added a protected page. We skip enhanced mode checking for these pages and reduce the CPU overhead. You can add and remove other domains to this list by visiting Settings → Safe Domains.

Domains which have been added because they host a protected page cannot be removed from this tab.

Troubleshooting

  1. I'm getting a lot of false alarms on this site!
    If you trust the site, consider adding it to Safe Domains.

  2. No, really, why does it think this page looks like Amazon?
    Look at the correspondence image shown in the red warning dialog - the mugshot of the protected page and the current page side by side, with green lines connecting the corresponding features. You can view a larger version of this image by right-clicking and selecting the browser's Open Image in New Tab. The current image matching strategy is very much a work in progress; it might consider two pages alike which look very different to the human eye.

  3. This page looks like a protected page, but I didn't get warned!
    If a mugshot of the protected page exists (enhanced mode), it might still fail to trigger a warning due to limitations of the image matching code. The less a fake page resembles the original protected page, the less likely it will trigger a warning. You will not get a warning in the following cases: * The page had only basic protection - no mugshot.` * The current page is part of a safe domain. * The current page does not contain a password field.

History

This project is inspired by the paper The Future of Ad Blocking by Storey et al, which introduces a novel perceptual ad blocking technique. It ignores HTML markup and blacklists and uses lightweight computer vision techniques to "see" the page like a human and recognize features of the ad (like the AdChoices icon) which must be present for regulatory purposes.

We observe that the same constraint holds for phishing - HTML markup may be obfuscated, blacklists may be thwarted, but at the end of the day, the rendered phishing page must look, in human eyes, very similar to the page it imitates. Thus, it can be identified by computer vision techniques.

Credits

Components used and their licenses

Component License
JSFeat MIT
JCrop MIT
Screenshot Capture MIT
Material Design Lite Apache 2
IDBWrapper MIT
JQuery MIT
Ad Blocking MIT
Shield icon CC BY-SA 3.0

License

MIT

Contact

Email us at [email protected] or follow @spotphish.

spotphish's People

Contributors

anil5356 avatar deepak-shinde avatar deepakshinde avatar ganeshv avatar monojkhatua avatar storey avatar sudhirkr avatar vijay-coriolis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spotphish's Issues

Default protected site allows only one url to get deleted

In default protected site if we delete more than 2 pages, it deletes only the last one selected for deletion.
Steps to reproduce:

Trigger the image matching only after an onBlur event.

This will help improve performance of our plugin. Once the user enters name, user will have to click on password box(or hit tab). This will trigger an onblur event. We should start looking for images only post onBlur. This comes with a rider. If we are too late to respond, the user might submit the form.

Security image shown after login is successful

While logging into facebook, the security image is shown after the login is successful and at every time when the home page is reloaded. Once the password is given, there is no need for the security image to be shown. I do not know whether it is a feature that you would like to have or an error. Please elaborate more on this.

Re-enabling custom site does not show green flag

Steps to reproduce:

  • Protect SBI login page
  • Custom site created in Protected Page "retail.onlinesbi.com"
  • Disable custom site by deselecting a check-box
  • Re-enable custom site by selecting a check-box
    Impact:
  • Navigate to SBI login page, it does not show green flag
  • Navigate to any of the default protected sites, it does not show green flag
  • Does not detect a phishing site
  • Try to protect/unprotect any site, does not give an option on clicking an extension icon

Unprotected site retains in Safe Doamins

Steps to reproduce:

  • Protect SBI login page
  • 'retail.onlinesbi.com' gets added to safe domains list
  • Unprotect the site
  • Navigate to Safe Domains page and delete SBI domain manually, gets deleted
  • Reload options page, SBI domain retains in safe domains list

Issues related to Security Image Page

  1. The Uploaded image should be deleted only when another image is uploaded. It should retain newly uploaded image, follow steps to reproduce:
    • Upload an image, it will be set as a security image
    • Set another image image from defaults
    • Now try to set uploaded image as a security image, you can't.
  2. When restart the chrome browser, none of the default images is marked as favorite
  3. When a new security image is uploaded, earlier selected image from defaults and newly uploaded image both marked as favorite
  4. Correct an error message, actual message "The image size (size) should not be (n)ore than 2MB", should be "The image size should not be more than 2MB". Find diff in brackets.

Report Phishing and Report False Alarm features are not working.

The Report Phishing and Report False Alarm features are not functional now. When we click on this two buttons the UI moves nowhere. At least we should close the popup on clicking the above two buttons.

Other suggestion is to disable/hide these buttons for the current release.

Explore alternative approaches to minimise false negatives

@deepakshinde's idea is that we can increase accuracy of our prediction if we reinforce image matches with other interest areas from the DOM of the page. We can look for the favicon on the page and also the title of the page to look for anomalies.

We can try using phash for favicon, since it is lightweight and extracting favicon from the page is not difficult given that we know where to look for it. On top of this we can also look at the title of the page and see if it matches with any of the keywords for our whitelisted sites.

Restore function does not restore debug mode

Restore function does not disable debug mode if user has enabled it.
Steps to reproduce:

  • Switch-on the debug mode from Advanced Settings
  • Restore to factory defaults
  • Debug mode is still on

Security image not displayed

The security image which was seen while accessing gmail has disappeared all of a sudden. One good thing about this is that, now I have got used to the security image that I am alerted by the lack of it(hence, reached the goal of spotphish). Possible reason behind this anomaly might be that the link to login page has changed. But anyway the logo is the same, so is spotphish not supposed to alert me since I am accessing a webpage which has the same logo as gmail but is not genuine? Can you please look into this.

Separate out the various interpretations of whitelists

Currrently whitelist is used to refer to three different sets of websites:

  1. Green flagged URLs : These are are the ones on which we are going to show the secure image.
  2. Known safe domains : These are the domains that are well knwon, and we skip the red-flag approach on these domains completely.
  3. Red flag list : This is the list of the sites for which we have the brand logo and other info related to the brand. This is the list of sites we defend from phishing attacks. This list cannot be appended to by a user.

Enabling/Disabling Protected Page should enable/disable all urls

Steps to reproduce:

  • Navigate to SpotPhish Settings > Protected Pages
  • Disable default site Amazon by deselecting a check-box
  • All underlying urls should be disabled
  • All urls should be enabled when re-enabled the site.
    Note: It does stop protecting urls from disabled site, but fails to render the changes on to the page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.