MATHEMATICAL MODELLING OF COMPUTER VIRUSES WITH AUTOMATIZATION THEIR ANALYSIS AND CREATION THE VIRUS DEFENDING SYSTEMS. D.P.Zegzhda, A.V. Meshkov, P.V. Semjanov. St. Petersburg, Russia. Introduction. The effective fight against computer viruses is impossible without the designed mathematical model which describes their structure and principles of functioning[1]. The presence of such model will allow to create the universal virus defending systems, to prove their efficiency and to determine the application field. On the other hand, the conditions required for spreading the viruses around can be determined and the demands to the system, making the existence of viruses impossible, can be formulated. 1. Review of virus models. The basic work concerning this field can be conditionally referred to three directions: 1.1 Theoretical research aimed at the creation of general mathematical models, which describe viruses as the special programs or mathematical objects[2,3]. One of the most important work in this field is the work by Adleman L.[3], who considers viruses from the point of view of the theory of re- cursive functions and Godel numbering. In this work it is offered to model the virus characteristics (such as the ability to spread, to da- mage, isolation, etc.) with the help of characteristic of recursive functions, reorganizing the programs, which are presented to be the Godel numbering of the set of all possible programs of Turing machine. The definitions of pathogenicity and spreading of the viruses are de- fined and the classification is built on their base. The number of theorems of existence and the theorem determining the completeness of the set of viruses are proved in mathematical terms of recursive functions. However, all these virus properties (it is shown in work) can not provide the base for creation of the concrete methods of pro- tection from them. These works create the basis of virus theory, but their practical use is limited by the possibility of interpretation of general models. Let us review, for example, one of the basic result obtained in: for all Godel numbering of the set of partly recursive functions {1} the set V={i| 1 is a virus} 2 is complete. While this statement in- terprets and uses in practice, the difficulties connected with buil- ding of predicates, determining if the testing program belongs to the virus set will inevitably arise. 1.2. Defining of the number of characteristics of concrete viruses and establishing the classifications on the base of these characteris- tics. For example, the famous McAffe classification[4] can be referred here. Building of such classification is necessary to identify viruses with each other and to form the homogeneous classes and groups of vi- ruses, however they can not help to solve the problem how to search for and delete the viruses. 1.3. The production of the models describing the virus structure as the number of functional elements, which determine the typical algo- rithms of influence of viruses on the other objects such as programs, data, environment. The example of such approach is shown in. The la- test approach looks the most perspective due to the fact that it enab- les to get practical solutions to the problems set up in the beginning of this article. The simulation of process of infecting the programs with viruses represented further in this work is referred to the last group of models. 2. Models of computer viruses. 2.1. Simulation of the process of infecting the programs. In the present work was used the approach based on representing the virus as the program which inserts its own copy modified in a special way to another program. With that the part of programming code which is never modified is called signature of the virus which, thus, will be able to met in all its copies without exception[5]. Usually, the frag- ment of the code typical for this virus is taken as the signature. Let us determine the base elements of the model suggested. Let's consider the structure of infected program and virus is repre- sented by the sequence of bytes. That approach is less abstract and is based on practical developments (seeking for virus using the signature is widely used) and enables to get a real result - to build the algo- rithm which determine the virus signature. We will consider the process of infecting a program as synthesis of a new program which consists of mutually adopted copies of initial program and the virus. We will represent the program, virus and signature as the vectors, which components are bytes. The numbers of vector elements start from 0. We will write the vector size after its name in round brac- kets, the index in square ones. Let us introduce the algebra of the type A=, where the set M (carrier) - the set of all byte vectors (i.e. the set of all prog- rams, e.g. viruses), nd S(signature of algebra) - consists of two binary operations - equality and insertion. Let us determine this set of operations: 1) Equality operation ( "=" ). We will accept that vector X with the length n is equal to vector Y also n long under the condition that X and Y are equal in pairs, i.e.: X = Y <=> { X[i] = Y[i] i: 0..n-1 } 2) Inserting operation ( Let's designate it with the sign "+"). If we have two vectors A with the length n and B with the length m, then the result of insertion B into A is vector C which length is n+m, that answers the following condition: A[i] for 0<=i C[i] = B[i-k] for k<=i 1 Ķ 3 ¶ 4 > ͼ ĿĿ ͼ ͼ Ŀ 2 5 Ŀ 7 6 Designation: ͻ Ŀ main function additional functions ͼ - Spreading programs. B - Worms. - Trojan horses. 1 - overcoming of protection 5 - stealth or encoding 2 - intercept of processing 6 - synthesis 3 - violation of integrity 7 - self-modifying or mutation 4 - self-reproduction Fig.2. The integrated conceptual model of the virus. Now it is possible to define the base criteria of identification of belonging of the virus to particular class on the basis of this con- ceptual model , and then on their basis we can determine the criteria of localization of their elements in the software. 3. System of construction of models of computer viruses. The creation of similar conceptual models allows to construct the system, which research the behavior and structure of particular viru- ses. Such system can serve as the laboratory for analysis of viruses, systems of protection from them and for creation of such systems. 3.1 Tasks of system of construction of models: 1) Analysis of viruses with the purpose of study: - algorithms of its spreading and affects. - interactions of systems of protection and viruses. The mathematical model of program infection is used in the process of researching for extraction of virus code. The purpose of research is the valuation of efficiency of studied system of protection and determination of optimum means of protection from virus. 2) Classification of viruses. The mechanism of realization of functions of self-reproduc- tion, overcoming of protection and violation of integrity by vi- rus for distinguish of viruses to that or other classes must be determined as a result of analysis. 3) Concretization of integrated model. Having determined the belonging of studied virus to certain class, the construction of its model in the help of the concretization of functions of self-reproduction, overcoming of protection and violation of integrity becomes possible. The cycle of work of the system consists in analysis of earlier unknown virus, definition of mechanism of realization of its functions, it's distinguishing to the certain class, construction of private model, testing of present means of protection on given model and, possibly, generation of means of counteraction to viruses, cor- responding to the given private model. The structure of system is submitted on fig. 3. The virus Ŀ Ŀ Virus Ĵ Mathematical analysis model of viruses Ŀ Virus Ŀ classificationĴ Integrated model Ŀ Model concretization Ŀ Ŀ Generation means of protection Ĵ Ŀ Ŀ Means of Ĵ Test means of protection protection Fig. 3. The structure of system of construction of models of viruses. 1. Cohen F. Computer viruses - theory and experiments. Proceedings of the 7th National Computer Security Conference.- 1984. 2. Cohen F. Computer viruses. Theory and experiments. Adv. Comput. Syst. Secur. Vol. 3 - Norwood(Mass), 1988, p 1-19 3. Leonard M. Adleman. An Abstract Theory of Computer Viruses. Pro- ceedings of CRYPTO-88 conference. 4. File VIRLIST.TXT by McAfee Associates. 5. Pozzo M. M., Gray T. E. Managing Exposure to Potetially Malicicus Programs // Proceedings of the 9 National Computer Security Conferen- ce, Sept., 1986.