My understanding is that a virus is an executable - and thus it needs to be executed to do anything. When you execute a virus (program), the process will be able to do whatever malicious thing it is supposed to.

I've been reading an answer, and this part:

Virus, on the other hand, need an executable image to spread within a system. They will spread to other executables within the same computer (they will attach themselves to those executables which become infected and able to spread the virus). And they spread to other computers as these executables are passed to them by any means (download, on a CD or floppy disk) and executed.

Spread to other executables? So if a virus spreads into my Photoshop executable, running Photoshop in the future will effectively execute the virus code? Essentially rendering my Photoshop program into a virus on itself?

I have never seen this sort of behaviour before - if it is true? (If yes I'll ask at SO how)

closed as too broad by m4573r, Graham Wager, Raystafarian, Moses, Nifle May 21 '14 at 17:57

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Yes, viruses can attach themselves onto an executable. Maybe they wrap around the original application, or they just attach themself to some jmp location, but as you said you might be better off asking at SO how to do that.


yes it is true. I have seen tools (ProRat I guess) which can merge virus code to EXEs but I have no Idea how to do it programmatically.


Both guys (SMR and private_meta) are right. I would like to only append, that some .exe's won't run, if they are corrupted by some kind of injection (which is particulary virus code injected) or strange pieces of code - they will provide application error and crash.

However, not all .exe's are so "smart"...

Not the answer you're looking for? Browse other questions tagged or ask your own question.