Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hello, i am just wondering which language is computer virus authors prefer, in order to effectively infect executable files & boot sector in Windows. c/c++? visualbasic? scripting language? or assembly?
i was told that viruses were mostly written in assembly language, is that true (i mean both in the past & present) ?
thanks for the infor :)
w

==========================================================================================
In order for viruses to go undetected/hidden, they must be able to intercept certain system calls before the operating system can use them and this usually requires at least C/C++ and very often assembly. It does not, however, avail you a benefit to know ahead of time what languages are used because no two compilers will compile code identically so identifying viruses by compiled signatures and whatnot would not be practicle (I'm assuming that this is why you asked but if there is another reason for your interest please let us know and we could elaborate).
==========================================================================================
borelli34

thanks borelli34
well, i am asking since i have found some virus source codes in pure 16-bit assembly language on the web (not sure whether they were done by reverse-engineering), most of them date back the early 1990s and even 1980s, i suppose they were written to run in dos and don't work well under windows (32-bit).
well my question this time is whether viruses are written in pure higher level languages or still often in pure assembly nowaday (after year 2000)? i am curious about whether higher level languages can strongly empower the viruses in infecting and destroying. as i know assembly language can control the hardware up to the level like moving the head of the hard drive, while c/c++ is not very good at doing this.
also i believe a virus compiled in asm is much smaller (essential for viruses) & able to run faster then in higher level languages.ps. just to clarify, i am asking since i am curious about how things work. actually, i can produce very a simple (not powerfu) virus using 16-bit asm. and there is 1.5 year for me to graduate, and i am thinking of looking for a job in software security - something like that.
thanks again for the inform :-)

==========================================================================================
Well, the idea behind viruses in general can be done in just about any language if someone knows the language thoroughly enough. For someone who is serious, however, the use of assembly allows the use of techniques that are VERY hard to accomplish within a higher level language. An example might be cloaking as it is used in hiding the actual virus code in memory and on the hard drive by intercepting the calls that the system makes and sending back false information. This would make detection impossible if you did not know to look for the technology in the first place. The true 'trick' to security, I believe, is to remember one simple rule. That is: If you make a better lock then you make a better thief. In other words, always be prepared for the unknown or unthinkable. Just my thought on that one subject but it does seem to hold true. I hope this helps some.borelli34

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |