Detection of phishing attempts
A method for alerting a service provider and/or a user of a web browser of a phishing attempt comprises providing on a page that it is desired to protect against phishing, a Javascript that when caused by a phishing page to run not in the context of the original page generates an indication that a phishing attempt may exist.
1. An anti-phishing system comprising:
a non-transitory, computer-readable storage medium; and
a log-in webpage of a service provider, the log-in webpage stored on the computer-readable storage medium, the log-in webpage comprising Javascript code configured to
determine, when the Javascript code is running, that the Javascript code is running in the context of a phishing website,
add, in response to determining that the Javascript code is running in the context of the phishing website, an onSubmit event handler on the phishing website,
generate, in response to determining that the Javascript code is running in the context of the phishing website, an indication of a phishing attempt,
detect, using the onSubmit event handler, when a user submits credentials in the context of said phishing website,
recover said credentials using said onSubmit event handler, and
send said indication of a phishing attempt and said credentials to a server configured to protect an account of the user.
2. An anti-phishing method comprising:
configuring a log-in webpage stored on a non-transitory, computer-readable storage medium of a service provider, the log-in webpage comprising Javascript code configured to
determine, when the Javascript code is running, that the Javascript code is running in the context of a phishing website,
add, in response to determining that the Javascript code is running in the context of the phishing website, an onSubmit event handler on the phishing website,
generate, in response to determining that the Javascript code is running in the context of the phishing website, an indication of a phishing attempt
detect, using the onSubmit event handler, when a user submits credentials in the context of said phishing website,
recover said credentials using said onSubmit event handler, and
send said indication of a phishing attempt and said credentials to a server configured to protect an account of the user; and
providing access to the log-in web page.