The present invention relates to the field of Internet security. More particularly, the invention relates to a method and system for preventing the theft of online sensitive information.
As more users are connected to the Internet and conduct their daily activities electronically, computer users have become the target of an underground economy that infects hosts with malicious software, also known as malware, for financial gain. Unfortunately, even a single visit to an infected web site enables the attacker to detect vulnerabilities in the user's applications and force the download a multitude of malware binaries. Frequently, this malware allows the adversary to gain full control of the compromised systems leading to the ex-filtration of sensitive information or installation of utilities that facilitate remote control of the host.
Internet services are increasingly becoming an essential part of our everyday life. We rely more and more on the convenience and flexibility of Internet-connected devices to shop, communicate and, in general, to perform tasks that would otherwise require our physical presence.
Although very beneficial, Internet transactions can expose user sensitive information. Banking and medical records, authorization passwords and personal communication records can easily become known to an adversary who can successfully compromise any of the devices involved in on-line transactions.
In most cases, a successful exploit results in the automatic installation of a malware binary, also called drive-by download. The installed malware often enables an adversary to gain remote control over the compromised computer system and can be used to steal sensitive information such as banking passwords, to send out spam or to install more malicious executables over time. For instance,
To address this problem and to protect users from being exploited while browsing the web, malware detection tools are required.
It is an object of the present invention to provide a system which is capable of remotely detecting behavior associated with a malware.
Other objects and advantages of the invention will become apparent as the description proceeds.
In one aspect the invention is directed to a method for detecting HTML-modifying malware present in a computer, comprising the steps of:
In one embodiment the method further comprises, responsive to determining that the submitted HTML includes malware or is indicative of the presence of malware, generating one or more preventing tasks.
In another embodiment of the invention, determining whether a modifying element exists comprises checking whether the submitted HTML form includes added form field parameters, and, optionally, comparing said added form field parameter with pre-determined malware parameters. The method of the invention may further comprise parsing the submitted HTML form to identify known malware behavior or a known malware indicator and said parsing may comprise, for instance, identifying one or more parameters as malware-related parameters.
The invention also encompasses a system for detecting HTML-modifying malware present in a computer, comprising:
The system may further comprise software for generating one or more alerting or preventing tasks, responsive to determining that the submitted HTML includes malware or is indicative of the presence of malware.
The logic means may comprise means for checking whether the submitted HTML form includes extra form field parameters, and means for comparing said extra form field parameter with pre-determined malware parameters. The means for checking may be of different types known to the man of the art, e.g., it may comprise software running on the user's PC and/or on remote computing apparatus, or may be embedded in hardware, such as a dedicated appliance, or in any other form.
Software may further be provided for parsing the submitted HTML to identify known malware behavior or a known malware indicator, which may comprise software for identifying one or more parameters as malware-related parameters.
In the drawings:
The present invention relates to a system and method for real-time detection of Internet malware infections. In everyday's life a user accesses a website for example by clicking on a hyperlink to the website. The user then navigates through the website to find a web page of interest. Usually, an HTML form of a desired web page is presented or displayed via a browser window in the user terminal or by other computerized means known in the art. According to an embodiment of the invention, and as will be exemplified hereinafter, the HTML page permits to provide an indication of whether or not the user terminal is infected with a malware.
Optionally, if the user terminal is infected, for example, according to the invention it is possible to completely disable a hyperlink in the presented web page, so that a user cannot follow the link; alternatively the web page may be modified such that, when a user clicks on or passes a cursor over the link, a warning message is displayed. Of course, to prevent accidental clicking, the page may be modified so that clicking on a link on the web page does not cause a link to be followed directly but rather causes a warning to be displayed. Upon detection of a malware, the detection procedure may additionally cause an alert to be sent to the website operator or to any other address.
It will be appreciated that the website server that hosts the original web page may not be directly involved in scanning a user terminal for malicious code, although in some embodiments it may be advantageous for the scanning means and/or the web server to reside on the same server that hosts the original web page. The detection procedure of the web pages is performed either at the browser itself or from a remote server, as will be fully explained hereinafter.
According to this particular embodiment, remote server 11 comprises a malware scanning engine which scans a webpage displayed by browser 13 over network 14 and submitted to it as part of an HTTP request to detect the presence of changes in it, which are indicative of the presence of malware in the user's terminal 12. If the malware scanning engine of remote server 11 detects the presence of such changes, then remote server 11 notifies or alerts about its detection. As an option, remote server 11 may take any appropriate action to prevent the malware from harming the user of terminal 12.
Browser 13 may be any application suitable to provide network browsing capabilities that may be vulnerable to malware, and is not limited to a dedicated browser. User terminal 12 may be any suitable device operating browsers 13. Terminal 12 may include, for example, a personal digital assistant, a computer such as a laptop, a cellular telephone, a mobile handset, or any other device operable to browse the Internet. Terminal 12 may include any operating system such as, MAC-OS, WINDOWS, UNIX, LINUX, or other appropriate operating systems, e.g., portable device systems such as Symbian, Android, etc.
Network 14 may be any interconnecting system and may utilize any suitable protocol and technologies capable of transmitting information such as audio, video, signals, data, messages, or any combination thereof.
Remote server 11 may be any suitable device operable to process HTML web pages displayed by terminal 12 and obtained as described above. Examples of remote server 11 may include a host computer, workstation, web server, file server, a personal computer such as a laptop, or any other device operable to process HTML web pages displayed on terminal 12. Remote server 11 may include any operating system such as MAC-OS, WINDOWS, UNIX, LINUX, or other appropriate operating systems.
According to one embodiment of the invention the HTML page provided to the user by the web server contains functional code (e.g., Javascript) that is suitable to provide to the scanning apparatus information required to perform the desired analysis.
In another embodiment of the invention three elements play a role in the process: 1) A Participating Site (PS), which hosts an HTML page to be requested by a client; 2) a Client Machine (CM) that communicates with the PS via a browser; and 3) a Service Provider (SP), which carries out the active part in the malware discovery process, as will be explained hereinafter.
The PS hosts an HTML page (e.g., a log-in page) which contains an invisible IFrame provided by (or coordinated with) the SP. When the CM receives the HTML page in its browser the IFrame sends a request to the SP server, which supplies it in response to the iFrame. The response contains a Java Script (JS), which collects all or parts of the HTML and sends it to the SP, where it is analyzed to determine whether it contains malware.
In an alternative embodiment of the invention instead of including an invisible IFrame in the HTML that the CM receives from the PS, and then obtaining the JS from the SP, the JS is already contained in the HTML and therefore it sends the HTML directly to the SP (whether in its entirety, or as a hash or other partial or complete transformation), without the need for the intermediate stage of receiving the JS from it, as discussed previously.
Some malwares inject into the HTML JS variables. In those cases the JS provided in the HTML page is suitable to determine whether any JS variable or function exists, which are external to the original JS. In such cases it is not necessary to determine the exact form of the injection and it is sufficient to determine that such extraneous addition has taken place.
Finally, in another embodiment not all the HTML page is analyzed and, instead, portions of the page, which are expected to undergo changes if malware is present, are analyzed, e.g, by comparing hash functions of the existing and of the original page.
As will be apparent to the skilled person the invention allows the indirect but extremely efficient, near real-time detection of malware on a PC, by using an HTML page that is processed on said PC. The following two examples illustrate different embodiments of the invention.
In this embodiment, the “Participating Site” is the site to which the user navigates. It cooperates with the “Service Site” which carries out the actual malware detection, and may return the result to the Participating Site via the browser or via a different path.
The Participating Site embeds a small HTML/Javascript snippet (provided at setup time by the Service Site) that embeds an invisible (or near invisible) frame the content of which comes from the Service Site. Two examples of such snippet are detailed below. The first is Javascript based, and the second is pure HTML:
The URL accessed, https://www.service.site/path, can redirect to a different URL. The final URL may contain strings that would trigger the malware, i.e. if the malware only performs HTML injection on pages whose URLs contain the string “logintobank”, then the page at https://www.service.site/path can redirect to e.g. https://www.service.site/path?foo=logintobank&bar=123, which is enough to trigger the malware. The page at https://www.service.site/path contains HTML to further trigger HTML injection by the malware. For example, if the malware searches for “username: <INPUT TYPE=TEXT><br>” and appends “ATM card PIN <INPUT TYPE=PASSWORD><br>” to it, then the HTML page at https://www.service.site/path may contain the following:
In this case, the whole page contents are sent to https://www.service.site/analyze, where they can be analyzed. The server page https://www.service.site/analyze can for example search for the string “ATM card PIN <INPUT TYPE=PASSWORD><br>” inside the page, which is an indication for malicious activity inside the browser, or merely compare the page sent with the original page.
In the example above, the server can record the infection status for later retrieval, or send an alert immediately to the participating site and/or to other parties. Another variant may return the infection status to the browser, and the above script can read it out and act upon it in real time, e.g. alerting the user or sending a notification to the participating site.
In this example all work is done within the context of the Participating Site. In fact, the work is done within the context of the pages originally targeted by the malware for HTML injection. Moreover, the work is done at the client's side (within the brower).
Assuming for the purpose of this example the page https://www.participating.site/logintobank contains the following HTML (with the added snippet in italics and boldface):
The Javascript snippet searches the page content for the modification introduced by the malware, and can take appropriate actions (e.g. inform the participating site, alert the user, or modify the page to block the transaction) if found.
In this example, the malware's HTML injection component (i.e., the component is “installed” on the user terminal) adds a parameter to a “commit wire transfer” HTML form. The HTML form, when submitted to remote server 11, contains this extra parameter, which signals to the malware's HTTP interception component that some action needs to be taken with this HTTP request.
For example, the original web page may contain the following HTML code:
When a malware (that was already installed in user terminal 12) detects such code lines, which represent a “commit wire transfer” HTML form, in an incoming HTML web page, it silently injects its own HTML code into it. For example, the malicious code can be similar to the following code which contains the parameter “op”:
As a result, the original HTML form is being modified, and after it was injected with the aforementioned malicious code, it may now looks like the following:
The results of the added malicious code can be seen by the extra HTML line: <input type=“hidden” name=“op” value=“1”>.
According to an embodiment of the present invention, in order to detect such malware, the malware scanning engine operates as follows: it embeds, the HTML form as displayed in the user terminal 12, into a web page served to the user terminal 12. The served web page automatically submits the HTML form, for example, by using the following JavaScript code (i.e., HTTP/HTTPS request):
At the remote server 11, the malware scanning engine of the present invention checks whether the submitted HTML form contains extra parameter(s), such as whether the HTML form contains the pre-defined extra parameter “op”. If such parameter is found in the HTTP/HTTPS request, then the malware scanning engine determines that a malware exists on the user terminal 12 from which the HTML form was submitted.
The following is an example for a PHP code (on the remote server 11 side) that implements the relevant parts of txn.php:
Of course, detection can also take place in client-side (i.e., in the user terminal 12), or in a combination of client-side and remote server-side.
Some malware families inject HTML that fetches data from their Command & Control servers in real time. An example for such data is “mule account” information, i.e. the details of the receiving account for a fraudulent transaction (this is customarily known as a “mule account” since the account typically belongs to an unsuspecting accomplice who immediately wires the money out to the actual fraudster).
Using the above example, an injected HTML that fetches a mule account in real time can appear as the following, usually, right after the original form of the HTML code:
In this example, the “mule” variable is populated in runtime by the JavaScript downloaded from the address:
In order to detect such injection, the system of the present invention needs to embed the above form in a web page, and to measure the time it takes the browser to render the form (and the possible injection). For example, this can be done as following:
If the variable t_diff is relatively small, it means that the HTML was probably not injected into the original HTML code. If the variable t_diff is relatively large, it means that the browser loaded the JavaScript from the malicious Command & Control server, which is typically “remote” in network terms (can be hundreds of milliseconds in round-trip). Time measurement needs to be in milliseconds, which is available in JavaScript by using the Date object's getTimeQ method. In lab experiments, t_diff was relatively small when no injection was performed (i.e., numbers in range of 0-30 milliseconds), whereas with injection, hundreds of milliseconds were observed.
As will be appreciated by the skilled person the invention is suitable to detect malware regardless of the actual modifying agent injected into the HTML code by the malware, since it bases its detection on the finding that a difference exists between the HTML page or form served to the user's browser, and the one originating from the remote location to which the malware found on the user's computer has no access.
The present invention provides malware detection tools which protect users from being exploited while browsing the web. As described hereinabove, the system and the method used by the present invention are capable of remotely detecting behavior associated with malware.
While some embodiments of the invention have been described by way of illustration, it will be apparent that the invention can be carried into practice with many modifications, variations and adaptations, and with the use of numerous equivalents or alternative solutions that are within the scope of persons skilled in the art, without departing from the spirit of the invention or exceeding the scope of the claims.