PROBLEM TO BE SOLVED: To detect new or varietal computer viruses.
SOLUTION: A microextraction unit 14 extracts micro information from an inspection object file 12 and re-builds to a source code. A trace detection unit 16 traces the re-built source code of the macro one line by one line, to detect whether or not the characteristic code of a virus is included. A risk degree calculating unit 18 calculates the degree of risk of the macro, based on weighting of the feature code extracted by the trace detection unit 16 and judges whether the macro is a virus. When a virus is detected, a weighing updating unit 24 of a database updating unit 20 updates the weighting of a feature code record 28 of a virus database 26 for the feature code extracted by the trace detection unit 16.