Monday, May 24, 2010

Why virus writers prefer assembly language over high-level language, for coding viruses?

They use assembly language to let the program continuously rewrite itself, encode itself, copy the code to a secret spot in memory and infiltrate into the operating system in order to deny it's own existence.

Why virus writers prefer assembly language over high-level language, for coding viruses?
Depends on what kind of virus they are writing. An outlook virus is usually in what VBScipt? An Office Macro virus is usually in Visual Basic for Applications I think? I don't know.





Buffer overflow viruses might be easier to write in ASM. Those types of viruses depend heavily on getting the viruses loaded into the exact right stop of the system memory. Off by a byte or two, and the viruses might not work.





Also, the executable code from ASM is much smaller then that generated from a higher level language like C++. Much faster to transfer the executable code across the network.





Then again, for some reason, I was never a very good assembly programmer. So I can't say that's a 100 percent right answer.
Reply:Do they? How do you know this?





Anyway, the usual reason anyone would write anything is assembly is for efficiency.


Although it is possible to write bad assembly code, programs in assembly are smaller and usually faster than the same program written in anything else.


No comments:

Post a Comment