Question

Discussion in 'Software' started by mastermosley, Nov 27, 2009.

  1. mastermosley

    mastermosley Sergeant

    How is it, code wise, that virus's can hijack and edit code or add code within files
     
  2. Eezak

    Eezak Staff Sergeant

    I have minimal programming skills so can only reply in a general way to your question.

    First of all consider this: If you've owned a computer for very long you have probably updated some of the files on your computer. This changes the actual code of the files being updated. For example, if you download and install a new graphics driver, or allow a Windows update to download and install, or install an update to a game on your computer you are changing the code in one or more (sometimes many more) files each time you perform such an update.

    So there's nothing unusual in itself about a file (a downloaded update for a game for example) making changes in other files. (Files can even make changes to their own code -- see, for example, the section on "polymorphic code" in the Wikipedia article linked to below.) In the case of a virus or other malware that edits or adds destructive or otherwise undesirable code to a legitimate file the undesired (and often unobservable) changes can begin as a result of a number of user actions.

    For example: You download what appears to be a free game and run it on your computer. Once you start the program running it does indeed execute a game on your computer, but in the background, and unknown to you, it may also begin modifying one or more files that have nothing to do with the game itself and even modify, add, or delete entries to the system registry.

    Keep in mind that a great deal of legitimate code (indeed, most of it) runs on your computer "in the background" -- that is, you are unaware of a great deal of the code your computer executes because there is no direct visual or audio description or notification that is displayed on your computer monitor or played through your speakers or headphones and usually for good reason.

    For example, imagine if all the mathematical calculations needed to render each frame of a 3D first person shooter type game were displayed on your monitor for a brief moment before each frame of the game graphics was actually displayed. This would be distracting and would take away from the fun of playing the game. What is and is not displayed or otherwise made apparent to the computer user is up to the programmer who writes the code and this is true of both legitimate programs and files as well as virus code.

    So a virus or other malware works in a similar way to legitimate executable files (such as game updates or graphic card driver updates) that modify other files already on your computer. This is a rather general reply to your question, but I hope it gives you some idea of how malware, including viruses, can make changes in other computer code/files.

    Here are a couple of articles which you may find interesting about computer viruses and other malware that I found with an internet search:

    http://computer.howstuffworks.com/virus.htm

    http://en.wikipedia.org/wiki/Computer_viruses

    If you know how to use a search engine, such as Google, type in "how do computer viruses work?" (suggest you also type in the quotation marks, as shown, in the search window) and click on the Search button and you should find many more websites with info about the history and workings of computer viruses.

    In addition, on some websites you can often find an encyclopedia of known viruses and other malware with more specific info and descriptions of how specific viruses work. Reading a few of the entries in such an online virus encyclopedia will explain a bit about how specific viruses infect certain files and are able to copy themselves and make undesirable and even destructive changes to the system.

    Here is one such online virus encylopedia on the BitDefender website (BitDefender is a well-known company that produces computer security software). Click on specific virus names to get info about that virus and click on other letters of the alphabet at the top of the BitDefender webpage to see the names/links about other viruses in the online encylopedia.):

    http://www.bitdefender.com/site/VirusInfo/browseVirusEnciclopedia/1/A/

    There is lots of info on the web about how viruses work. If you need additional help finding info about specific viruses or how to get rid of malware I suggest you post such specific questions in the malware forum here at Majorgeeks.
     
    Last edited: Nov 27, 2009

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds