1. Field of the Invention
This invention relates to the field of data processing systems. More particularly, this invention relates to the field of the detection of computer viruses within computer files.
2. Description of the Prior Art
It is known to provide anti-virus systems that are able to detect computer viruses within a computer file. A problem with such known anti-virus systems is that computer virus writers may seek to target the anti-virus system itself and exploit features of that anti-virus system in order to harm the computer system upon which the anti-virus system is running. As an example of this, it is known to produce files that are highly compressed versions of much larger files knowing that an anti-virus system will have to decompress the file in order that it can scan for viruses within it. If the decompressed file size is sufficiently large, then the amount of data requiring to be handled, even though it may contain very little information, may itself cause problems to an anti-virus system, e.g. it may exceed the amount of physical memory available requiring the extensive use of virtual memory thus significantly impacting the performance of the system conducting the anti-virus scan or in some cases even exceeding the amount of virtual memory available.
It is known to provide anti-virus scanning systems that will time-out a virus scanning operation if the system clock indicates that a predetermined duration for that virus scanning operation has been exceeded. However, such an approach has the disadvantage that a slow or stressed/overloaded (possibly deliberately) computer system may inappropriately terminate a virus scanning operation using such a simple expired time approach.
Measures that allow reliable breaks to be triggered during a virus scanning operation whilst reducing their own vulnerabilities are strongly advantageous.
Viewed from one aspect the present invention provides a method of detecting computer viruses within a computer file, said method comprising the steps of:
The invention operates by applying real time virus scanning operation metrics to the data processing being performed in order that this can be monitored and used to trigger appropriate breaks within the virus scanning operation. Using metrics associated with the amount of data processing performed provides a reliable way of resisting attacks on the anti-virus system by overloading it, whilst not exposing the system to vulnerabilities due to inappropriate breaks and possible early terminations of virus scanning operations that are not in themselves justified by an excessive amount of data processing being involved in the virus scanning operation.
Whilst the breaks triggered within the virus scanning operation could be used for various purposes, such as providing general feedback to a monitoring process, the invention is particularly useful in circumstances in which a break is used to perform a determination of whether the virus scanning operation should be terminated prior to completion.
One preferred technique for implementing the above is to monitor the size of the data processed during the data processing operation. If an excessive quantity of data is being processed during the virus scanning operation of a single computer file, then this indicates that it may be appropriate to terminate that virus scanning operation prior to its completion.
An additional degree of sophistication is provided when the size of the data processed in the virus scanning operation is compared with the size of the computer file being scanned when determining whether the amount of data being processed is excessive. It may be that a large computer file being scanned legitimately requires a large amount of data to be processed during its scanning operation and accordingly should not be early terminated. Conversely, the type of highly compressed computer file deliberately intended to cause an overflow in the amount of data being processed would yield a much higher ratio in the amount of data being processed to the size of the computer file itself and so be distinguishable in a manner that its virus scanning may be properly early terminated.
Another possibility in obtaining a measurement value indicative of an amount of data processing being performed is to associate a complexity value with each of a plurality of tests that are applied to the computer file to check for particular computer viruses within that computer file. Some tests may be relatively quick and simple therefore having a low complexity value. Conversely, tests checking for a polymorphic virus or requiring heuristic analysis may require a much greater amount of data processing to complete and accordingly have a high complexity value. Summing the complexity values of the tests applied to a computer file and then comparing this with a threshold to trigger a break is a reliable way of regularly triggering breaks in a manner properly related to the amount of data processing being performed as discussed above.
Viewed from another aspect the present invention provides apparatus for detecting computer viruses within a computer file, said apparatus comprising:
Viewed from a further aspect the invention provides a computer program product carrying a computer program for controlling a computer to detect computer viruses within a computer file, said computer program comprising:
The above, and other objects, features and advantages of this invention will be apparent from the following detailed description of illustrative embodiments which is to be read in connection with the accompanying drawings.
As illustrated in
At step 24, a determination is made as to whether or not the portion of data recovered from the computer file being scanned requires decompressing or unpacking prior to testing. If the data does require decompressing or unpacking, then this is performed at step 26. Step 28 updates a data process counter to take account of the decompressing or unpacking operation of step 26, and step 30 then compares this data processed counter value with a threshold value to see if it has been exceeded.
If the threshold has been exceeded, then processing proceeds to step 32 at which a determination is made as to whether or not the virus scanning operation should continue. If the virus scanning operation is not to continue, then it is terminated. If the virus scanning operation is to continue, then the data processed counter used to trigger the breaks within the virus scanning operation is reset at step 34 and processing is returned to step 36.
Step 36 selects the first DAT driver (i.e. computer virus test) to be applied to the portion of the computer file being processed. Step 24, if it determines that no decompression or unpacking is required, passes control directly to step 36.
Step 38 applies the selected-test to the portion of the computer file-being processed and step 40 then updates the counter of the amount of data processed in a similar manner to step 28.
Step 42 determines whether or not a threshold amount of data processed has been exceeded and if so passes processing to step 44 at which a determination is made as to whether or not to continue the virus scanning operation. If the virus scanning operation is not to continue, then the virus scanning operation is terminated. If virus scanning is to continue, then processing proceeds to step 46 at which the data processed size counter (break initiating counter) is reset and processing is returned to step 48. If the threshold value tested in step 42 was not exceeded, then step 42 passes control directly to step 48.
At step 48 a determination is made as to whether or not any more tests need to be applied to the portion of the computer file currently under test. If more tests are needed, then the next of these is selected at step 50. If no more tests are needed for that portion of the computer file, then processing proceeds to step 52 at which a determination is made as to whether or not any further portions of the computer file under test need to be scanned for computer viruses. If no further portions of the computer file under test do need to be scanned, then processing terminates. If further portions of the computer file under test do need to be subject to computer virus scanning, then processing returns to step 22 at which the next portion of the computer file for testing is selected.
A portion of the computer file 64 to be tested is then subject to the processing associated with a series of DAT drivers within the computer virus definition data 16 of the anti-virus system 12. Each of the DAT drivers (tests) has an associated complexity value (e.g. a simple test could have a complexity value of 1 whilst a complicated heuristic test could have a complexity value of 10). The complexity values represent the amount of data processing typically required to conduct that test. A running count/tally of the total of the complexity values for the tests applied up to that point is kept and when this exceeds a threshold value a break in the virus scanning operation is triggered and a determination made as to whether or not virus scanning operation should proceed further.
Step 80 determines whether or not more DAT drivers should be applied to the portion of the computer file under test. If more DAT drivers are to be applied, then the next of these is selected at step 82 and processing is returned to step 70. If no more DAT drivers are to be applied then processing of that portion of the computer file concerned is terminated.
It will be appreciated that a further portion of the computer file may be selected for testing in accordance with the above technique as described in relation to the first example embodiment. In many practical instances, it is found that only a first portion of a computer file will in fact requiring testing.
Although illustrative embodiments of the invention have been described in detail herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various changes and modifications can be effected therein by one skilled in the art without departing from the scope and spirit of the invention as defined by the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
5649095 | Cozza | Jul 1997 | A |
5826013 | Nachenberg | Oct 1998 | A |
5832208 | Chen et al. | Nov 1998 | A |
5960170 | Chen et al. | Sep 1999 | A |
5999723 | Nachenberg | Dec 1999 | A |
6240447 | Banga et al. | May 2001 | B1 |
6357008 | Nachenberg | Mar 2002 | B1 |