Malware poses serious problems to individuals and businesses on the Internet.[6][7] According toSymantec's 2018 Internet Security Threat Report (ISTR), malware variants number has increased to 669,947,865 in 2017, which is twice as many malware variants as in 2016.[8]Cybercrime, which includes malware attacks as well as other crimes committed by computer, was predicted to cost the world economy US$6 trillion in 2021, and is increasing at a rate of 15% per year.[9] Since 2021, malware has been designed to target computer systems that run critical infrastructure such as theelectricity distribution network.[10]
The notion of a self-reproducing computer program can be traced back to initial theories about the operation of complex automata.[11]John von Neumann showed that in theory a program could reproduce itself. This constituted a plausibility result incomputability theory.Fred Cohen experimented with computer viruses and confirmed Neumann's postulate and investigated other properties of malware such as detectability and self-obfuscation using rudimentary encryption. His 1987 doctoral dissertation was on the subject of computer viruses.[12] The combination of cryptographic technology as part of the payload of the virus, exploiting it for attack purposes was initialized and investigated from the mid-1990s, and includes initial ransomware and evasion ideas.[13]
BeforeInternet access became widespread, viruses spread on personal computers by infecting executable programs orboot sectors offloppy disks. By inserting a copy of itself into themachine code instructions in these programs orboot sectors, a virus causes itself to be run whenever the program is run or the disk is booted. Early computer viruses were written for theApple II andMac, but they became more widespread with the dominance of theIBM PC andMS-DOS. The first IBM PC virus in the wild was aboot sector virus dubbed(c)Brain, created in 1986 by the Farooq Alvi brothers in Pakistan.[14] Malware distributors would trick the user into booting or running from an infected device or medium. For example, a virus could make an infected computer add autorunnable code to anyUSB stick plugged into it. Anyone who then attached the stick to another computer set to autorun from USB would in turn become infected, and also pass on the infection in the same way.[15]
Older email software would automatically openHTML email containing potentially maliciousJavaScript code. Users may also execute disguised malicious email attachments. The2018 Data Breach Investigations Report byVerizon, cited byCSO Online, states that emails are the primary method of malware delivery, accounting for 96% of malware delivery around the world.[16][17]
The first worms,network-borne infectious programs, originated not on personal computers, but on multitaskingUnix systems. The first well-known worm was theMorris worm of 1988, which infectedSunOS andVAXBSD systems. Unlike a virus, this worm did not insert itself into other programs. Instead, it exploited security holes (vulnerabilities) in networkserver programs and started itself running as a separateprocess.[18] This same behavior is used by today's worms as well.[19]
With the rise of theMicrosoft Windows platform in the 1990s, and the flexiblemacros of its applications, it became possible to write infectious code in the macro language ofMicrosoft Word and similar programs. Thesemacro viruses infect documents and templates rather than applications (executables), but rely on the fact that macros in a Word document are a form ofexecutable code.[20]
Many early infectious programs, including theMorris Worm, the first internet worm, were written as experiments or pranks.[21] Today, malware is used by bothblack hat hackers and governments to steal personal, financial, or business information.[22][23] Today, any device that plugs into a USB port – even lights, fans, speakers, toys, or peripherals such as adigital microscope – can be used to spread malware. Devices can be infected during manufacturing or supply if quality control is inadequate.[15]
Since the rise of widespreadbroadbandInternet access, malicious software has more frequently been designed for profit. Since 2003, the majority of widespreadviruses and worms have been designed to take control of users' computers for illicit purposes.[24] Infected "zombie computers" can be used to sendemail spam, to host contraband data such aschild pornography,[25] or to engage indistributed denial-of-serviceattacks as a form ofextortion.[26] Malware is used broadly against government or corporate websites to gather sensitive information,[27] or to disrupt their operation in general. Further, malware can be used against individuals to gain information such as personal identification numbers or details, bank or credit card numbers, and passwords.[28][29]
Beyond its use in criminal enterprises, malware has also been deployed as a tool for sabotage, often driven by political objectives. A notable example isStuxnet, which was engineered to interfere with specific industrial control systems.[citation needed]
In other cases, politically motivated malware attacks have targeted entire networks, causing widespread disruption. These incidents have included the mass deletion of files and damage tomaster boot records—actions sometimes described as "computer killing." High-profile examples include the attack onSony Pictures Entertainment in November 2014, which involved malware known asShamoon (also referred to as W32.Disttrack), and a similar strike against Saudi Aramco in August 2012.[30][31]
In 2024, a botnet owner was arrested for engaging in apay-per-install operation for financial gain.[32]
Malware can be classified in numerous ways, and certain malicious programs may fall into two or more categories simultaneously.[1] Broadly, software can categorised into three types:[33] (i) goodware; (ii) grayware and (iii) malware.
Classification of potentially malicious software Data sourced from: Molina-Coronado et al. (2023)[33]
A computer virus is software usually hidden within another seemingly harmless program that can produce copies of itself and insert them into other programs or files, and that usually performs a harmful action (such as destroying data).[34] They have been likened tobiological viruses.[3] An example of this is a portable execution infection, a technique, usually used to spread malware, that inserts extra data orexecutable code intoPE files.[35] A computer virus is software that embeds itself in some otherexecutable software (including the operating system itself) on the target system without the user's knowledge and consent and when it is run, the virus is spread to other executable files.
Aworm is a stand-alone malware software thatactively transmits itself over anetwork to infect other computers and can copy itself without infecting files. These definitions lead to the observation that a virus requires the user to run an infected software or operating system for the virus to spread, whereas a worm spreads itself.[36]
Once malicious software is installed on a system, it is essential that it stays concealed, to avoid detection. Software packages known asrootkits allow this concealment, by modifying the host's operating system so that the malware is hidden from the user. Rootkits can prevent a harmfulprocess from being visible in the system's list ofprocesses, or keep its files from being read.[37]
Some types of harmful software contain routines to evade identification or removal attempts, not merely to hide themselves. An early example of this behavior is recorded in theJargon File tale of a pair of programs infesting a XeroxCP-V time sharing system:
Each ghost-job would detect the fact that the other had been killed, and would start a new copy of the recently stopped program within a few milliseconds. The only way to kill both ghosts was to kill them simultaneously (very difficult) or to deliberately crash the system.[38]
Abackdoor is a broad term for a computer program that allows an attacker persistent unauthorised remote access to a victim's machine often without their knowledge.[39] The attacker typically uses another attack (such as atrojan,worm orvirus) to bypass authentication mechanisms usually over an unsecured network such as the Internet to install the backdoor application. A backdoor can also be a side effect of asoftware bug in legitimate software that is exploited by an attacker to gain access to a victim's computer or network.
The idea has often been suggested that computer manufacturers preinstall backdoors on their systems to provide technical support for customers, but this has never been reliably verified. It was reported in 2014 that US government agencies had been diverting computers purchased by those considered "targets" to secret workshops where software or hardware permitting remote access by the agency was installed, considered to be among the most productive operations to obtain access to networks around the world.[40] Backdoors may be installed by Trojan horses,worms,implants, or other methods.[41][42]
A Trojan horse misrepresents itself to masquerade as a regular, benign program or utility in order to persuade a victim to install it. A Trojan horse usually carries a hidden destructive function that is activated when the application is started. The term is derived from theAncient Greek story of theTrojan horse used to invade the city ofTroy by stealth.[43][44]
Trojan horses are generally spread by some form ofsocial engineering, for example, where a user is duped into executing an email attachment disguised to be unsuspicious, (e.g., a routine form to be filled in), or bydrive-by download. Although their payload can be anything, many modern forms act as a backdoor, contacting a controller (phoning home) which can then have unauthorized access to the affected computer, potentially installing additional software such as a keylogger to steal confidential information, cryptomining software or adware to generate revenue to the operator of the trojan.[45] While Trojan horses and backdoors are not easily detectable by themselves, computers may appear to run slower, emit more heat or fan noise due to heavy processor or network usage, as may occur when cryptomining software is installed. Cryptominers may limit resource usage or only run during idle times in an attempt to evade detection.
Unlike computer viruses and worms, Trojan horses generally do not attempt to inject themselves into other files or otherwise propagate themselves.[46] Modern Trojans are often disguised within legitimate-looking applications, making them particularly effective at bypassing basic user awareness and simple antivirus measures.
In spring 2017, Mac users were hit by the new version of Proton Remote Access Trojan (RAT)[47] trained to extract password data from various sources, such as browser auto-fill data, the Mac-OS keychain, and password vaults.[48]
Droppers are a sub-type of Trojans that solely aim to deliver malware upon the system that they infect with the desire to subvert detection through stealth and a light payload.[49] It is important not to confuse a dropper with a loader or stager. A loader or stager will merely load an extension of the malware (for example a collection of malicious functions through reflective dynamic link library injection) into memory. The purpose is to keep the initial stage light and undetectable. A dropper merely downloads further malware to the system.
Ransomware prevents a user from accessing their files until a ransom is paid. There are two variations of ransomware, being crypto ransomware and locker ransomware.[50] Locker ransomware just locks down a computer system without encrypting its contents, whereas crypto ransomware locks down a system and encrypts its contents. For example, programs such asCryptoLockerencrypt files securely, and only decrypt them on payment of a substantial sum of money.[51]
Lock-screens, or screen lockers is a type of "cyber police" ransomware that blocks screens on Windows or Android devices with a false accusation in harvesting illegal content, trying to scare the victims into paying up a fee.[52]Jisut and SLocker impact Android devices more than other lock-screens, with Jisut making up nearly 60 percent of all Android ransomware detections.[53]
Encryption-based ransomware, like the name suggests, is a type of ransomware that encrypts all files on an infected machine. These types of malware then display apop-up ad informing the user that their files have been encrypted and that they must pay (usually in Bitcoin) to recover them. Some examples of encryption-based ransomware areCryptoLocker andWannaCry.[54]
According to Microsoft's Digital Crimes Unit in May 2025,Lumma Stealer ("Lumma"), which steals passwords, credit cards, bank accounts, and cryptocurrency wallets, is the favored info-stealing malware used by hundreds of cyber threat actors and enables criminals to empty bank accounts, hold schools for ransom, and disrupt critical services.[55]
Some malware is used to generate money byclick fraud, making it appear that the computer user has clicked an advertising link on a site, generating a payment from the advertiser. It was estimated in 2012 that about 60 to 70% of all active malware used some kind of click fraud, and 22% of all ad-clicks were fraudulent.[56]
Grayware is any unwanted application or file that can worsen the performance of computers and may cause security risks but which there is insufficient consensus or data to classify them as malware.[33] Types of grayware typically includespyware,adware,fraudulent dialers, joke programs ("jokeware") andremote access tools.[39] For example, at one point,Sony BMG compact discssilently installed a rootkit on purchasers' computers with the intention of preventing illicit copying.[57]
Potentially unwanted programs (PUPs) are applications that would be considered unwanted despite often being intentionally downloaded by the user.[58] PUPs include spyware, adware, and fraudulent dialers.
Many security products classify unauthorisedkey generators as PUPs, although they frequently carry true malware in addition to their ostensible purpose.[59] In fact, Kammerstetter et al. (2012)[59] estimated that as much as 55% of key generators could contain malware and that about 36% malicious key generators were not detected by antivirus software.
Programs designed to monitor users' web browsing, displayunsolicited advertisements, or redirectaffiliate marketing revenues are calledspyware. Spyware programs do not spread like viruses; instead they are generally installed by exploiting security holes. They can also be hidden and packaged together with unrelated user-installed software.[61] TheSony BMG rootkit was intended to prevent illicit copying; but also reported on users' listening habits, and unintentionally created extra security vulnerabilities.[57]
Antivirus software typically uses two techniques to detect malware: (i) static analysis and (ii) dynamic/heuristic analysis.[62] Static analysis involves studying the software code of a potentially malicious program and producing a signature of that program. This information is then used to compare scanned files by an antivirus program. Because this approach is not useful for malware that has not yet been studied, antivirus software can use dynamic analysis to monitor how the program runs on a computer and block it if it performs unexpected activity.
The aim of any malware is to conceal itself from detection by users or antivirus software.[1] Detecting potential malware is difficult for two reasons. The first is that it is difficult to determine if software is malicious.[33] The second is that malware uses technical measures to make it more difficult to detect it.[62] An estimated 33% of malware is not detected by antivirus software.[59]
The most commonly employed anti-detection technique involves encrypting the malware payload in order to prevent antivirus software from recognizing the signature.[33] Tools such as crypters come with an encrypted blob of malicious code and a decryption stub. The stub decrypts the blob and loads it into memory. Because antivirus does not typically scan memory and only scans files on the drive, this allows the malware to evade detection. Advanced malware has the ability to transform itself into different variations, making it less likely to be detected due to the differences in its signatures. This is known as polymorphic malware. Other common techniques used to evade detection include, from common to uncommon:[63] (1) evasion of analysis and detection byfingerprinting the environment when executed;[64] (2) confusing automated tools' detection methods. This allows malware to avoid detection by technologies such as signature-based antivirus software by changing the server used by the malware;[63] (3) timing-based evasion. This is when malware runs at certain times or following certain actions taken by the user, so it executes during certain vulnerable periods, such as during the boot process, while remaining dormant the rest of the time; (4)obfuscating internal data so that automated tools do not detect the malware;[65] (v) information hiding techniques, namelystegomalware;[66] and (5) fileless malware which runs within memory instead of using files and utilizes existing system tools to carry out malicious acts. The use of existing binaries to carry out malicious activities is a technique known as LotL, or Living off the Land.[67] This reduces the amount of forensic artifacts available to analyze. Recently these types of attacks have become more frequent with a 432% increase in 2017 and makeup 35% of the attacks in 2018. Such attacks are not easy to perform but are becoming more prevalent with the help of exploit-kits.[68][69]
Avulnerability is a weakness,flaw or software bug in anapplication, a complete computer, anoperating system, or acomputer network that is exploited by malware to bypass defences orgain privileges it requires to run. For example,TestDisk 6.4 or earlier contained a vulnerability that allowed attackers to inject code into Windows.[70] Malware can exploit security defects (security bugs orvulnerabilities) in the operating system, applications (such as browsers, e.g. older versions of Microsoft Internet Explorer supported by Windows XP[71]), or in vulnerable versions of browser plugins such asAdobe Flash Player,Adobe Acrobat or Reader, orJava SE.[72][73] For example, a common method is exploitation of abuffer overrun vulnerability, where software designed to store data in a specified region of memory does not prevent more data than the buffer can accommodate from being supplied. Malware may provide data that overflows the buffer, with maliciousexecutable code or data after the end; when this payload is accessed it does what the attacker, not the legitimate software, determines.
Malware can exploit recently discovered vulnerabilities before developers have had time to release a suitablepatch.[6] Even when new patches addressing the vulnerability have been released, they may not necessarily be installed immediately, allowing malware to take advantage of systems lacking patches. Sometimes even applying patches or installing new versions does not automatically uninstall the old versions.
There are several ways the users can stay informed and protected from security vulnerabilities in software.Software providers often announce updates that address security issues.[74]Common vulnerabilities are assigned unique identifiers (CVE IDs) and listed in public databases like theNational Vulnerability Database.Tools like Secunia PSI,[75] free for personal use, can scan a computer for outdated software with known vulnerabilities and attempt to update them.Firewalls andintrusion prevention systems can monitor the network traffic for suspicious activity that might indicate an attack.[76]
Users and programs can be assigned moreprivileges than they require, and malware can take advantage of this. For example, of 940 Android apps sampled, one third of them asked for more privileges than they required.[77] Apps targeting theAndroid platform can be a major source of malware infection but one solution is to use third-party software to detect apps that have been assigned excessive privileges.[78]
Some systems allow all users to make changes to the core components or settings of the system, which is consideredover-privileged access today. This was the standard operating procedure for early microcomputer and home computer systems, where there was no distinction between anadministrator orroot, and a regular user of the system. In some systems,non-administrator users are over-privileged by design, in the sense that they are allowed to modify internal structures of the system. In some environments, users are over-privileged because they have been inappropriately granted administrator or equivalent status.[79] This can be because users tend to demand more privileges than they need, so often end up being assigned unnecessary privileges.[80]
Some systems allow code executed by a user to access all rights of that user, which is known as over-privileged code. This was also standard operating procedure for early microcomputer and home computer systems. Malware, running as over-privileged code, can use this privilege to subvert the system. Almost all currently popular operating systems, and also manyscripting applications allow code too many privileges, usually in the sense that when a userexecutes code, the system allows that code all rights of that user.[citation needed]
A credential attack occurs when a user account with administrative privileges is cracked and that account is used to provide malware with appropriate privileges.[81] Typically, the attack succeeds because the weakest form of account security is used, which is typically a short password that can be cracked using adictionary orbrute force attack. Usingstrong passwords and enablingtwo-factor authentication can reduce this risk. With the latter enabled, even if an attacker can crack the password, they cannot use the account without also having the token possessed by the legitimate user of that account.
Homogeneity can be a vulnerability. For example, when all computers in anetwork run the same operating system, upon exploiting one, oneworm can exploit them all:[82] In particular,Microsoft Windows orMac OS X have such a large share of the market that an exploited vulnerability concentrating on either operating system could subvert a large number of systems. It is estimated that approximately 83% of malware infections between January and March 2020 were spread via systems runningWindows 10.[83] This risk is mitigated by segmenting the networks into differentsubnetworks and setting upfirewalls to block traffic between them.[84][85]
Anti-malware (sometimes also calledantivirus) programs block and remove some or all types of malware. For example,Microsoft Security Essentials (for Windows XP, Vista, and Windows 7) andWindows Defender (forWindows 8,10 and11) provide real-time protection. TheWindows Malicious Software Removal Tool removes malicious software from the system.[86] Additionally, several capable antivirus software programs are available for free download from the Internet (usually restricted to non-commercial use).[87] Tests found some free programs to be competitive with commercial ones.[87][88][89]
Typically, antivirus software can combat malware in the following ways:
Real-time protection: They can provide real time protection against the installation of malware software on a computer. This type of malware protection works the same way as that of antivirus protection in that the anti-malware software scans all incomingnetwork data for malware and blocks anythreats it comes across.
Removal: Anti-malware software programs can be used solely for detection and removal of malware software that has already been installed onto a computer. This type of anti-malware software scans the contents of the Windows registry, operating system files, and installed programs on a computer and will provide a list of any threats found, allowing the user to choose which files to delete or keep, or to compare this list to a list of known malware components, removing files that match.[90][failed verification]
Sandboxing:Sandboxing confines applications within a controlled environment, restricting their operations and isolating them from other applications on the host while limiting access tosystem resources.[91] Browser sandboxing isolates web processes to prevent malware and exploits, enhancing security.[92]
A specific component of anti-malware software, commonly referred to as an on-access or real-time scanner, hooks deep into the operating system's core orkernel and functions in a manner similar to how certain malware itself would attempt to operate, though with the user's informed permission for protecting the system. Any time the operating system accesses a file, the on-access scanner checks if the file is infected or not. Typically, when an infected file is found, execution is stopped and the file isquarantined to prevent further damage with the intention to prevent irreversible system damage. Most AVs allow users to override this behaviour. This can have a considerable performance impact on the operating system, though the degree of impact is dependent on how many pages it creates invirtual memory.[93]
Sandboxing is asecurity model that confines applications within a controlled environment, restricting their operations to authorized "safe" actions and isolating them from other applications on the host. It also limits access to system resources like memory and the file system to maintain isolation.[91]
Browser sandboxing is a security measure that isolates web browser processes and tabs from the operating system to prevent malicious code from exploiting vulnerabilities.It helps protect against malware,zero-day exploits, and unintentional data leaks by trapping potentially harmful code within the sandbox.It involves creating separate processes, limiting access to system resources, runningweb content in isolated processes, monitoring system calls, and memory constraints.Inter-process communication (IPC) is used forsecure communication between processes.Escaping the sandbox involves targeting vulnerabilities in the sandbox mechanism or the operating system's sandboxing features.[92][94]
While sandboxing is not foolproof, it significantly reduces theattack surface of common threats.Keeping browsers and operating systems updated is crucial to mitigate vulnerabilities.[92][94]
Website vulnerability scans check the website, detect malware, may note outdated software, and may report known security issues, in order to reduce the risk of the site being compromised.
Structuring a network as a set of smaller networks, and limiting the flow of traffic between them to that known to be legitimate, can hinder the ability of infectious malware to replicate itself across the wider network.Software-defined networking provides techniques to implement such controls.
As a last resort, computers can be protected from malware, and the risk of infected computers disseminating trusted information can be greatly reduced by imposing an"air gap" (i.e. completely disconnecting them from all other networks) and applying enhanced controls over the entry and exit of software and data from the outside world. However, malware can still cross the air gap in some situations, not least due to the need to introduce software into the air-gapped network and can damage the availability or integrity of assets thereon.Stuxnet is an example of malware that is introduced to the target environment via a USB drive, causing damage to processes supported on the environment without the need to exfiltrate data.
AirHopper,[95] BitWhisper,[96] GSMem[97] and Fansmitter[98] are four techniques introduced by researchers that can leak data from air-gapped computers using electromagnetic, thermal and acoustic emissions.
Utilizing bibliometric analysis, the study of malware research trends from 2005 to 2015, considering criteria such as impact journals, highly cited articles, research areas, number of publications, keyword frequency, institutions, and authors, revealed an annual growth rate of 34.1%.North America led in research output, followed byAsia andEurope.China andIndia were identified as emerging contributors.[99]
^John von Neumann, "Theory of Self-Reproducing Automata", Part 1: Transcripts of lectures given at the University of Illinois, December 1949, Editor: A. W. Burks, University of Illinois, USA, 1966.
^Fred Cohen, "Computer Viruses", PhD Thesis, University of Southern California, ASP Press, 1988.
^Avoine, Gildas; Pascal Junod; Philippe Oechslin (2007).Computer system security: basic concepts and solved exercises. EFPL Press. p. 20.ISBN978-1-4200-4620-5.The first PC virus is credited to two brothers, Basit Farooq Alvi and Amjad Farooq Alvi, from Pakistan
^Claburn, Thomas (26 October 2022)."Ukrainian indicted by US govt on cybercrime charges".theregister.com.Archived from the original on 26 October 2022. Retrieved27 October 2022.Those deploying Raccoon used phishing messages and other tricks to get the malware onto potentially millions of victims' computers worldwide. Once installed, the code provided access to login credentials and other data stored on the compromised system.
^Young, Adam; Yung, Moti (1997). "Deniable Password Snatching: On the Possibility of Evasive Electronic Espionage".Symp. on Security and Privacy. IEEE. pp. 224–235.ISBN0-8186-7828-3.
^Morales, Jose Andre; Al-Bataineh, Areej; Xu, Shouhuai; Sandhu, Ravi (2010)."Analyzing and Exploiting Network Behaviors of Malware". In Jajodia, Sushil; Zhou, Jianying (eds.).Security and Privacy in Communication Networks. Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering. Vol. 50. Berlin, Heidelberg: Springer. pp. 20–34.doi:10.1007/978-3-642-16161-2_2.ISBN978-3-642-16161-2.Archived from the original on 2 December 2021. Retrieved2 December 2021.
^Wagner, Neal; Şahin, Cem Ş.; Winterrose, Michael; Riordan, James; Pena, Jaime; Hanson, Diana; Streilein, William W. (December 2016). "Towards automated cyber decision support: A case study on network segmentation for security".2016 IEEE Symposium Series on Computational Intelligence (SSCI). pp. 1–10.doi:10.1109/SSCI.2016.7849908.ISBN978-1-5090-4240-1.S2CID9065830.
^Guri, Mordechai; Kedma, Gabi; Kachlon, Assaf; Elovici, Yuval (2014). "AirHopper: Bridging the air-gap between isolated networks and mobile phones using radio frequencies".2014 9th International Conference on Malicious and Unwanted Software: The Americas (MALWARE). IEEE. pp. 58–67.arXiv:1411.0237.doi:10.1109/MALWARE.2014.6999418.ISBN978-1-4799-7329-3.
^Guri, Mordechai; Monitz, Matan; Mirski, Yisroel; Elovici, Yuval (2015). "BitWhisper: Covert Signaling Channel between Air-Gapped Computers Using Thermal Manipulations".2015 IEEE 28th Computer Security Foundations Symposium. IEEE. pp. 276–289.arXiv:1503.07919.doi:10.1109/CSF.2015.26.ISBN978-1-4673-7538-2.