Evolutionary Virus Propogation Technique
saec
Evolutionary Virus Propogation Technique ========================================= Introduction ------------ Hey! First article, kind of a mix between a tutorial + idea, it shows the implementation of a propagation technique. These techniques are used in biology and also Artificial Intelligence. The virus evolves, you can say the species learns because generally only fit entities will survive. I want to apologise for any mistakes I have made, and any short sighted errors. Also, sorry for the language, I'm writing many reports for school and the "I'm so smart I can excrete through my mouth" attitude they like to see in reports sometimes leaks, I should look for a plumber but I don't wish to find a cock ;) No code is found here, such a project can become huge and I have school. General Technique Methods ------------------------- There are two paths available upon planning to include such a technique in your virus, either: 01) include a dissassembler and assembler; 02) perform all operations relevant to the process at opcode level. Minimum Components ------------------ Communication system * Table of Procedures * Table of Macros + dissassembler/assembler Virus Structure --------------- The structure of the virus is very important, though not for the first generation! Through coding,we must be careful to place introns throughout the code. Introns are very useful pieces of code, in biology they are found on the DNA double helix, as are exons, but introns are special in that if placed in the correct places, they can provide the best possible chance for recombination. For this, I suggest each ret instruction be thought of as an intron. This makes it so that each procedure is effectly surrounded by an intron and we can then prevent each procedure from being broken apart, also it makes searching for the intron quicker :) Another method is to preserve tables of routines. Having each procedure unbreakable is also a point of interest! By providing scope to the evolutionary process, we provide context. Context is important because we wish to retain functionality of the virus, since the virus is not biological we must remember this! A biological organism is prevented from destroying its structure completely, though it is able to change attributes of each component. General Propogation Method -------------------------- The first generation virus shall be a single program, due to this fact, a form of binary fission will be required to allow the program to propogate. It's important to note that binary fission is pretty much dependent upon mutation for any changes to occur at the genetic level. BINARY FISSION -------------- Stage One: VirusA + Binary fission = VirusB Procedures Tables: VirusA VirusB ->Copy-> +--+ +--+ |A0| |A1| +--+ +--+ |B0| |B1| +--+ +--+ |C0| |C1| +--+ +--+ |N0| |N1| +--+ +--+ Macro Tables: VirusA VirusB ->Copy-> +---+ +---+ |A01| |A11| +---+ +---+ |A02| |A12| +---+ +---+ |A03| |A13| +---+ +---+ |A0N| |A1N| +---+ +---+ Once we have obtained our offsprings macro's, we must now mutate the lil critters! There are several methods to mutate, and any method is as good as the rest, it is important to note that the following may be occur: * Instruction replacement * Junk Insertation * Macro Argument mutation There is a fair amount of work to do during mutation! It should be noted that VirusA does contain a communicative system, and so all spawns of VirusA unless a tragic mutation occurs :) Now incestuous relations between VirusA and VirusB may occur! :( If they can't find each other, they perform binary fission again, and so our little population looks like this: VirusA, VirusB, VirusA1,VirusB1 The names are just to tell them apart. If they do find each other, a new stage *may* be utilised. * Selection Selection This is implementation dependent, but for this example, we can say that the virus which initiates contact shall be considered the dominant entity. The dominant entity shall inspect the recessive entity in order to obtain information regarding it's size and other such features which may help their offspring in reproducing, and generally surviving. Once an appropriate mate is found, genetic code is required to be injected into the dominant virus, no facial sprays are permitted, its a waste of genetic code! This is where the scope of the method we use comes into play. For this sake we can say that we operate on asm level. Procedures Tables:Dominant Recessive RandomNumber(1) +--+ +--+ |A0| |A1| +--+ +--+ |B0| |B1| +--+ +--+ |C0| |C1| +--+ +--+ |N0| |N1| +--+ +--+ If RN >0, take Dominant, else take Recessive. With random number sequence: 0,1,1,0 we have: Offspring Procedure Table: +--+--+--+--+ |A0|B1|C1|N0| +--+--+--+--+ Just imagine if each procedure performed the same task, in radically different ways :) The problem with this is variables and memory requirements of each procedure. It is much easier to deal with this dynamically in asm I think. Now we have our procedures, so what! same overall concept, different process. Well at first, it's not a different process unless mutation occurs and well, mutation is a dangerous unpredictable can of tuna! So we have performed recombination on the procedures, at this point biology kicks in with mutation, but we don't want to rely on mutation to increase survivability of our children, so we may go to round two of recombination, though this time at a lower level, the instructions. Instructions though are hard to perform recombination on since they're either junk instructions or they perform a required function, so i suggest using macros to group together instructions which require on each other. The important thing to note with macro's is that we may perform overloading, and also that macros will drop excessive arguments. Macro Tables: Dominant Recessive +---+ +---+ |A01| |A11| +---+ +---+ |A02| |A12| +---+ +---+ |A03| |A13| +---+ +---+ |A0N| |A1N| +---+ +---+ The same random number routine applies to these sets of macros. Now our baby is ready! Note that dependent on which level of abstraction we're working on, it may be necessary to ensure that tables of macro's and procedures are kept up-to-date. WHY?! ----- I hope you're curious as to why i say these things ;p Virus Structure Recombination Mutation To ask why to all of the above is to really question how we can get the virus to remain lively, and not lame. We don't want to cripple them, in fact what we really want is to breed strong successful variants that cause the species on the whole to be genetically rich - this will mean that our virus *species* may be more immune to the evil av (a cave dwelling troll). To ensure we have well formed viruses, we must ensure that there remains context, although context exists in small quantities in programming languages, we're operating on *functionality* and so we must provide context to each chunk of functionality at a low level (macros). Though, this is not enough, consider a macro combination: A,B,C,D Our little friends get mutated (not into corporate top dogs, thankfully..) and now our macro combination reads: A,C,D,B If these were all originated the same routine, this may be acceptable, but with multiple routines we have ourselves a little riot. So we must provide context at the macro level (using routines), and the instruction level (using macro's). But why macro's? Well I guess you can hard code a instruction table which lists instruction variants, and then add the setting up that's required, but this is quite expensive. Infact the whole process is expensive in comparison to other propogation methods :( NOTE ---- You should think that this is just a metamorphic design, and I say nay. Metamorphic viruses are always different, even successful variants are different, and this is I believe the downfall of metamorphic viruses. No strong code is reserved. With this technique, characteristics of the virus that survive belong to the virus with the best method of obscurity, propogation, and/or anti-removal tactics . Also, although the number of variants is incredibly high in metamorphic viruses because each is unique, the strengths of the species is effectively diluted. There are weaknesses with this method though. The population of viruses shall die out if there isn't enough of an initial population, though this is dependent on luck on entry to a new system, generally speaking, a larger, more genetically rich initial population shall survive better. Another weakness is that the virus species takes a long time to generate mutations. DISCLAIMER ---------- * I'm aware SPTH (hello sir!) has documented this kind of idea, these methods have been used in Artifical Intelligence for a long time. * I'm aware that several chunks of functionality are used already in many metamorphic viruses. * This method is applied to viruses, as far as I know, no one has actually thought or documented the above technique before. If you have, hi-diddly-ho :) I can think of one thing to say the puts me on paper, it's from a famous speech, i can't remember by who though! It goes something like: I hope this inspires someone, if just one. ---END---