1. A method for automatically protecting a computer, comprising: restricting an object program from accessing some resources in a computer system based on predetermined resource access rules; scanning computer resources accessed by the object program to determine whether the accessed computer resources are infected by the object program; analyzing malicious behaviors based on behavior characteristics of the object program to determine whether the object program is a harmful program; creating a new resource access rule based on results of the scanning step, the analyzing step, or both, wherein when the analyzing step determines that the object program is a harmful program, the created new resource access rule includes instructions for disallowing a program file associated with the harmful object program from being started by any program; and automatically adding the new resource access rule created to the predetermined resource access rules.