(There are various kinds of computer viruses, and their characteristics and infection methods are also ever-changing, which is only a glimpse in this paper. Viruses are also a big subject. We only introduce its theoretical knowledge to broad users, briefly describe its working mechanism and demonstrate its infection process, so that we can have a general understanding of computer viruses. In this paper, two programs are designed, among which VIRUS.C only infects files whose extension is C, and will not infect other files. And REVIRUSC. The detox program written exclusively for it has no meaning without VIRUS.C. Through this graduation project, I also realized one thing: the content of the textbook is only for beginners, and it is useless when encountering practical problems. Therefore, it is necessary for me to learn to find relevant materials and literature, and to use network learning. This time One thing in the design did not achieve the expected intention, that is, the header file before the infection of the infected file cannot be restored when anti-virus, but this does not affect the operation of the program.)