Protecting a computer coupled to a network from malicious code infections

Computer implement methods, apparati, and computer-readable media for enabling a first computer (12) to determine that it is safe to communicate with a second computer (10) coupled to the first computer (12) over a network (15). In a method embodiment of the present invention, the first computer (12) detects (21) that the second computer (10) has initiated a test open of a file (14) associated with the first computer (12). When the test open is followed by an actual open command by which the second computer (10) seeks to actually open the same file (14), the first computer (12) determines (23) that it is safe to communicate with the second computer (10).

RELATED APPLICATION

This patent application claims priority upon commonly owned U.S. patent application Ser. No. 10/846,100 filed May 14, 2004, entitled “Opening Computer Files Quickly and Safely Over a Network”, which patent application is hereby incorporated by reference in its entirety into the present patent application.

TECHNICAL FIELD

This invention pertains to the field of protecting a computer coupled to a network from malicious code infections.

BACKGROUND ART

As used herein, “malicious computer code” is any code that enters a computer without the knowledge and/or consent of an authorized user of the computer and/or a system administrator of an enterprise incorporating the computer. Thus, “malicious computer code” encompasses, but is not limited to, viruses, worms, Trojan horses, spam, adware, and unwanted popups. The most common types of malicious code thwarted by the present invention are viruses, worms, and Trojan horses.

With reference toFIG. 1, when a computer12is running in a network environment, said computer12may be accessed by other computers10that are also coupled to the network15.FIG. 1illustrates a plurality n of such network computers10. Computers10,12may be part of an enterprise1, such as a corporation or university. n can be any positive integer.

When computer12is a server, it is particularly susceptible to being accessed by other computers10, because the raison d'être of a server is to be so accessed. When computer12is a client computer, it may also be accessed by network computers10via file shares established between computer12and one or more network computers10. These file shares may have been established for legitimate business, academic, or governmental purposes. Interposing a firewall between computer12and the network15would not protect computer12from malicious code entering through one of these file shares, because the firewall would be programmed to intentionally allow communication between computer12and those computers10with which computer12is authorized to share files. It is desired to prevent a computer10that is infected with malicious code from modifying any files on computer12. Such a modification might damage the infected file, so that it may not be completely repairable, or not repairable at all; or the file could be completely deleted. It is also desired to minimize the coupling between computer12and a computer10that is unprotected. By “unprotected” is meant that such a computer10either does not have a malicious code scanning means, or else it has a malicious code scanning means but said means is ineffective, e.g., it contains outdated malicious code definitions.

Any one or more of computers10,12could be a laptop computer or a PDA (Personal Digital Assistant) that an employee of, or a vendor to, enterprise1has coupled to network15. Such computers10,12are capable of infecting other enterprise computers10,12with malicious code, and are also susceptible to themselves being infected with malicious code (e.g., by a third party), thus presenting dangers when they are coupled to network15.

The present invention protects computers10,12in a network environment, without imposing a high administrative burden in tracking down and protecting unprotected computers10,12.

DISCLOSURE OF INVENTION

Computer implement methods, apparati, and computer-readable media for enabling a first computer (12) to determine that it is safe to communicate with a second computer (10) coupled to the first computer (12) over a network (15). In a method embodiment of the present invention, the first computer (12) detects (21) that the second computer (10) has initiated a test open of a file (14) associated with the first computer (12). When the test open is followed by an actual open command by which the second computer (10) seeks to actually open the same file (14), the first computer (12) determines (23) that it is safe to communicate with the second computer (10).

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

With reference toFIG. 3, computer10and computer12are coupled to each other over a network15. Computer10can be one of a plurality of network computers10as illustrated inFIG. 1. As used herein, “coupled” means any direct or indirect coupling by which computers10and12may communicate with each other. Network15can be any wired or wireless network, or any combination of wired and wireless networks. Thus, network15can comprise the Internet, a local area network (LAN), a wide area network (WAN), a WiFi network, a Bluetooth network, etc. Computers10,12can be any combination of server computers and client computers. Associated with computer10is malicious code scanning module11. This may be a real-time module that is capable of detecting malicious code within a computer file such as file14associated with computer12. A suitable example of module11is AutoProtect manufactured by Symantec Corporation of Cupertino, Calif.

Similarly, computer12may have associated therewith a malicious code scanning means33. As with scanning module11, scanning means33may be a real-time module capable of detecting malicious code in a computer file such as file14. Results of the scanning of file14by scanning means33may be placed into a scanned file cache16, which can be any type of memory device associated with computer12.

The broad method steps of the present invention may be performed by suitably modifying scanning means33. These modifications can be performed by one of ordinary skill in the software art. Alternatively, said method steps may be performed by one or more computational modules39associated with computer12, or by a combination of said computational modules39working in conjunction with scanning means33. Similarly, computer10can be fitted with special computational modules38suitable for use in the present invention, and/or scanning module11can be appropriately modified for use in the present invention. As a shorthand notation, whenever it is stated herein that computer10performs a certain action, it is meant that the action is performed by module11and/or modules38. Similarly, whenever it is stated herein that computer12performs a certain action, it is meant that said action is performed by scanning means33and/or modules39. All of the modules and means mentioned in this paragraph can be implemented in software, firmware, hardware, or any combination thereof.

A method embodiment of the present invention will now be described in conjunction withFIG. 2. The method starts at optional authentication step20, which will be described below. At step21, computer12detects that computer10seeks to initiate a test open of file14, i.e. the test open illustrated as step41inFIG. 4.

One technique by which computer12can detect such a test open in step21is to observe that computer10is requesting to open a dummy file having a pathname consisting of the pathname of file14, plus a tag appended to said file14pathname. The tag may comprise a globally unique identifier (GUID) of computer10(useful to identify computer10when computer10is but one of n computers in an enterprise1) and the date that malicious code definitions32associated with malicious code scanning module11were last updated. The GUID can be based on the MAC (Message Authentication Code) associated with computer10. In this embodiment, the presence of the tag creates a pathname for a dummy file that is not likely to exist within the purview of computer12. Thus, computer12should not be able to open such a file. If remote computer12is able to open such a file, it indicates that something is wrong: perhaps a malicious individual is spoofing the system, or the presence of the tag has accidentally resulted in a valid pathname for a file other than file14. Thus, if computer12opens a file during the test open, in one embodiment computer10retries the test open by changing the GUID portion of the tag so that the augmented pathname does not correspond to an actual file14.

An example of a pathname of file14is:

In this example, the pathname augmented with a tag having a GUID of computer10and the most recent definitions32update date might be:

The contents of the tag are tailored to preselected acceptability criteria by which computer10determines, in response to feedback received from computer12, whether computer12has an acceptable malicious code scanning means33(step42). “Acceptability” can be defined in a number of ways, and is pre-determined prior to operation of the present invention. For example, an “acceptable” malicious code scanning means33can be defined to be one which satisfies one or more of the following criteria: the scanning means33is present, active (switched on), capable of scanning file14, contains malicious code definitions37that are at least as current as definitions32associated with malicious code scanning module11, has an acceptable definition window, scans all appropriate file extensions, has a heuristic level set to at least a certain amount, has any other settings that the means33is capable of. An “acceptable definition window” can be a time window such as “malicious code definitions are not more than a week old”.

If computer10determines that computer12has acceptable malicious code scanning means33, computer12scans file14(step49), then computer10issues a command to actually open file14(step43), relying on said scan by computer12. The rationale for this reliance is that if computer12has an acceptable malicious code scanning means33, there is no need for computer10to perform a slow, cumbersome malicious code scan on file14over network15.

If, on the other hand, computer12does not have an acceptable malicious code scanning means33from the point of view of computer10, computer10scans file14over the network15(step44), since computer10cannot rely on any scanning of file14by computer12. Then computer10inquires (step45) as to whether the result of the scan indicates that malicious code may be present within file14. If not, computer10initiates a command to actually open file14as before (step43).

If, on the other hand, the above inquiry indicates that malicious code may be present within file14, computer10performs (step46) at least one defensive measure from the group of measures comprising: a false positive mitigation technique; a verification that malicious code is in fact present within file14; an alert to a system administrator for enterprise1; aborting the opening of file14; quarantining file14; sending file14to an antivirus research center such as Symantec Antivirus Research Center (SARC); setting a flag to preclude subsequent downloads of files from computer12; initiating an investigation as to why computer12may have become infected with malicious code; any other measure that one of prudence and good judgment might take when informed that malicious code might be present.

As stated previously, the contents of the tag are tailored to the preselected acceptability criteria. For example, if one of the acceptability criteria is that scanning means33must have its heuristic level set to at least a certain amount, then this required heuristic level is part of the tag. It also may be desirable to affix the name of computer10and/or the IP (Internet Protocol) address of computer10as part of the tag. This enables tracing the origins of malicious code if the attempted open causes malicious code to enter computer12. Components of the tag are stored in a memory device associated with computer12prior to execution of step22.

In response to the test open, computer12sends to computer10(step47) a message conveying information pertaining to malicious code scanning capabilities of computer12. In one embodiment, the message is sent over the same file open channel that is used for the opening of file14over network15. Using the same file open channel makes the query of computer12quick and simple, and piggybacks on the security of the file open channel itself. This simplicity is evident at both computer12and computer10. Computer12checks the end of the pathname for the tag, compares definition dates and file exclusions (if these are part of the acceptability criteria), and returns the message to computer10. Computer10manufactures a file open that is a simple modification of an existing open, and checks the message received from computer12.

In an alternative embodiment, the message from computer12to the local computer12is sent via a channel other than the file open channel. This can be done by opening a port and sending packets back and forth between the two computers10,12using TCP (Transport Control Protocol), UDP (Universal Datagram Protocol), ICMP (Internet Control Management Protocol), etc. Other possibilities are to use DCOM (Distributed Communications Object Method), WMI, SNMP (Simple Network Management Protocol), RPC (Remote Procedure Calls), SSL (Secure Socket Layers), TLS (Transport Layer Security), etc.

The message returned from computer12to computer10contains information pertinent to the pre-established acceptability criteria. In one embodiment, said message contains information as to whether computer12has malicious code scanning means33, and whether definitions37associated with said scanning means33are at least as new as the definitions32associated with the malicious code scanning module11of computer10. Computer10then decodes the message (step42). When the message reveals that computer12has malicious code scanning means33, and the malicious code scanning means33has definitions37at least as new as the definitions32in the malicious code scanning module11associated with computer10, computer12scans file14(step49), then computer10issues a command to actually open file14(step43), relying on said scan by computer12. When these acceptability conditions are not satisfied, however, computer10does not rely on computer12to perform the scan, and instead computer10performs a malicious code scan of file14over the network15(step44), slow and cumbersome as that might be.

The message returned from computer12to computer10can be a set of one or more error messages. For example, in a WIN32 operating system, the conventional 32 bit error code can be used. For example:The error message “file not found” can mean that there is no scanning means33associated with computer12;The error message “access denied” can mean that there is scanning means33associated with computer12; andThe error message “error 18” can mean that there is scanning means33associated with computer12and it meets all the pre-established acceptability criteria.

In one embodiment, when computer12detects the test open that has been initiated by computer10, computer12asynchronously begins to scan file14using scanning means33. The rationale for this is that the presence of a test open indicates that there is a high probability that computer12will be called upon shortly to perform said scan, so it may as well start as soon as possible to save time. Such a scan may very well be completed before the “actual open” command is issued by computer10. The results of the scan by computer12are typically placed into scanned file cache16, which is typically set up as a LRU (Least Recently Used) cache, i.e., the most recent results are placed at the top of the cache.

Let us now return to a discussion ofFIG. 2. At step22, computer12, using the information from the tag that it had stored previously in step21, determines whether the test open is followed (say, within a preselected period of time) by a command emanating from the same computer10to actually open the same file14that was the subject of the test open detected in step21. When this condition is satisfied, the method proceeds to step23, where computer12allows the actual open of file14to proceed. In other words, computer12determines that it is safe to communicate with computer10, because computer12has determined that computer10is equipped with the clever means described above for determining that computer12has an acceptable malicious code scanning means33.

If, on the other hand, the condition tested in step22is not satisfied, the method proceeds to step24, where computer12determines that it is not altogether safe to communicate with computer10, and thus computer12limits subsequent communications with computer10. Such a limitation may comprise refusing to communicate at all with computer10, refusing to share files such as file14with computer10, allowing computer10to read from file14but not to write to file14, or any other limitation that computer12wishes to impose. The limitation may be a function of the type of file14. For example, if file14comprises executable code, computer12may impose more severe limitations than if file14does not contain executable code.

In order to provide additional protection to computer12before computer12communicates with computer10, optional authentication step20can be performed.

One way of performing step20is to use public key cryptography, in which the two computers10,12exchange digitally signed mutual authentication packets. This requires that the private keys of the computers10,12be hidden from malicious persons. Otherwise, malicious code could be written to spoof the authentication.

Another way to provide the authentication of step20is for the two computers10,12to trade a malicious code fragment for a unique malicious code identifier. The malicious code identifier is a unique number associated with that malicious code. Just a fragment, rather than the entire malicious code, is sent, because sending the entire malicious code would take too much time. The trade can be in either direction. In one direction, computer10sends the malicious code fragment to computer12, and computer12sends the malicious code identifier to computer10. In the other direction, computer10sends the malicious code identifier to computer12, and computer12sends the malicious code fragment to computer10. The rationale for this technique is that one computer requests from the other computer knowledge that only the other computer has, in this case the knowledge of identifying malicious code. So, for example, the authentication message can contain an obfuscated fragment of malicious code extracted from the definitions (32or37) associated with the challenging computer (10or12). This code may look very little like real malicious code, and cannot execute because is just a fragment.

An acceptable response to the authentication message must include the unique malicious code identifier. This can be done in two ways. In one way, the malicious code fragment is augmented by a standard husk and subjected to a malicious code scan (by scanning means33or scanning module11). As used herein, “husk” is code that wraps around and encapsulates another piece of code or data. A husk is sometimes referred to as a “wrapper” or “container” or “security envelope”. In the other way, scanning means33or scanning module11is pre-fitted with a scan interface34that converts malicious code fragments into unique malicious code identifiers, e.g., by using a lookup table. In either way, it is desirable that the challenge message sent between each pair of computers10,12is different each time such a message is sent, and does not follow a predictable pattern or start at a predictable location in the list of definitions (32or37). A computer10,12that sends the same challenge pattern or response each time should be flagged as suspicious by the other computer12,10. This minimizes the possibility of replay attacks, i.e., attacks premised upon sending a known response to a known challenge based upon having intercepted a communication showing the challenge/response. To further minimize replay attacks, challenges should be composed from relatively new definitions in the set of definitions (32or37).

It is not necessary to perform this authentication procedure every time a file14is opened. A user of computer10,12can turn the authentication on or off at will, the authentication can be performed every so many file14opens, etc. The important thing is for the link between computers10,12to be authenticated prior to the first time these two computers10,12share a file14.