Installing a program on your computer may sound like a simple process to you, but there’s a lot going on under the hood that you don’t see.
When you install a program, you usually just run a file and hit the “INSTALL” or “SETUP” button — that’s the extent of your contribution to the process. But once you’ve given the program permission to install itself, the program takes control.
It can delete, create, modify, and move files at will. A few minutes later you have a whole assortment of new code and data installed, but you really have no idea what the program did to your computer.
The Dangers of Malicious Code
If the program that you installed was a legitimate one, you have nothing to worry about. While millions of bytes may have been transferred — and numerous modifications may have been made to your system — they will not have been harmful, and everything should work as expected.
But if the program was malicious, it could be another story entirely. When run, a malicious program can do anything that a legitimate program can. A malicious program can write a message on your screen, erase a stored file, stop a running program, or even send data to another person.
Malicious programs can also do nothing at all or masquerade as a legitimate program, secretly collecting information or altering the way that your computer works.
What Is Malicious Code?
What exactly is malicious code? How does it take control of a system — and how can you protect yourself against it?
A malicious code is either a program or a part of a program that is intended to damage or otherwise cause harm to a computer system. Malicious code is often spread by viruses — programs that can pass malicious code on to other programs by modifying them, and that infect other systems by attaching themselves to these programs.
Viruses can attach themselves to legitimate programs, or replace these programs entirely. They can propagate quickly throughout a computer network, through email addresses, and through the web.
Transient viruses will run whenever the program that it is using as a host runs; these can be difficult to detect. Resident viruses will instead infect the memory of a computer, and will remain active even if the attached program stops; these can be incredibly dangerous.
In addition to viruses, computer users also need to worry about Trojan horses. Trojan horses are malicious codes that have a non-obvious effect.
The program itself may seem perfectly legitimate and may never seem to act against the system. Meanwhile, the Trojan code within may be logging information, or sending it to a third-party.
There are also some less common types of malicious code. Logic bombs are malicious codes that only go off when a certain condition occurs. Time bombs are logic bombs where the trigger is a time or a date.
Worms are malicious codes that spread through a network — the difference between worms and viruses is that worms spread directly, while viruses need to infect a host.
Protecting Against Malicious Code
The only way to prevent an infection by a virus is to avoid sharing executable code with an infected source. Of course, the problem is that you can’t always know which sources are infected. Nevertheless, there are ways that you can reduce your risk:
1. Only use commercial software from established and reputable vendors.
2. Test all new software first on an isolated (non-networked) computer.
3. Create a bootable disk and store it in a safe place, just in case your computer d o e s get infected.
4. Make backup copies of all of your files so that your data is protected.
5. Use virus scanners to protect your computer system.
Of these five points, virus scanners are likely the most critical. Virus scanners will act to protect your computer system by actively scanning through your programs and data, looking for potentially malicious code.
If viruses are discovered, the virus scanner will then quarantine the virus and attempt to repair the damage.
You can never be entirely safe from malicious code. Even virus scanners can only detect malicious code that has already been discovered and cataloged.
Nevertheless, you can significantly reduce your risk by following the above safety tips and by being cautious regarding the programs that you download and install on your computer.