- Home Accounts
- Business Accounts
- Canada/English
- Deutschland
- New Zealand
- South Africa
- United Kingdom
- United States
- Cybersecurity Resources
- Tips/Articles

What is a Computer Virus and How Can I Protect My Computer?
What is a computer virus.
A computer virus is a malicious piece of computer code designed to spread from device to device. A subset of malware, these self-copying threats are usually designed to damage a device or steal data.
Think of a biological virus – the kind that makes you sick. It’s persistently nasty, keeps you from functioning normally, and often requires something powerful to get rid of it. A computer virus is very similar. Designed to replicate relentlessly, computer viruses infect your programs and files, alter the way your computer operates or stop it from working altogether.
What does a computer virus do?
Some computer viruses are programmed to harm your computer by damaging programs, deleting files, or reformatting the hard drive. Others simply replicate themselves or flood a network with traffic, making it impossible to perform any internet activity. Even less harmful computer viruses can significantly disrupt your system’s performance, sapping computer memory and causing frequent computer crashes.
Are you prepared for today’s attacks? Discover the year’s biggest cyber threats in our annual Threat Report.
In 2013, the botnet virus Gameover ZueS was discovered to use peer-to-peer downloading sites to distribute ransomware and commit banking fraud. While tens of thousands of computer viruses still roam the internet, they have diversified their methods and are now joined by a number of malware variants like worms, Trojans , and ransomware .
How does a computer get a virus?
Even if you’re careful, you can pick up computer viruses through normal Web activities like:
Sharing music, files, or photos with other users
Visiting an infected website
Opening spam email or an email attachment
Downloading free games, toolbars, media players and other system utilities
Installing mainstream software applications without thoroughly reading license agreements
How do computer viruses spread?
Viruses can be spread several ways, including via networks, discs, email attachments or external storage devices like USB sticks. Since connections between devices were once far more limited than today, early computer viruses were commonly spread through infected floppy disks.
Today, links between internet-enabled devices are for common, providing ample opportunities for viruses to spread. According to the U.S. Cybersecurity and Infrastructure Security Agency, infected email attachments are the most common means of circulating computer viruses. Most, but not all, computer viruses require a user to take some form of action, like enabling “ macros ” or clicking a link, to spread.
What are the symptoms of a computer virus?
Your computer may be infected if you recognize any of these malware symptoms :
Slow computer performance
Erratic computer behavior
Unexplained data loss
Frequent computer crashes
How are computer viruses removed?
Antiviruses have made great progress in being able to identify and prevent the spread of computer viruses. When a device does become infected, though, installing an antivirus solution is still your best bet for removing it. Once installed, most software will conduct a “scan” for the malicious program. Once located, the antivirus will present options for its removal. If this is not something that can be done automatically, some security vendors offer a technician’s assistance in removing the virus free of charge.
Examples of computer viruses
In 2013, the botnet virus Gameover ZueS was discovered to use peer-to-peer downloading sites to distribute ransomware and commit banking fraud. While tens of thousands of computer viruses still roam the internet, they have diversified their methods and are now joined by several malware variants like:
Worms - A worm is a type of virus that, unlike traditional viruses, usually does not require the action of a user to spread from device to device.
Trojans - As in the myth, a Trojan is a virus that hides within a legitimate-seeming program to spread itself across networks or devices.
Ransomware - Ransomware is a type of malware that encrypts a user’s files and demands a ransom for its return. Ransomware can be, but isn’t necessarily, spread through computer viruses.
Computer virus protection
When you arm yourself with information and resources, you’re wiser about computer security threats and less vulnerable to threat tactics. Take these steps to safeguard your PC with the best computer virus protection:
Use antivirus protection and a firewall
Get antispyware software
Always keep your antivirus protection and antispyware software up-to-date
Update your operating system regularly
Increase your browser security settings
Avoid questionable Websites
Only download software from sites you trust.
Carefully evaluate free software and file-sharing applications before downloading them.
Don't open messages from unknown senders
- Immediately delete messages you suspect to be spam
An unprotected computer is like an open door for computer viruses. Firewalls monitor Internet traffic in and out of your computer and hide your PC from online scammers looking for easy targets. Products like Webroot Internet Security Complete and Webroot Antivirus provide complete protection from the two most dangerous threats on the Internet – spyware and computer viruses. They prevent viruses from entering your computer, stand guard at every possible entrance of your computer and fend off any computer virus that tries to open, even the most damaging and devious strains.
While free antivirus downloads are available, they just can't offer the computer virus help you need to keep up with the continuous onslaught of new strains. Previously undetected forms of polymorphic malware can often do the most damage, so it’s critical to have up-to-the-minute, guaranteed antivirus protection.

Find the right cybersecurity solution for you.
Home & Home Office

Welcome back!
Stay protected and renew your subscription before it's too late.
Cyber Readiness Center and Breaking Threat Intelligence: Click here to get the latest recommendations and Threat Research
What Are Computer Viruses?
Computer virus definition.
Chances are you’ve heard how important it is to keep viruses out, but what is a computer virus exactly? A computer virus is a type of malicious software, or malware, that spreads between computers and causes damage to data and software.
Computer viruses aim to disrupt systems, cause major operational issues, and result in data loss and leakage. A key thing to know about computer viruses is that they are designed to spread across programs and systems. Computer viruses typically attach to an executable host file, which results in their viral codes executing when a file is opened. The code then spreads from the document or software it is attached to via networks, drives, file-sharing programs, or infected email attachments.
Common Signs of Computer Viruses
Chances are you’ve heard how important it is to keep viruses out, but what is a computer virus exactly? A computer virus will more than likely have an adverse effect on the device it resides on and may be discoverable through common signs of performance loss, including:
Speed of System
A computer system running slower than usual is one of the most common signs that the device has a virus. This includes the system itself running slowly, as well as applications and internet speed suffering. If a computer does not have powerful applications or programs installed and is running slowly, then it may be a sign it is infected with a virus.
Pop-up Windows
Unwanted pop-up windows appearing on a computer or in a web browser are a telltale sign of a computer virus. Unwanted pop-ups are a sign of malware, viruses, or spyware affecting a device.
Programs Self-executing
If computer programs unexpectedly close by themselves, then it is highly likely that the software has been infected with some form of virus or malware. Another indicator of a virus is when applications fail to load when selected from the Start menu or their desktop icon. Every time that happens, your next step should be to perform a virus scan and remove any files on programs that might not be safe to use.
Accounts Being Logged Out
Some viruses are designed to affect specific applications, which will either cause them to crash or force the user to automatically log out of the service.
Crashing of the Device
System crashes and the computer itself unexpectedly closing down are common indicators of a virus. Computer viruses cause computers to act in a variety of strange ways, which may include opening files by themselves, displaying unusual error messages, or clicking keys at random.
Mass Emails Being Sent from Your Email Account
Computer viruses are commonly spread via email. Hackers can use other people's email accounts to spread malware and carry out wider cyberattacks. Therefore, if an email account has sent emails in the outbox that a user did not send, then this could be a sign of a computer virus.
Changes to Your Homepage
Any unexpected changes to a computer—such as your system’s homepage being amended or any browser settings being updated—are signs that a computer virus may be present on the device.
How Do Computer Viruses Attack and Spread?
In the early days of computers, viruses were spread between devices using floppy disks. Nowadays, viruses can still be spread via hard disks and Universal Serial Bus (USB) devices, but they are more likely to be passed between devices through the internet.
Computer viruses can be spread via email, with some even capable of hijacking email software to spread themselves. Others may attach to legitimate software, within software packs, or infect code, and other viruses can be downloaded from compromised application stores and infected code repositories. A key feature of any computer virus is it requires a victim to execute its code or payload, which means the host application should be running.
Types of Computer Viruses
There are several types of computer viruses that can infect devices. This section will cover computer virus protections and how to get rid of computer viruses.
Resident Virus
Viruses propagate themselves by infecting applications on a host computer. A resident virus achieves this by infecting applications as they are opened by a user. A non-resident virus is capable of infecting executable files when programs are not running.
Multipartite Virus
A multipartite virus uses multiple methods to infect and spread across computers. It will typically remain in the computer’s memory to infect the hard disk, then spread through and infect more drives by altering the content of applications. This results in performance lag and application memory running low.
Multipartite viruses can be avoided by not opening attachments from untrusted sources and by installing trusted antivirus software. It can also be prevented by cleaning the boot sector and the computer’s entire disk.
Direct Action
A direct action virus accesses a computer’s main memory and infects all programs, files, and folders located in the autoexec.bat path, before deleting itself. This virus typically alters the performance of a system but is capable of destroying all data on the computer’s hard disk and any USB device attached to it. Direct action viruses can be avoided through the use of antivirus scanners. They are easy to detect, as is restoring infected files.
Browser Hijacker
A browser hijacker manually changes the settings of web browsers, such as replacing the homepage, editing the new tab page, and changing the default search engine. Technically, it is not a virus because it cannot infect files but can be hugely damaging to computer users, who often will not be able to restore their homepage or search engine. It can also contain adware that causes unwanted pop-ups and advertisements.
Browser hijackers typically attach to free software and malicious applications from unverified websites or app stores, so only use trusted software and reliable antivirus software.
Overwrite Virus
Overwrite viruses are extremely dangerous. They can delete data and replace it with their own file content or code. Once files get infected, they cannot be replaced, and the virus can affect Windows, DOS, Linux, and Apple systems. The only way this virus can be removed is by deleting all of the files it has infected, which could be devastating. The best way to protect against the overwrite virus is to use a trusted antivirus solution and keep it updated.
Web Scripting Virus
A web scripting virus attacks web browser security, enabling a hacker to inject web-pages with malicious code, or client-side scripting. This allows cyber criminals to attack major websites, such as social networking sites, email providers, and any site that enables user input or reviews. Attackers can use the virus to send spam, commit fraudulent activity, and damage server files.
Protecting against web scripting is reliant on deploying real-time web browser protection software, using cookie security, disabling scripts, and using malicious software removal tools.
File Infector
A file infector is one of the most common computer viruses. It overwrites files when they are opened and can quickly spread across systems and networks. It largely affects files with .exe or .com extensions. The best way to avoid file infector viruses is to only download official software and deploy an antivirus solution.
Network Virus
Network viruses are extremely dangerous because they can completely cripple entire computer networks. They are often difficult to discover, as the virus could be hidden within any computer on an infected network. These viruses can easily replicate and spread by using the internet to transfer to devices connected to the network. Trusted, robust antivirus solutions and advanced firewalls are crucial to protecting against network viruses.
Boot Sector Virus
A boot sector virus targets a computer’s master boot record (MBR). The virus injects its code into a hard disk’s partition table, then moves into the main memory when a computer restarts. The presence of the virus is signified by boot-up problems, poor system performance, and the hard disk becoming unable to locate. Most modern computers come with boot sector safeguards that restrict the potential of this type of virus.
Steps to protecting against a boot sector virus include ensuring disks are write-protected and not starting up a computer with untrusted external drives connected.
Know More About Computer Viruses Through Examples
There are common examples of what computer and internet users believe to be viruses, but are technically incorrect.
Is Trojan a Virus?
A Trojan horse is a type of program that pretends to be something it is not to get onto a device and infect it with malware. Therefore, a Trojan horse virus is a virus disguised to look like something it is not. For example, viruses can be hidden within unofficial games, applications, file-sharing sites, and bootlegged movies.
Is a Worm a Virus?
A computer worm is not a virus. Worms do not need a host system and can spread between systems and networks without user action, whereas a virus requires users to execute its code.
Is Ransomware a Virus?
Ransomware is when attackers lock victims out of their system or files and demand a ransom to unlock access. Viruses can be used to carry out ransomware attacks.
Is Rootkit a Virus?
A rootkit is not a virus. Rootkits are software packages that give attackers access to systems. They cannot self-replicate or spread across systems.
Is a Software Bug a Virus?
"Bug" is a common word used to describe problems with computers, but a software bug is not a virus. A bug is a flaw or mistake in software code, which hackers can exploit to launch a cyberattack or spread malware .
How To Prevent Your Computer From Viruses
There are several ways to protect your computer from viruses, including:
Use a Trusted Antivirus Product
Trusted computer antivirus products are crucial to stop malware attacks and prevent computers from being infected with viruses. These antivirus concepts will protect devices from being infected through regular scans and identifying and blocking malware.
Avoid Clicking Pop-up Advertisements
Unwanted pop-up advertisements are more than likely to be linked to computer viruses and malware. Never click on pop-up advertisements because this can lead to inadvertently downloading viruses onto a computer.
Scan Your Email Attachments
A popular way to protect your device from computer viruses is to avoid suspicious email attachments, which are commonly used to spread malware. Computer antivirus solutions can be used to scan email attachments for potential viruses.
Scan the Files That You Download Using File-sharing Programs
File-sharing programs, particularly unofficial sites, are also popular resources for attackers to spread computer viruses. Avoid downloading applications, games, or software from unofficial sites, and always scan files that have been downloaded from any file-sharing program.
How Fortinet Can Help
The Fortinet antivirus solution protects organizations from the latest strands of virus, spyware, and other security threats. Its advanced detection engines help users avoid downloading the latest and evolving threats, and prevents viruses from gaining a foothold inside organizations’ networks. The antivirus solution also reduces the threat of data breaches, protects against evolving malware variants, and keeps businesses up to date with regular updates.
Quick Links

Free Product Demo
Explore key features and capabilities, and experience user interfaces.

Resource Center
Download from a wide range of educational material and documents.

Free Trials
Test our products and solutions.

Contact Sales
Have a question? We're here to help.
- Trojan Horse Virus
- What Is a Worm Virus?
- Malware vs. Viruses
- Search Unit Name
- Search Cornell
- Instructions
- Concepts/defs
- Navigation 6
CS1130. Transition to OO programming. Fall 2008
Assignment 1 (computer viruses), submit on the cms two weeks into the course monitoring computer viruses, introduction.
Computer viruses are different from computer worms. A virus attaches itself to other programs, while a worm is a self-contained program that is able to spread copies of itself to other computers without attaching itself to other programs.
Did you know that the first computer worm of any consequence was set loose by a Cornell computer science grad student? In November 1988, Robert Morris wrote a worm —not to cause damage but to get an estimate of the size of the internet. He made a big mistake. When the worm reached another computer, it did not check to see whether it was already on that computer but just invaded the computer and sent itself on to other computers. So it spread much much faster than he thought it would. Anywhere from 6,000 to 60,000 computers were infected, and the internet was brought to its knees. Damage was estimated at $10M to $100M. Morris was convicted of violating the 1986 computer fraud and abuse act. He ended up on probation, a hefty fine, and community service. You can read more on Wikipedia. David Gries and Juris Hartmanis, of the Cornell CS Department, were on a Cornell commission that investigated the Morris worm. You can read about it in this article .
Because viruses and worms are so dangerous, people often wish to monitor them in order to help curtail their growth and spreading. Your task in this assignment is to develop a Java class ComputerVirus, which will maintain information about a virus, and a JUnit class ComputerVirusTester to maintain a suite of testcases for ComputerVirus. This assignment will help illustrate how Java’s classes and objects can be used to maintain data about a collection of things –like computer viruses.
Read the whole assignment before starting. Follow the instructions given below in order to complete the assignment as quickly and as efficiently as possible.
If you don't know where to start, if you don't understand testing, if you are lost, SEE SOMEONE IMMEDIATELY —the course instructor, a TA, a consultant. Do not wait. A little one-on-one help can do wonders.
Class ComputerVirus
An instance of class ComputerVirus represents a single computer virus. It has several fields that one might use to describe a computer virus, as well as methods that operate on these fields. Here are the fields, all of which should be private (you can choose the names of these fields).
- name (a String )
- type (a char – 'W' for windows, 'M ' for Mac, and 'L' for the rare Linux virus)
- month of discovery (an int )
- year of discovery (an int )
- predecessor (a ComputerVirus —the name on the tab of folder of a ComputerVirus object from which this one “evolved”)
- number of variations (an int : the number of known viruses that directly evolved from this one)
- id number (an int : a number used to reference this ComputerVirus in a database under development)
Here are some details about these fields.
- The name is a string of characters. It is okay for two viruses to have the same name because some strange happenstance with the media and people who cannot tell the difference between two viruses could lead to two viruses having the same name.
- The month of discovery is in the range 1..12, representing a month of the year. The year of discovery is something like 1997 or 2005. Do not worry about invalid dates; do not write code that checks whether dates are valid: assume they are valid.
- The id number is an index into a database. Assume all tags given are unique; do not write code to check whether a virus with a given id number already exists. If a virus hasn’t been assigned an id number yet, this field should contain -1.
- The predecessor is the name of a ComputerVirus object (manilla folder) on which this virus was based or from which it evolved (computer viruses can evolve too). It is not a String . The predecessor is null if it is either not known or if this is an original virus.
The Wurmark-D worm (Jan 05) travels as an email attachment. It pretends to be amusing, but it installs itself on your computer and forwards itself to others.
Accompanying the declarations of these fields should be comments that describe what each field means –what it contains. For example, on the declaration of the field type, state in a comment that the field represents what kinds of computers the virus infects, 'W' for Windows, etc. The collection of the comments on these fields is called the class invariant . The class describes all legal values for the fields together.
Whenever you write a method (see below), look through the class invariant and convince yourself that class invariant is correct when the method terminates.
ComputerVirus Methods
Class ComputerVirus has the following methods. Pay close attention to the parameters and return values of each method. The descriptions, while informal, are complete.
When you write a constructor body, be sure to set all the fields to appropriate values.
Make sure that the names of your methods match those listed above exactly, including capitalization. The number of parameters and their order must also match. The best way to ensure this is to copy and paste our names. Our testing will expect those method names, so any mismatch will fail during our testing. Parameter names will not be tested —you can change the parameter names if you want.
Each method MUST be preceded by an appropriate specification, or "spec", as a Javadoc comment. The best way to ensure this is to copy and paste. After you have pasted, be sure to do any necessary editing. For example, the spec of a function does not have to say that the function yields a boolean or int or anything else, because that is known from the header of the method.
A precondition should not be tested by the method; it is the responsibility of the caller to ensure that the precondition is met. For example, it is a mistake to call method setPredecessor with null for the predecessor argument. However, in function isOlder , the tests for v1 and v2 not null MUST be made, because that is part of the specification.
It is possible for person v1 to be v2 's predecessor and visa versa, at the same time. We do not check for such strange occurrences.
In writing methods setPredecessor , be careful! If P is becoming the predecessor of this ComputerVirus , then P has one more variation, and its field that contains its number of variations has to be updated accordingly.
Do not use if-statements, and use conditional statement (...? ... : ...) only in function toString . Boolean expressions, using the operators && (AND), || (OR), and ! (NOT), are sufficient to implement the comparison methods.
Function toString
We illustrate the required format of the output of toString with an example and then make some comments. Here is an example of output from function toString :
"W computer virus Superfun. Id 34. Discovered 6/2005. Has 2 variations."
Here are some points about this output.
- Exactly one blank separates each piece of information (including the word “computer” and the word “virus”), and the periods are necessary.
- The 'W' at the beginning means it is a windows virus. Use 'M' for Mac and 'L' for Linux.
- The name of the virus follows "computer virus".
- If the id number is unknown, omit it entirely (in the example above, omit " Id 34.").
- The predecessor is not described in the output of this function.
- If the virus has exactly 1 variation, the word "variation" should appear instead of "variations".
- In writing the body of function toString , do not use if-statements or switches. Instead, use the conditional expression (condition ? expression-1: expression-2) . This is the only place you can use the conditional expression.
Class ComputerVirusTester
We require you to build a suite of test cases as you develop class ComputerVirus in a JUnit class ComputerVirusTester . Make sure that your test suite adheres to the following principles:
- Every method in your ComputerVirus needs at least one test case in the test suite.
- The more interesting or complex a method is, the more test cases you should have for it. What makes a method 'interesting' or complex can be the number of interesting combinations of inputs that method can have, the number of different results that the method can have when run several times, the different results that can arise when other methods are called before and after this method, and so on.
- Here is one important point. If an argument of a method can be null , there should be a test case that has null for that argument.
- Test each method (or group of methods) carefully before moving on to the rest of the assignment.
How to do this assignment
First, remember that if-statement are not allowed. If your assignments has if-statements, you will be asked to revise the assignment and resubmit.
Second, you should develop and test class in a methodologically sound way, which we outline below. If we detect that you did not develop it this, we may ask you to start from scratch and write one of the other alternatives for this assignment.
- First, start a new folder on your hard drive that will contain the files for this project. Start every new project in its own folder.
- Second, write a class ComputerVirus using DrJava. In it, declare the fields in class ComputerVirus , compiling often as you proceed. Write comments that specify what these fields mean.
- Third, start a new JUnit class, calling it ComputerVirusTester .
- Fourth, this assignment should properly be done in several parts. For each part, write the methods, write a test procedure in class ComputerVirusTester and add test cases to it for all the methods you wrote, and then test the methods thoroughly. Do not go on to the next group of methods until the ones you are working on are correct. If we determine that you did not follow this way of doing things —for example, you wrote all methods and then tried to test, we may ask you to set this assignment aside and do another instead. Here are the groups of methods.
- (1) The first constructor and all the getter methods of class ComputerVirus .
- (2) The second constructor.
- (3) Function toString .
- (4) The setter methods.
- (5) The two comparison methods.
At each step, make sure all methods are correct before proceeding to the next step. When adding a new method, cut and paste the comment and the header from the assignment handout and then edit the comment. It must have suitable javadoc specifications as well as suitable comments on the field declarations. The assignment will not be accepted for testing until it does.

Other hints and directions
- Do not use if statements.
- Remember that a string literal is enclosed in double quotation marks and a char literal is enclosed in single quotation marks.
- Be sure to create the javadoc specification and look at it carefully, to be sure that the methods are specified thoroughly and clearly.
Procedure for submission
You may submit the assignment whenever you wish. We will look at it in several steps.
1. If the field specifications and the javadoc specifications are not appropriate, we will ask you to fix them and resubmit.
2. If the field and javadoc specs are ok, we will look at your test cases. If they are inadequate, we will askyou to fix them and resubmit.
3. If the test cases are adequate, we will test your program. If there are errors, you will be asked to correct them and resubmit.
The assignment will be considered completed when it passes all three steps.
Submitting the assignment
First, at the top of file ComputerVirus.java , put a comment that says that you looked carefully at the specifications produced by clicking the javadoc button and checked that the specifications of methods and the class specification were OK (put this comment after doing what the comments says).
Second, upload files ComputerVirus.java and ComputerVirusTester.java on the CMS. You will be asked to upload Ass1.java and Ass1Tester.java . Don't worry about this; just upload files ComputerVirus.java and ComputerVirusTester.java .
Make sure you submit .java files. do not submit a file with the extension/suffix .java~. It will help to set the preferences in your operating system so that extensions always appear.
- Threats and vulnerabilities
virus (computer virus)
- Mike Chapple, University of Notre Dame
- Crystal Bedell
- Rob Wright, News Director
A computer virus is malicious code that replicates by copying itself to another program, computer boot sector or document and changes how a computer works. A virus spreads between systems after some type of human intervention. Viruses replicate by creating their own files on an infected system, attaching themselves to a legitimate program, infecting a computer's boot process or infecting user documents. The virus requires someone to knowingly or unknowingly spread the infection. In contrast, a computer worm is standalone programming that does not require human interaction to spread. Viruses and worms are two examples of malware, a broad category that includes any type of malicious code.
A virus can be spread when a user opens an email attachment, runs an executable file, visits an infected website or views an infected website advertisement, known as malvertising . It can also be spread through infected removable storage devices, such as Universal Serial Bus (USB) drives. Once a virus has infected the host, it can infect other system software or resources, modify or disable core functions or applications, and copy, delete or encrypt data. Some viruses begin replicating as soon as they infect the host, while other viruses will lie dormant until a specific trigger causes malicious code to be executed by the device or system.
Many viruses also include evasion or obfuscation capabilities designed to bypass modern antivirus and antimalware software and other security defenses. The rise of polymorphic malware development, which can dynamically change its code as it spreads, has made viruses more difficult to detect and identify.
Types of computer viruses
File infectors. Some file infector viruses attach themselves to program files, usually selected COM or EXE files. Others can infect any program for which execution is requested, including SYS, OVL, PRG and MNU files. When the infected program is loaded, the virus is loaded as well. Other file infector viruses arrive as wholly contained programs or scripts sent as an attachment to an email note.
Macro viruses. These viruses specifically target macro language commands in applications such as Microsoft Word and other programs. In Word, macros are saved sequences for commands or keystrokes that are embedded in the documents. Macro viruses, or scripting viruses, can add their malicious code to the legitimate macro sequences in a Word file. Microsoft disabled macros by default in more recent versions of Word; as a result, hackers have used social engineering schemes to convince targeted users to enable macros and launch the virus.
Overwrite viruses. Some viruses are designed specifically to destroy a file or application's data. After infecting a system, an overwrite virus begins overwriting files with its own code. These viruses can target specific files or applications or systematically overwrite all files on an infected device. An overwrite virus can install new code in files and applications that programs them to spread the virus to additional files, applications and systems.
Polymorphic viruses. A polymorphic virus is a type of malware that has the ability to change or apply updates to its underlying code without changing its basic functions or features. This process helps a virus evade detection from many antimalware and threat detection products that rely on identifying signatures of malware; once a polymorphic virus's signature is identified by a security product, the virus can then alter itself so it will no longer be detected using that signature.
Resident viruses. This type of virus embeds itself in the memory of a system. The original virus program isn't needed to infect new files or applications. Even if the original virus is deleted, the version stored in memory can be activated when the operating system (OS) loads a specific application or service. Resident viruses are problematic because they can evade antivirus and antimalware software by hiding in the system's random access memory (RAM).
Rootkit viruses. A rootkit virus is a type of malware that installs an unauthorized rootkit on an infected system, giving attackers full control of the system with the ability to fundamentally modify or disable functions and programs. Rootkit viruses were designed to bypass antivirus software, which typically scanned only applications and files. More recent versions of major antivirus and antimalware programs include rootkit scanning to identify and mitigate these types of viruses.
System or boot sector viruses. These viruses infect executable code found in certain system areas on a disk. They attach to the disk OS (DOS) boot sector on diskettes and USB thumb drives or the master boot record (MBR) on hard disks. In a typical attack scenario, the victim receives a storage device that contains a boot disk virus. When the victim's OS is running, files on the external storage device can infect the system; rebooting the system will trigger the boot disk virus. An infected storage device connected to a computer can modify or even replace the existing boot code on the infected system so that, when the system is booted next, the virus will be loaded and run immediately as part of the MBR. Boot viruses are less common now as today's devices rely less on physical storage media.

How does a computer virus spread?
The distinguishing characteristic of a virus is it spreads from system to system after a user takes some action that either intentionally or accidentally facilitates that spread. This spread is known as virus propagation , and there are many different techniques viruses can use to propagate between systems. The simplest example occurs when a virus is contained within an executable file that a user downloads from the internet, receives in an email message or copies from a removable storage device. As soon as the user executes that file, the virus springs into action, running malicious code that infects the user's system.
Other viruses can spread through more complex mechanisms. In those cases, a virus running on an infected system may take action to begin its own propagation. For example, a virus might copy itself to all removable media installed on a system, attach itself to email messages sent to a user's contacts or copy itself to shared file servers. In those cases, the lines become blurred between viruses, which require human assistance to spread, and worms, which spread on their own by exploiting vulnerabilities. The key difference is the virus will always require a human to take an action that enables that final step in the propagation process, while a worm does not require this human assistance.
Viruses can also spread between systems without ever writing data to disk, making them more difficult to detect with virus protection and virus removal mechanisms. These fileless viruses are often launched when a user visits an infected website and then run completely within the target system's memory, carrying out their malicious payload and then disappearing without a trace.
How do computer viruses attack?
Virus propagation is only half the equation. Once a virus gains a foothold on a newly infected system, it begins to carry out whatever exploit the virus author designed it to perform. This is the payload delivery process, where the virus attacks the target system. Depending on the techniques the virus uses and the privileges of the user who created the infection, the virus may be able to take any action it desires on the target system. This is one of the main reasons that security professionals encourage organizations to follow the principle of least privilege ( POLP ) and not grant users administrative rights on their own systems. This type of access can magnify the damage caused by a virus.
The payload a virus carries may violate one or more of the principles of cybersecurity: confidentiality, integrity and availability ( CIA triad ). Confidentiality attacks seek to locate sensitive information stored on the target system and share it with the attacker. For example, a virus might search the local hard drive (HD) for Social Security numbers, credit card numbers and passwords, and then funnel those back to the attacker. Integrity attacks seek to make unauthorized modifications or deletions of information stored on the system. For example, a virus might delete files stored on a system or make unauthorized modifications to the OS to avoid detection. Availability attacks seek to deprive the legitimate user access to the system or the information it contains. For example, ransomware is a type of virus that encrypts information on the user's HD, preventing legitimate access. It then demands the payment of a ransom in exchange for the decryption key.
Viruses may also join a system to a botnet, placing it under the control of the attacker. Systems joined to botnets are commonly used to conduct distributed denial of service (DDoS) attacks against websites and other systems.
How do you prevent computer viruses?
The following measures can help you prevent a virus infection:
- Install current antivirus and antispyware software, and keep it up to date.
- Run daily scans of antivirus software.
- Disable autorun to prevent viruses from propagating to any media connected to the system.
- Regularly patch the OS and applications installed on the computer.
- Don't click on web links sent via email from unknown senders.
- Don't download files from the internet or email from unknown senders.
- Install a hardware-based firewall .
What are signs you may be infected with a computer virus?
The following are indications that your computer might be infected by a virus:
- The computer takes a long time to start up, and performance is slow.
- The computer experiences frequent crashes or shutdown and error messages.
- The computer behaves erratically, such as not responding to clicks or opening files on its own.
- The computer's HD is acting strangely -- for example, constantly spinning or making continual noise.
- Email is corrupted.
- The amount of storage on the computer is reduced.
- Files and other data on the computer have gone missing.
How do you remove a computer virus?
In the event your personal computer (PC) becomes infected with a virus, you can take the following steps to remove it:
- Enter Safe Mode. The process will depend on the version of Windows you're running.
- Delete temporary files. While in Safe Mode, use the Disk Cleanup tool to delete temporary files.
- Download an on-demand and a real-time virus scanner.
- Run the on-demand scanner followed by the real-time scanner. If neither scanner removes the virus, then it might need to be removed manually. This should only be done by an expert who is experienced at using Windows Registry and knows how to view and delete system and program files.
- Reinstall any files or programs damaged by the virus.
History of computer viruses
The first known computer virus was developed in 1971 by Robert Thomas, an engineer at BBN Technologies. Known as the Creeper virus, Thomas' experimental program infected mainframes on the Advanced Research Projects Agency Network (ARPANET), displaying the teletype message: "I'm the creeper: Catch me if you can."
The first computer virus to be discovered in the wild was Elk Cloner , which infected Apple II OSes through floppy disks and displayed a humorous message on infected computers. Elk Cloner, which was developed by 15-year-old Richard Skrenta in 1982, was designed as a prank, but it demonstrated how a potentially malicious program could be installed in an Apple computer's memory and prevent users from removing the program.
The term computer virus wasn't used until a year later. Fred Cohen, a graduate student at the University of Southern California (USC), wrote an academic paper titled "Computer Viruses -- Theory and Experiments" and credited his academic advisor and RSA Security co-founder Leonard Adleman with coining the term computer virus in 1983.
Famous computer viruses
Notable examples of early computer viruses include the following:
- The Brain virus , which initially appeared in 1986, is considered to be the first Microsoft DOS ( MS-DOS ) PC virus. Brain was a boot sector virus. It spread through infected floppy disk boot sectors, and once installed on a new PC, it would install itself to the system's memory and subsequently infect any new disks inserted into that PC.
- The Jerusalem virus , also known as the Friday the 13th virus , was discovered in 1987 and spread throughout Israel via floppy disks and email attachments. The DOS virus would infect a system and delete all files and programs when the system's calendar reached Friday the 13th.
- The Melissa virus , which first appeared in 1999, was distributed as an email attachment. If the infected systems had Microsoft Outlook, the virus would be sent to the first 50 people in an infected user's contact list. This virus also affected macros in Microsoft Word and disabled or lowered security protections in the program.
- The Archiveus Trojan , which debuted in 2006, was the first known case of a ransomwarevirus that used strong encryption to encrypt users' files and data. Archiveus targeted Windows systems, used Rivest-Shamir-Adleman (RSA) encryption algorithms -- whereas earlier versions of ransomware used weaker and easily defeated encryption technology -- and demanded victims purchase products from an online pharmacy.
- The Zeus Trojan , or Zbot , one of the most well-known and widely spread viruses in history, first appeared in 2006 but has evolved over the years and continues to cause problems as new variants emerge. The Zeus Trojan was initially used to infect Windows systems and harvest banking credentials and account information from victims. The virus spreads through phishing attacks, drive-by downloads and man-in-the-browser The Zeus malware kit was adapted by cybercriminals to include new functionality to evade antivirus programs, as well as spawn new variants of the Trojan, such as ZeusVM, which uses steganography techniques to hide its data.
- The Cabir virus is the first verified example of a mobile phone virus for the now-defunct Nokia Symbian OS. The virus was believed to be created by a group from the Czech Republic and Slovakia called 29A, who sent it to a number of security software companies, including Symantec in the U.S. and Kaspersky Lab in Russia. Cabir is considered a proof-of-concept (POC) virus because it proves that a virus can be written for mobile phones, something that was once doubted.
Continue Reading About virus (computer virus)
- How to protect the network from ransomware in 5 steps
- Malware quiz: Test your knowledge of types of terms
- Enterprise ransomware prevention measures to enact in 2021
- Top network attacks of 2020 that will influence the decade
- Computer viruses a bigger threat with pandemic
Related Terms
Dig deeper on threats and vulnerabilities.

Trojan horse

computer worm

blended threat

This SD-WAN vendor comparison chart is a useful starting point to evaluate information about deployment options, pricing, ...
Cisco Live returned as an in-person event this year and customers responded positively, with 16,000 showing up to the Mandalay ...
Use this guide to Cisco Live 2023 -- a five-day in-person and online conference -- to learn about networking trends, including ...
Public, private, hybrid or consortium, each blockchain network has distinct pluses and minuses that largely drive its ideal uses ...
Get the lowdown on the major features, differentiators, strengths and weaknesses of the blockchain platforms getting the most ...
The 2023 trends that are reshaping the risk management landscape include GRC platforms, maturity frameworks, risk appetite ...
IT should understand the differences between UEM, EMM and MDM tools so they can choose the right option for their users. Learn ...
Internet Explorer mode lets users view legacy IE websites not supported by other browsers, which can increase productivity and ...
Implementing MDM in BYOD environments isn't easy. IT should communicate with end users to set expectations about what personal ...
Azure management groups, subscriptions, resource groups and resources are not mutually exclusive. Businesses can -- and often do ...
Amazon CodeGuru reviews code and suggests improvements to users looking to make their code more efficient as well as optimize ...
Establishing sound multi-cloud governance practices can mitigate challenges and enforce security. Review best practices and tools...
Comms tech providers tasked to modernise parts of leading MENA and Asia operator’s existing networks, including deploying new ...
SME lending and savings bank Shawbrook Bank is using a low-code platform from Pegasystems to rewrite outdated business processes
Newham Council plans to set up a ‘data campus’ at East Ham Town Hall to continue the data economy development vision it announced...

What is a Computer Virus? - Definition, Types & Protection
Computer virus definition.
A computer virus we can say is a small software program or a piece of code that is loaded on your computer system while using internet can spread from one computer to another and running without your knowledge. Computer viruses can also replicate and they are man-made. How the replication done in the computer virus? A simple virus that can make copy of itself over and over again and that would be easy to produce. Sometimes a simple virus is very dangerous because it stored in your system available memory and when after some time all the small virus collected it may halt you system. A virus has a capacity to corrupt the files located in you system and it also has a capability to spread the virus via e-mail program and effect the system other email addresses in your online address book. It can also delete everything on your hard disk that would be the worst case scenario. A virus can also affect your system security. In 1987, A virus infect ARPANET, then the Defense department and other universities using large network, many antivirus programs become available. Such programs are invent because they check periodically you system and prevent it from known viruses.
Types of Computer Virus

Macro virus
Macro virus infect the file hat are created from some application or programs which are mainly contain macro files like doc, pps, xls, mdb. So basically such virus infect the files with the macros and also templates and document that are contained in the file. These virus hide in documents that are shared through network and e-mail. Macro virus are Relax, bablas, Melissa.A, 097M/Y2K.
Memory Resident Viruses
Resident viruses activated every time the OS runs and end up infecting other opened files. Such virus usually fix themselves inside the computer memory, hide in RAM. Resident viruses are CMJ, meve, randex, mrklunky.
Overwrite Viruses
Overwrite viruses delete the information from the file partially or completely once it infect a file. It infect only the file content may be change all the content but the file location and name remains the same, means doesn’t infect the file name and the location. Overwrite viruses are Trj.Reboot, way, trivial.88.D.
Direct Action Viruses
Direct Action Virus activate when the file containing virus is executed. The virus take no other action unless an infected file is executed again. Most viruses avoid this because this is not so productive, but such virus damage in the past. Direct Action viruses are Vienna Virus.
Directory Virus
Directory virus is also known by cluster virus and file system virus. This can infect the computer’s directory by changing the path by indication the location. Such virus located into the hard disk but affect the entire directory. Directory viruses are die-2 virus.
Web Scripting Virus
Mostly web pages contain complex code to make their web page content interactive so that such code exploit that cause undesirable actions. Such virus originate from browser and web pages. Web Scripting viruses include JS.Fortnight that spread via malicious emails.
Multipartite Virus
This type of virus spread in multiple ways and the taken action depending upon the type of OS installed and presence of certain files. Most of the time this virus try to hide in computer’s memory not to infect the hard disk. Multipartite Viruses are flip, invader and tequila.
Polymorphic Virus
Polymorphic virus encode and encrypt themselves every time they are going to infect the computer system. For that they use different encryption methods and algorithms. Since they use different encryption method each time which is difficult for antivirus to locate and resolve them. Polymorphism viruses are Marburg, tuareg, Satan bug, elkern.
Worm is very similar to a virus having a capability to self-replicate which is leading to negative effect on your system. This consume too much system memory and also affect web servers and network servers. Worm viruses are lovgate.F, sobig.D, trile.C, PSWBugbear.B, Mapson.
Trojans horses
This name comes from a software which is very useful software but later do damage you system after run once. This virus can track the login details of the users who is online. Example as we all know E-banking is very common, so its vulnerability of tracing your login details whenever your PC is working without the support of strong antivirus.
Email Virus
This virus is spread via email, this will hide an email when recipient opens the mail.
Boot Infectors
This virus type will include boot sector and master boot record types. While all the viral codes are separated because they infect the hard disks or the floppy. It include the viruses like the brain virus which is very first wild virus is to be created.
Virus Protection Methods
Protection of virus is well designed software program which is used in infected computer systems to prevent from viruses, worms and Trojan horses. The main purpose of using Virus protection is to remove any malicious software code which is already infect a computer. Most of the virus protection utilities now bundle anti-spyware and anti-malware ability that belong to anti-virus protection. To secure internet that include some additional capabilities like anti-spam, anti-phishing, firewall, optimization of files and file protection.

- Science Assignment Help
- Math Assignment Help
- Chemistry Assignment Help
- Physics Assignment Help
- Biology Assignment Help
- Psychology Assignment Help
- History Assignment Help
- Geography Assignment Help
- English Assignment Help
- Humanities Assignment Help
- Nursing Assignment Help
- Social Science Assignment Help
- Arts and Architecture Help
- Statistics Assignment Help
- Law Assignment Help
- Computational Mathematics Assignment Help
- Programming Assignment Help
- Database Assignment Help
- Data Structure Assignment Help
- Operating Systems Assignment Help
- Computer Network Assignment Help
- UML Diagram Assignment Help
- IT Assignment Help
- Game Programming Assignment Help
- Computer Science Assignment Help
- Information Systems Assignment Help
- Chemical Engineering Assignment Help
- Civil Engineering Assignment Help
- Electrical Engineering Assignment Help
- Mechanical Engineering Assignment Help
- Petroleum Engineering Assignment Help
- Biotechnology Assignment Help
- Accounting Assignment Help
- Finance Assignment Help
- Economics Assignment Help
- Marketing Assignment Help
- Human Resources Assignment Help
- Operations Management Assignment Help
- Strategy and Planning Help
- Project Management Assignment Help
- Case Studies Writing Help
- Political Science Assignment Help
- Referencing Help
- Assignment Help Websites
- Online Assignment Help
- Do My Course
- Do My Homework
- Health Informatics
- Essay Writing Help
- Business Essay Writing Help
- Course Writing Services
- Plagiarism Free Essay Writing
- Essay Editing Service
- Dissertation Writing Services
- Thesis Writing Help
- Custom Writing Help
- Write My Essay
- Write My Paper
- Paper Writing Help
- Academic Writing Help
- College Essay Writing
- Cheap Essay Writing

Disclaimer : The study tools and academic assistance/guidance through online tutoring sessions provided by AssignmentHelp.Net is to help and enable students to compete academically. The website does not provide ghostwriting services and has ZERO TOLERANCE towards misuse of the services. In case any user is found misusing our services, the user's account will be immediately terminated.
- Terms of Use
- Privacy Policy
- Refund Policy

In order to continue enjoying our site, we ask that you confirm your identity as a human. Thank you very much for your cooperation.
- Government Exam Articles
Computer Virus and its Types

A computer virus is a kind of malicious computer program, which when executed, replicates itself and inserts its own code. When the replication is done, this code infects the other files and program present on your system.
These computer viruses are present in various types and each of them can infect a device in a different manner.
In this article, we shall discuss in detail what is a computer virus and what are its different types. Also, we will read on to know what is an Anti-virus and how it can nullify a virus in our computer devices, along with some sample questions from the competitive exam point of view.
To know more about the Fundamentals of Computer , visit the linked article.
Apart from being aware of what a computer virus is, this topic is even important for candidates preparing for Government exams. Major competitive exams in the country comprise Computer Knowledge as an integral part of the syllabus and questions based on virus and anti-virus can also be expected in these exams.
Thus, to excel in the upcoming Govt exams, aspirants must go through this article in detail and carefully study the different types of viruses.
What is a Computer Virus?
A computer virus is a program which can harm our device and files and infect them for no further use. When a virus program is executed, it replicates itself by modifying other computer programs and instead enters its own coding. This code infects a file or program and if it spreads massively, it may ultimately result in crashing of the device.
Across the world, Computer viruses are a great issue of concern as they can cause billions of dollars’ worth harm to the economy each year.

Since the computer virus only hits the programming of the device, it is not visible. But there are certain indications which can help you analyse that a device is virus-hit. Given below are such signs which may help you identify computer viruses:
- Speed of the System – In case a virus is completely executed into your device, the time taken to open applications may become longer and the entire system processing may start working slowly
- Pop-up Windows – One may start getting too many pop up windows on their screen which may be virus affected and harm the device even more
- Self Execution of Programs – Files or applications may start opening in the background of the system by themselves and you may not even know about them
- Log out from Accounts – In case of a virus attack, the probability of accounts getting hacked increase and password protected sites may also get hacked and you might get logged out from all of them
- Crashing of the Device – In most cases, if the virus spreads in maximum files and programs, there are chances that the entire device may crash and stop working
The first thing which you might notice in case of virus attack is the speed with which your system shall process. And then gradually other changes can also be observed.
Types of Computer Virus
Discussed below are the different types of computer viruses:
- Boot Sector Virus – It is a type of virus that infects the boot sector of floppy disks or the Master Boot Record (MBR) of hard disks. The Boot sector comprises all the files which are required to start the Operating system of the computer. The virus either overwrites the existing program or copies itself to another part of the disk.
- Direct Action Virus – When a virus attaches itself directly to a .exe or .com file and enters the device while its execution is called a Direct Action Virus. If it gets installed in the memory, it keeps itself hidden. It is also known as Non-Resident Virus.
- Resident Virus – A virus which saves itself in the memory of the computer and then infects other files and programs when its originating program is no longer working. This virus can easily infect other files because it is hidden in the memory and is hard to be removed from the system.
- Multipartite Virus – A virus which can attack both, the boot sector and the executable files of an already infected computer is called a multipartite virus. If a multipartite virus attacks your system, you are at risk of cyber threat.
- Overwrite Virus – One of the most harmful viruses, the overwrite virus can completely remove the existing program and replace it with the malicious code by overwriting it. Gradually it can completely replace the host’s programming code with the harmful code.
- Polymorphic Virus – Spread through spam and infected websites, the polymorphic virus are file infectors which are complex and are tough to detect. They create a modified or morphed version of the existing program and infect the system and retain the original code.
- File Infector Virus – As the name suggests, it first infects a single file and then later spreads itself to other executable files and programs. The main source of this virus are games and word processors.
- Spacefiller Virus – It is a rare type of virus which fills in the empty spaces of a file with viruses. It is known as cavity virus. It will neither affect the size of the file nor can be detected easily.
- Macro Virus – A virus written in the same macro language as used in the software program and infects the computer if a word processor file is opened. Mainly the source of such viruses is via emails.
Government exam aspirants can check the links given below for the detailed section-wise syllabus for the other subjects apart from Computer Awareness:
How To Protect Your Computer from Virus?
The most suitable way of making your computer virus-free is by installing an Anti-virus software. Such software help in removing the viruses from the device and can be installed in a computer via two means:
- Online download
- Buying an Anti-virus software and installing it
Further below, we bring to you details as to what anti-virus is and what are its different types along with a few examples.
Moving further, candidates can also refer to the following links to learn more about Computer Knowledge and prepare themselves accordingly:
- Difference Between RAM and ROM
- Difference Between MS Excel and MS Word
- Difference Between IPV4 and IPV 6
- Difference Between Firewall and Antivirus
- Difference Between WWW and Internet
- Difference Between Notepad and WordPad
- Difference Between Virus and Malware
What is an Anti-Virus?
An anti-virus is a software which comprises programs or set of programs which can detect and remove all the harmful and malicious software from your device. This anti-virus software is designed in a manner that they can search through the files in a computer and determine the files which are heavy or mildly infected by a virus.
Given below is a list of few of the major antivirus software which is most commonly used:
- Norton Antivirus
- F-Secure Antivirus
- Kaspersky Antivirus
- AVAST Antivirus
- Comodo Antivirus
- McAfee Antivirus
These are few of the many anti-virus software widely used to remove viruses from a device.
Sample Questions on Computer Virus and Anti-Virus
As discussed above, Computer Awareness is a common topic for major Government exams and questions based on Computer Virus and Antivirus may also be asked in the exam.
Thus, given below are a few sample computer virus questions and answers for the assistance of aspirants.
Q 1. Which of the following is not a type of computer virus?
- Polymorphic virus
- Space filler virus
- Multipartite virus
- Boot sector virus
Answer: (4) Trojan
Q 2. Which of these was the first computer virus?
- Crypto Locker
- Morris Worm
Answer: (1) Creeper
Solution: Creeper was the first-ever computer virus and was an experimental self-replicating virus released in the year 1971.
Q 3. Which of the following is not a source of the virus entering your system?
- All of the above
- None of the above
Answer: (5) All of the above
Q 4. The other name for Non-Resident virus is _________
- Direct Action Virus
- Boot Sector Virus
- Multipartite Virus
- Overwrite Virus
- Polymorphic Virus
Answer: (1) Direct Action Virus
Q 5. Which of the following viruses is also known as “Cavity Virus”?
- Space Filler Virus
Answer: (2) Space Filler Virus
For more questions to ace the upcoming competitive exams, aspirants can visit the articles given below:
- Free Online Government Exam Quiz
- Free Online Mock Test Series with Solutions
- Previous Year Govt Exam Question Papers PDF with Solutions
Also, to get the best Preparation Strategy for Competitive exams , candidates can visit the linked article.
Get the latest exam information and study material at BYJU’S and keep yourself updated.
Frequently Asked Questions on Computer Virus and its Types
Q 1. what is the definition of a computer virus, q 2. what are the main computer viruses.
Ans. The main types of computer virus are as follows:
- Resident Virus
- File Infector Virus
Q 3. What is the Creeper Virus?
Q 4. what are the examples of a computer virus.
Ans. Given below are a few examples of a computer virus:
- CryptoLocker
Q 5. How to secure a computer system from a virus attack?

Leave a Comment Cancel reply
Your Mobile number and Email id will not be published. Required fields are marked *
Request OTP on Voice Call
Post Comment

Connect with us for Free Preparation
Get access to free crash courses & video lectures for all government exams..
- Share Share
Register with BYJU'S & Download Free PDFs
- Data Structure & Algorithm Classes (Live)
- System Design (Live)
- DevOps(Live)
- Explore More Live Courses
- Interview Preparation Course
- Data Science (Live)
- GATE CS & IT 2024
- Data Structure & Algorithm-Self Paced(C++/JAVA)
- Data Structures & Algorithms in Python
- Explore More Self-Paced Courses
- C++ Programming - Beginner to Advanced
- Java Programming - Beginner to Advanced
- C Programming - Beginner to Advanced
- Android App Development with Kotlin(Live)
- Full Stack Development with React & Node JS(Live)
- Java Backend Development(Live)
- React JS (Basic to Advanced)
- JavaScript Foundation
- Complete Data Science Program(Live)
- Mastering Data Analytics
- CBSE Class 12 Computer Science
- School Guide
- All Courses
- Linked List
- Binary Tree
- Binary Search Tree
- Advanced Data Structure
- All Data Structures
- Asymptotic Analysis
- Worst, Average and Best Cases
- Asymptotic Notations
- Little o and little omega notations
- Lower and Upper Bound Theory
- Analysis of Loops
- Solving Recurrences
- Amortized Analysis
- What does 'Space Complexity' mean ?
- Pseudo-polynomial Algorithms
- Polynomial Time Approximation Scheme
- A Time Complexity Question
- Searching Algorithms
- Sorting Algorithms
- Graph Algorithms
- Pattern Searching
- Geometric Algorithms
- Mathematical
- Bitwise Algorithms
- Randomized Algorithms
- Greedy Algorithms
- Dynamic Programming
- Divide and Conquer
- Backtracking
- Branch and Bound
- All Algorithms
- Company Preparation
- Practice Company Questions
- Interview Experiences
- Experienced Interviews
- Internship Interviews
- Competitive Programming
- Design Patterns
- System Design Tutorial
- Multiple Choice Quizzes
- Go Language
- Tailwind CSS
- Foundation CSS
- Materialize CSS
- Semantic UI
- Angular PrimeNG
- Angular ngx Bootstrap
- jQuery Mobile
- jQuery EasyUI
- React Bootstrap
- React Rebass
- React Desktop
- React Suite
- ReactJS Evergreen
- ReactJS Reactstrap
- BlueprintJS
- TensorFlow.js
- English Grammar
- School Programming
- Number System
- Trigonometry
- Probability
- Mensuration
- Class 8 Syllabus
- Class 9 Syllabus
- Class 10 Syllabus
- Class 8 Notes
- Class 9 Notes
- Class 10 Notes
- Class 11 Notes
- Class 12 Notes
- Class 8 Maths Solution
- Class 9 Maths Solution
- Class 10 Maths Solution
- Class 11 Maths Solution
- Class 12 Maths Solution
- Class 7 Notes
- History Class 7
- History Class 8
- History Class 9
- Geo. Class 7
- Geo. Class 8
- Geo. Class 9
- Civics Class 7
- Civics Class 8
- Business Studies (Class 11th)
- Microeconomics (Class 11th)
- Statistics for Economics (Class 11th)
- Business Studies (Class 12th)
- Accountancy (Class 12th)
- Macroeconomics (Class 12th)
- Machine Learning
- Data Science
- Mathematics
- Operating System
- Computer Networks
- Computer Organization and Architecture
- Theory of Computation
- Compiler Design
- Digital Logic
- Software Engineering
- GATE 2024 Live Course
- GATE Computer Science Notes
- Last Minute Notes
- GATE CS Solved Papers
- GATE CS Original Papers and Official Keys
- GATE CS 2023 Syllabus
- Important Topics for GATE CS
- GATE 2023 Important Dates
- Software Design Patterns
- HTML Cheat Sheet
- CSS Cheat Sheet
- Bootstrap Cheat Sheet
- JS Cheat Sheet
- jQuery Cheat Sheet
- Angular Cheat Sheet
- Facebook SDE Sheet
- Amazon SDE Sheet
- Apple SDE Sheet
- Netflix SDE Sheet
- Google SDE Sheet
- Wipro Coding Sheet
- Infosys Coding Sheet
- TCS Coding Sheet
- Cognizant Coding Sheet
- HCL Coding Sheet
- FAANG Coding Sheet
- Love Babbar Sheet
- Mass Recruiter Sheet
- Product-Based Coding Sheet
- Company-Wise Preparation Sheet
- Array Sheet
- String Sheet
- Graph Sheet
- ISRO CS Original Papers and Official Keys
- ISRO CS Solved Papers
- ISRO CS Syllabus for Scientist/Engineer Exam
- UGC NET CS Notes Paper II
- UGC NET CS Notes Paper III
- UGC NET CS Solved Papers
- Campus Ambassador Program
- School Ambassador Program
- Geek of the Month
- Campus Geek of the Month
- Placement Course
- Testimonials
- Student Chapter
- Geek on the Top
- Geography Notes
- History Notes
- Science & Tech. Notes
- Ethics Notes
- Polity Notes
- Economics Notes
- UPSC Previous Year Papers
- SSC CGL Syllabus
- General Studies
- Subjectwise Practice Papers
- Previous Year Papers
- SBI Clerk Syllabus
- General Awareness
- Quantitative Aptitude
- Reasoning Ability
- SBI Clerk Practice Papers
- SBI PO Syllabus
- SBI PO Practice Papers
- IBPS PO 2022 Syllabus
- English Notes
- Reasoning Notes
- Mock Question Papers
- IBPS Clerk Syllabus
- Apply for a Job
- Apply through Jobathon
- Hire through Jobathon
- All DSA Problems
- Problem of the Day
- GFG SDE Sheet
- Top 50 Array Problems
- Top 50 String Problems
- Top 50 Tree Problems
- Top 50 Graph Problems
- Top 50 DP Problems
- Solving For India-Hackthon
- GFG Weekly Coding Contest
- Job-A-Thon: Hiring Challenge
- BiWizard School Contest
- All Contests and Events
- Saved Videos
- What's New ?
- Data Structures
- Interview Preparation
- Topic-wise Practice
- Latest Blogs
- Write & Earn
- Web Development
Related Articles
- Write Articles
- Pick Topics to write
- Guidelines to Write
- Get Technical Writing Internship
- What is Cyber Bullying? Definition, Types, Effects, Laws
- What is Plagiarism? Definition, Types, How to Avoid, Laws
What is a Computer Virus? Definition, History, Types, Symptoms
- What is Global Warming? – Definition, Causes, Effects and Impacts
- Stress, Strain and Elastic Potential Energy
- Practice Problems on Kinetic Energy
- Potential Energy
- Types of Computers
- Software and its Types
- What are Different Output Devices?
- What is Computer Networking?
- Introduction to Microsoft Word
- What is Internet? Definition, Uses, Working, Advantages and Disadvantages
- Types of Computer Ports
- Computer Memory
- Secondary Memory
- Read Only Memory (ROM)
- Second Generation of Computers
- Container and Empty Tags in HTML
- What is an Operating System?
- Cache Memory
- Text Alignment in MS Word
- Fifth Generation of Computers
- Central Processing Unit (CPU)
- How to use Mail Merge in MS Word?
- Third Generation of Computers
- Web Browser
- Primary Memory
- Fourth Generation of Computers
- Last Updated : 11 Nov, 2022
A computer virus is a sort of malware that attaches itself to another program and can replicate and propagate once it has been installed on a user’s computer. When a computer changes the way in which it should work normally, it is said to be infected by a virus. This virus may spread from one computer to another. For example, you may receive an email with a harmful attachment, inadvertently open the file, and the computer virus then infects your machine. Or in other words, a harmful software application that is installed without the user’s knowledge/ consent on their computer and then performs some malicious acts is known as a virus. A virus attaches itself to another software, once infected the system, in such a way that the host program’s execution activates the virus’s actions simultaneously. It has the ability to self-replicate itself into other programs or files and infecting them. Computer viruses are harmful but the majority of them engage in malicious activity, such as data destruction.
History of Computer Virus:
Viruses have been infecting various devices for a long term via the Internet or some other medium. The viruses are created with an intention to steal information, completely destroy the device, etc. The “Creeper system, ” the first computer virus, was an experimental self-Multiplying virus launched in 1971. Then, the Rabbit virus came in the mid-1970s and was extremely active and it self-replicated very fast & wrecked the functionality at the same speed. The first PC virus was known as “Elk Cloner” and was built in 1982, by Rich Skrenta. It spread by a floppy disc with a game on it and hooked itself to the Apple II operating system. “Brain,” the first computer virus for MS-DOS, was introduced in 1986. The boot sector of the floppy disc would be overwritten, preventing the computer from booting. It was created by two Pakistani brothers and was intended to be used as a copy protection system. In 1988, the age of catastrophic viruses began. Most viruses were basically joked with humorous names and messages till then. In 1988, “The Morris” was the first virus that propagated widely.
Types of computer virus
- Boot sector virus: This virus infects the boot sector of the computer and runs every time the computer boots and before the operating system loads. Floppy discs and other bootable media become infected. They are sometimes referred to as memory viruses because they do not infect the file system.
- File Virus: Infects the system by appending itself to the end of a file. It changes the start of a program such that the control jumps to its code.
- Email-Virus: They are comprised of malicious code that is propagated through email messages and can be activated when a user clicks on a link in an email message, opens an email attachment, or interacts in any manner with the infected email message.
- Polymorphic Virus: Poly means many and morphic means forms. So this virus changes its form every time. A virus signature is a pattern that can be used to assess whether a virus exists or not (a series of bytes that make up virus code). This virus changes itself every time when it is installed so that it can avoid detection by antivirus software. Here, only the signature of this virus is updated, the functionality remains the same.
- Macro Virus: These viruses are activated when a program capable of performing a macro is executed. Macro viruses, for example, can be found in spreadsheet files.
- Multipartite Virus: This virus has the power to infect a computer’s boot sector, memory, and files, among other areas. This complicates its detection and containment.
- Encrypted Virus: To avoid detection by antivirus software, this type of virus is encrypted. There’s also a decryption algorithm included. As a result, before running, the virus decrypts.
- Stealth Virus: This virus is difficult to detect because it modifies the code used to detect it. As a result, virus detection is extremely difficult.
- Resident Virus: A virus that saves itself in the computer’s memory before infecting additional files and programs after the original software stops working. Because it is hidden in the computer memory and difficult to remove, this virus can easily infect other files.
- Direct action Virus : If a virus is tied to an executable file and when the file is opened or run, that virus gets installed/ spread, it is known as “direct action”. This virus does not delete any files or lay impact on the speed of the system; it just renders your files inaccessible.
- Browser Hijacker Virus: This virus attacks and can adjust the computer browser’s settings. it can also force your browser to malicious sites.
What does a computer virus do?
A virus can harm or destroy data, slow down system resources, and log keystrokes, among other things. A virus has the ability to have unexpected or harmful outcomes during this procedure, such as destroying system software by corrupting data. Some computer viruses are designed to damage your computer by destroying files, corrupting applications, or reformatting the hard drive. Even less dangerous computer infections can have a substantial impact on your system’s performance, eating up RAM and triggering frequent crashes. Other viruses may just clone themselves or flood a network with traffic, rendering all internet activity difficult.
How a computer gets a virus?
Through the following activities you may get your device infected by the virus :
- Sharing the data like music, files, and images with each other.
- If you open a spam email or an attachment in an email that is sent by an unknown person.
- Downloading the free games, toolbars, media players, etc.
- Visiting a malicious website.
- Installing pirated software(s) etc.
Symptoms of a computer virus?
If your system is infected by the virus, the following symptoms may be seen :
- Opening of Pop-up window frequently: Pop-ups may entice you to visit odd locations. They will take you to a page to download any antivirus (which is actually not an antivirus), or other harmful software.
- Slowing down of system without any reason.
- Updated homepage: For example, the homepage is replaced by a website and you would not be able to undo that replacement.
- Identifying that your files are corrupted.
- Change in the name of your hard drive & also change in its volume.
- Change in amount of free memory available.
- Not able to find your files or programs.
- Unknown change in the password that does not let you login.
- A virus may damage your hard drive and our device may freeze or crash as a result of this.
How to remove computer viruses?
To get rid of a computer infection, you have two options:
- Do-it-yourself manual approach
- Seek the assistance of a reliable antivirus product.
In the manual approach, online search is usually the first step in this approach. You can be requested to complete a huge list of tasks. To finish the procedure, you’ll need time and maybe some experience.
The simpler approach is to install antivirus. Antivirus software is a program that searches for, detects, prevents, and removes software infections that can harm your computer. Antivirus can also detect and remove other dangerous software such as worms, adware, and other dangers. This software is intended to be used as a preventative measure against cyber dangers, keeping them from entering your computer and causing problems. Antivirus is available for free as well. Anti-virus software that is available for free only provides limited virus protection, whereas premium anti-virus software offers more effective security. For example Avast, Kaspersky, etc.
Sample Question
Question 1. How can you protect your computer system from viruses?
We can use antivirus software to keep your computer safe from viruses. Antivirus software works by comparing the files and programs on your computer to a database of known malware types. It will also monitor computers for the presence of new or undiscovered malware threats, as hackers are constantly generating and propagating new viruses.
Question 2. Make a list of frequent computer virus infection sources.
The sources via which you can infect your system with viruses are : 1. Downloading programs/software from the internet. 2. Emails 3. External devices like pen-drives 4. Using an unknown CD to Boot data 5. Bluetooth/ infrared
Question 3. Why is it a good idea to back up data on a regular basis?
Files that have been damaged can be restored by backup.
Question 4. How do computer viruses spread?
Computer viruses are typically propagated by email, file sharing, or CDs or by downloading file(s) from unauthenticated sources.
Question 5. What is a computer virus?
It is a harmful software application that is installed without the user’s knowledge/ consent on their computer and then performs some malicious acts, is known as a virus. It attaches itself to another software, once infected the system, in such a way that the host program’s execution activates the virus’s actions simultaneously.
Please Login to comment...
- School Learning
Improve your Coding Skills with Practice
Start your coding journey now.

IMAGES
VIDEO
COMMENTS
A computer virus is a malicious piece of computer code designed to spread from device to device. A subset of malware, these self-copying threats are usually
Computer viruses typically attach to an executable host file, which results in their viral codes executing when a file is opened. The code then spreads from the
A computer virus is a type of malware that attaches to another program (like a document), which can replicate and spread after a person first runs it on their
Sometimes, they can even cause computers to stop working all together. Computer viruses are different from computer worms. A virus attaches itself to other
A virus spreads between systems after some type of human intervention. Viruses replicate by creating their own files on an infected system, attaching themselves
A computer virus is a type of computer program that, when executed, replicates itself by modifying other computer programs and inserting its own code into
A computer virus we can say is a small software program or a piece of code that is loaded on your computer system while using internet can spread from one
A computer virus is a type of malicious software, or malware, that infects computers and corrupts their data and software. They are always the
A computer virus is a kind of malicious computer program, which when executed, replicates itself and inserts its own code. When the replication is done
A computer virus is a sort of malware that attaches itself to another program and can replicate and propagate once it has been installed on