April 17th, 2004, 01:05 AM
how do viruses add their code to an exe file?
I've always wondered how viruses can add their code to an exe file,i mean,when a virus is running,it itself is an exe file..so how does it add its code to another exe file?at the time a virus is running,its code is in binary form..how can you program a virus to add its binary code to another exe file?from the research i've done about it,it has something to do with the headers of an exe file?
April 17th, 2004, 01:34 AM
I came in to the world with nothing. I still have most of it.
April 17th, 2004, 09:19 AM
Pick a small .exe file and copy it as a .txt file, then open it in wordpad....................you will see that it is NOT binary.
The viral code just adds itself to the .exe and gets run as part of that set of program instructions, just as if you wrote a program then added some intructions later on to make it do things differently from, or as well as, the original program.
Remember that a lot of older .exe/.com viruses just deleted an existing program and renamed themselves as that program, so when it was called, the virus not the genuine program got launched...............AVs would report them as "uncleanable" because the program was now pure virus code.
Hope that helps