Hello, im doing a report on "Heuristic antivirus technology" for my term paper this sem, and while googling around for that, I have kind of got the idea of how viruses work, but im a little confused, so I thought to ask you guys of it.
This is what i've understood-
A virus, once executed, attaches itself to a normal executable file. It attaches itself to the end of the executable, stores the first instructions of the executable in itself, and overwrites the first instructions of the file with a jump instruction which jumps the control to the end of the file(where the virus has attached itself). So, on execution, the file first performs the work for the virus.The virus, at the end of its work (which usually is infecting other files), restores the original instructions it had overwritten (thats why it had stored those in the first place), and returns control to the file. That way, the file, in most cases, continues to work seemingly normally. That way, it spreads to other files.
The most confusing thing in this explanation I find is that the file which was infected is now restored to its original form(except for the virus code at the end, which causes an increase in size of the file) after the virus itself restores the file. Does this mean that the virus body in a particular file is only executed once after infection (since the virus has restored the original instructions over the jump instruction it had earlier written)?
Can you guys please point me in the right direction?
This is what i've understood-
A virus, once executed, attaches itself to a normal executable file. It attaches itself to the end of the executable, stores the first instructions of the executable in itself, and overwrites the first instructions of the file with a jump instruction which jumps the control to the end of the file(where the virus has attached itself). So, on execution, the file first performs the work for the virus.The virus, at the end of its work (which usually is infecting other files), restores the original instructions it had overwritten (thats why it had stored those in the first place), and returns control to the file. That way, the file, in most cases, continues to work seemingly normally. That way, it spreads to other files.
The most confusing thing in this explanation I find is that the file which was infected is now restored to its original form(except for the virus code at the end, which causes an increase in size of the file) after the virus itself restores the file. Does this mean that the virus body in a particular file is only executed once after infection (since the virus has restored the original instructions over the jump instruction it had earlier written)?
Can you guys please point me in the right direction?



- carpe noctem