1. A method for the automatic generation of malware signatures from computer files, said method comprising: a. creating a common function library (CFL), wherein said CFL contains any functions identified as being part of the standard computer language used to write computer files which are known as not containing malware; b. extracting the functions of a computer file which does contain a malware; c. updating the CFL with any new common functions if necessary, wherein the remaining functions are all considered as candidates for generating the malware signature; d. dividing said remaining functions into clusters according to their location in said file; e. determining the optimal cluster for generating the malware signature; and f. selecting at least one of the functions in said optimal cluster as the malware signature.