4.2- RepairFor many viruses and many infected objects, it's possible to restore the object to what it looked like before it was infected, or at least to a state in which it will function in just the same way. Unfortunately, this isn't always possible; the classic example is the 1813 (Jerusalem) virus infecting an EXE-format file. While it's usually possible to undo the infection, sometimes the resulting file is missing data that was in the uninfected original, and it's not always possible to tell that this has happened. The best an 1813-remover can do on the EXE file, therefore, is something that is quite likely to work, but might not. In most cases, though, sufficiently-reliable repair is possible, and particularly in large infections of non-critical machines, repair is sometimes a cost-effective option. A description of a virus in VERV's language includes one repair block for every type of object that the virus may infect. Each repair block consists of a header record ``REPAIR <object type>'', followed by one or more repair-operation records. Currently defined repair operations include:
REPAIR S-EXE EXE_LENGTH_BUG FCOPY_TO -0C5 EXE_LENGTH_ADJUST 0053 0051 0710 BWRITE 0043 0010 2 ; Fix SP BWRITE 0045 000E 2 ; Fix SS BWRITE 0047 0014 2 ; Fix IP BWRITE 0049 0016 2 ; Fix CS BWRITE 0051 0002 4 ; Fix image length * Fixing COM files REPAIR P-COM 64K_COM_BUG FCOPY_FROM 0710 -5 The two BUG records cause VERV to print warnings to the user that some files may not function correctly, and to refuse to repair (later versions may offer to erase) any files that are obviously not correctly repairable. The FCOPY records pick out just the part of the file that does not contain the virus, and the EXE_LENGTH_ADJUST and BWRITE records restore and replace approximately the original EXE file header. EXE files that are successfully repaired will differ from the original file only in having been rounded up to a multiple of sixteen bytes (and the corresponding change in the EXE file header). After repair is completed, VERV restarts processing on the repaired file, to ensure that there is not another instance of the virus present. If the virus is present in the file multiple times, all will be removed. Once VERV is integrated with a virus scanner, the repaired file will be automatically re-scanned for all viruses, and any found will be re-verified and removed. Repair processing is only performed if the user has requested it on the command line, and if VERV finds that the virus is indeed exactly the known strain of the virus. In small infections, or in situations where correct operation of the objects involved is particularly crucial, we continue to recommend that infected objects be destroyed (files erased, diskettes formatted, and so on), and replaced from uninfected sources.
|