Original Post
Here is a simple algorithm for virus scanning. Basically this is two bayosian filters. First filter, takes recognisable chunks, which are known to be used in viruses. As it scans the file, it figures out how close each chunk of data is to recognisable pieces of viruses. (for eg. using writeprocessmemory IIRC is very rarely used in things that arn't viruses, but it doesn't actually use virus code, it just checks to see if it has virus-like features). From looking at how closly each resembles pieces of virus code, it assignes the file a viruslike score. From that score, it determines wether it is above a user-defined threshold. If it is, then it asks the user how to procede. Second filter, from its behaviour, it works out a score on how much it looks like a virus. If it crosses a user-defined threshold, then it allerts the user, and asks how to procede. Then you do the 'sortov standered' approaches. For eg. Having a frequently used bait file, developing hashes of all exe files, and working out how often they change (which is then used to figure out if there is an actual virus attack going on), looking for actual viruses that are known (which doesn't always work, and will let you down whenever theres a new virus), ect. How does this idea sound? Any comments? Thoughts? Suggestions? Implemenntation ideas? From, Nice coder