Computer security
Computer security, also called cybersecurity, is the protection of computer systems and the information they hold from access, use, disclosure, disruption, change, or destruction without permission.[1][2] Its three main goals are confidentiality (only allowed people can read the data), integrity (the data is not changed improperly), and availability (the system works when it is needed).[2]
The field is a branch of computer science in which defenders design systems that resist attack, find and fix flaws, and detect and recover from break-ins. Because it is very hard to prove that a large system has no flaws, security is usually treated as managing risk rather than reaching perfection.[3][4]
Goals of security
US federal law defines information security as protecting information and systems from unauthorized access, use, disclosure, disruption, modification, or destruction in order to provide three properties.[2] Together they are often called the CIA triad.
| Goal | Meaning in US law | Example of a failure |
|---|---|---|
| Confidentiality | Keeping authorized limits on access and disclosure, including protecting personal privacy and information owned by a business | An outsider reads private records |
| Integrity | Guarding against improper change or destruction of information, including making sure information is authentic | An attacker alters a stored record |
| Availability | Making sure people can get to and use information in a timely and reliable way | A flood of traffic takes a website offline |
These goals apply to all of an organization's assets. The National Institute of Standards and Technology (NIST), the US standards agency, lists these assets as data, hardware, software, systems, facilities, services, and people.[4]
This three-way split is older than the law. In 1975 Jerome Saltzer and Michael Schroeder, following earlier specialists such as James Anderson, sorted security violations into unauthorized release of information, unauthorized change of information, and unauthorized denial of use.[3] They also warned that the intruder may be an otherwise legitimate user of the system.[3]
Security is not the same as privacy. Saltzer and Schroeder defined the two terms as follows.[3]
| Term | Who or what it concerns | Definition |
|---|---|---|
| Privacy | A person or organization | The ability to decide whether, when, and to whom their information is released |
| Security | A computer and its information | The techniques that control who may use or change the computer and the information in it |
Threats, vulnerabilities, and risk
Security work uses a few core terms for what can go wrong. US government standards define them as follows.
- A vulnerability is a weakness in a system, its security procedures, its internal controls, or its implementation that a threat source could exploit or trigger.[5] A threat source is whatever could cause the harm, such as an attacker or an accident.
- A threat is any circumstance or event that could harm an organization, its assets, or people through unauthorized access, destruction, disclosure, or change of information, or through denial of service.[6]
- The attack surface is the set of points on a system's boundary where an attacker can try to enter, cause an effect, or pull out data.[7]
- Risk is a measure of how much an organization is threatened by a possible event. It is typically a function of the harm the event would cause (impact) and how likely the event is (likelihood).[8]
Here likelihood is the chance that the harmful event happens, and impact is the harm it would cause. NIST says risk is "typically" such a function and does not fix one formula.[8]
Put together, a cyberattack happens when a threat source exploits a vulnerability through some point on the attack surface. Removing entry points shrinks the attack surface and leaves attackers fewer places to try.
Common kinds of attack
Attacks fall into a few broad families. The table lists several common ones and the goal each mainly harms.
| Attack | How it works | Goal mainly harmed |
|---|---|---|
| Malware | Software or firmware (software built into a device) meant to carry out an unauthorized process; includes viruses, worms, Trojan horses, and spyware (software that secretly gathers information about a user)[9] | Any of the three |
| Ransomware | Malware that encrypts files so they and the systems that rely on them are unusable, then demands payment to decrypt them; attackers often also threaten to leak stolen data[10] | Availability, and confidentiality when data is leaked |
| Phishing | A fake email or website in which the attacker poses as a real business or trusted person to get sensitive data, such as bank account numbers[11] | Confidentiality |
| Social engineering | Tricking someone into revealing information, such as a password, that can be used to attack systems[12] | Confidentiality |
| Denial of service | Blocking authorized access to resources or delaying time-critical operations[13] | Availability |
| Zero-day attack | An attack that uses a previously unknown hardware, firmware, or software vulnerability[14] | Depends on the flaw |
Viruses, worms, and Trojan horses
Three classic kinds of malware differ in how they spread and hide.
- A computer virus is a program that can "infect" other programs, so that each infected program can spread the infection further. Fred Cohen gave this definition in 1984, after showing a test virus to a security seminar in November 1983.[15]
- A computer worm does not need a host program. It can exist and spread on its own.[16]
- A Trojan horse is a program that appears to have a useful function but also has a hidden and possibly harmful one.[17] Ken Thompson used the term for a compiler (the program that turns source code into a runnable program) that he altered so that it built the Unix login program to accept a secret extra password.[18]
Exploiting software flaws
Many attacks take advantage of mistakes in code. Flaws in memory safety (bugs that let a program read or write parts of memory it should not) are the most common type of disclosed software vulnerability, according to a 2023 guide from US agencies including CISA, NSA, and FBI and partners in four other countries.[19]
Microsoft has reported that about 70 percent of the vulnerabilities it assigns a CVE (a common way of numbering known vulnerabilities) each year are memory safety issues.[20][21] Google reported that around 70 percent of serious security bugs in its Chromium project are memory safety problems.[20]
Failures without an attacker
Availability can also be lost by accident. In July 2024 a faulty software update from the security company CrowdStrike affected an estimated 8.5 million Windows devices, less than one percent of all Windows machines.[22] The effects were broad because many of the affected companies run critical services (see 2024 CrowdStrike-related IT outages).[22]
Defenses
Defenses take four main approaches, each covered in a subsection below.
- Check who is asking (authentication).
- Limit what each user can do (access control).
- Hide data from people who should not read it (cryptography).
- Stack several barriers so one failure is not fatal (layered defense).
Authentication
Authentication checks the identity of a person, or other outside agent, making a request to a system.[3] The ways to prove identity fall into three factors.[23]
- Something you know, such as a password or a personal identification number (PIN), which is a numeric password.
- Something you have, such as a security token.
- Something you are, such as a fingerprint. This is a biometric, a body feature used to identify someone.
Multi-factor authentication requires more than one distinct factor.[23]
Passwords alone have known weaknesses. In one study Saltzer and Schroeder reported, more than half of some 300 self-chosen passwords were short enough to guess by trying every option, or were based on the owner's name, phone number, birth date, or something similar.[3]
Stored passwords also need protection. Some systems store passwords only after passing them through a hard-to-invert transformation, an idea Saltzer and Schroeder credit to R. Needham, so a stolen password list does not directly reveal the passwords (see password hashing).[3]
Access control
Once a user is identified, access control decides what they may do. Granting a user access to some object is called authorization.[3]
A core rule is the principle of least privilege. Every program and user should run with the smallest set of privileges needed for the job, which limits the damage from accidents and errors.[3]
Saltzer and Schroeder described two basic ways to record who may use what.[3]
- List-oriented: a guard at each object holds an access-control list of authorized users, and each user carries an identifier that cannot be forged. Removing a name from the list blocks that user from then on.
- Ticket-oriented: each user holds tickets that cannot be forged, called capabilities, one for each object they may use. A capability works like a key to a lock, which makes it quick to check but hard to take back once copied (see capability-based security).
Most real systems use both, with lists at the human interface and capabilities in the hardware underneath.[3]
Cryptography
Cryptography protects data that attackers may intercept or steal. Encryption turns readable data (plaintext) into a form (ciphertext) that hides its meaning, and decryption turns it back.[24]
In conventional encryption, sender and receiver use the same secret key. That key must first reach the receiver over a secure channel.[25]
In 1976 Whitfield Diffie and Martin Hellman published "New Directions in Cryptography", which introduced public-key cryptography and digital signatures.[26] In their scheme a public key, which can be shared freely, is used for encryption, while a private key that need never leave the receiving device is used for decryption.[26]
Secure connections today combine the two kinds. Public-key cryptography is used to deliver a key, and shared-key (symmetric) cryptography then encrypts the rest of the communication.[26]
Layered defense
Defense in depth is a strategy that combines people, technology, and operations to set up barriers across many layers of an organization.[27] One standard states the aim directly: layer different technologies so that attacks missed by one are caught by another.[27]
Common layers include the following.
- Firewalls control the flow of network traffic between networks or computers that have different security needs.[28]
- Intrusion detection systems monitor network or system events and warn of attempts at unauthorized access.[29]
- Security updates, or patches, fix known flaws. Vendors keep releasing them, and customers must keep applying them.[19]
- Awareness training, data security, and platform security are among the protective outcomes in the NIST Cybersecurity Framework.[4]
Zero trust assumes attackers may already be inside. It is a set of ideas for making accurate, least-privilege access decisions on every request, while treating the network as compromised.[30]
Design principles
Saltzer and Schroeder's principles
In 1975 Saltzer and Schroeder listed eight principles for designing protection mechanisms. They meant them as warnings rather than absolute rules, so breaking one is a sign that a design needs review.[3]
| Principle | Meaning |
|---|---|
| Economy of mechanism | Keep the design as simple and small as possible, so it can be inspected line by line |
| Fail-safe defaults | Base access on permission, not exclusion, so the default is no access |
| Complete mediation | Check every access to every object for authority |
| Open design | Do not rely on a secret design; rely on keys or passwords, which are easier to protect |
| Separation of privilege | Where possible, require two keys, so no single accident or breach of trust is enough |
| Least privilege | Give every program and user only the privileges the job needs |
| Least common mechanism | Keep to a minimum the mechanisms shared by many users and relied on by all |
| Psychological acceptability | Make the interface easy, so users apply protection correctly by habit |
The authors noted that open design was not universally accepted. Some people used to military security argued that a secret design raises the cost and risk of an attack.[3]
Reference monitor and trusted computing base
A 1972 planning study by James P. Anderson for the US Air Force introduced the reference monitor concept.[31][3] It is the idea that every reference by any program to any program, data, or device is checked against a list of allowed types of reference, based on the user or program.[31]
The US Department of Defense's Trusted Computer System Evaluation Criteria, known as the Orange Book, uses this idea. Its December 1985 edition, which replaced a 1983 version, sorts systems into four divisions, D, C, B, and A, with A reserved for the most complete security.[32]
The Orange Book calls the security-relevant parts of a system the Trusted Computing Base. It notes that in the strongest systems the reference monitor is strong enough that most other components can be completely untrusted.[32]
Formal models
Formal security models state exactly what a system must enforce. For military secrecy levels, the Bell-LaPadula model of 1973 treats an attempt to write into an object with too few compartment labels (markers for which secret categories data belongs to) as an error that stops the program.[3] This keeps a borrowed program from copying secret data into a less protected file, which would amount to removing the data's secret classification without human review.[3]
Security in organizations
NIST Cybersecurity Framework
The NIST Cybersecurity Framework (CSF) gives organizations a shared set of outcomes for managing cybersecurity risk. Version 2.0, published by the National Institute of Standards and Technology on February 26, 2024, is meant for any organization regardless of size, sector, or maturity, and does not prescribe how to reach its outcomes.[4] Earlier versions were used by many governments and organizations inside and outside the United States.[4]
Version 2.0 added a sixth function, Govern, to the five of version 1.1.[4][33] The table gives NIST's summary of each.
| Function | Outcome |
|---|---|
| Govern | The organization's cybersecurity risk management strategy, expectations, and policy are set, communicated, and monitored |
| Identify | The organization's current cybersecurity risks are understood |
| Protect | Safeguards to manage the organization's cybersecurity risks are used |
| Detect | Possible attacks and compromises are found and analyzed |
| Respond | Actions are taken on a detected cybersecurity incident |
| Recover | Assets and operations affected by an incident are restored |
Finding and sharing vulnerabilities
Organizations find flaws by attacking their own systems. By 1975, Saltzer and Schroeder reported, penetration exercises on a large number of general-purpose systems had all shown that users could write programs to get unauthorized access.[3] This practice is called penetration testing, part of the wider work of security testing.
Known flaws are shared through public catalogs and notices. Two long-running examples follow.
- The CVE list was proposed by David E. Mann and Steven M. Christey of MITRE in January 1999. It opened to the public in September 1999 with 321 records.[21]
- The CERT Coordination Center, set up at DARPA's request after the 1988 Morris worm, publishes Vulnerability Notes. Each note gives a summary, technical details, fixes, and a list of affected vendors.[34]
Economics of security
The Gordon-Loeb model, published in 2002 by Lawrence A. Gordon and Martin Loeb, asks how much a firm should spend to protect a set of information. It weighs how vulnerable the information is against the loss a breach would cause.[35] The model uses these quantities.[36]
- is the vulnerability: the probability of a breach with no added security, between 0 and 1.
- is the loss if a breach succeeds, so is the expected loss with no added security.
- is the amount spent on security, and is the probability of a breach after that spending.
The firm picks to make its expected net benefit from investment in information security (ENBIS) as large as possible:[36]
For the two classes of breach-probability function in the original paper, the best spending level satisfies
where is the mathematical constant used as the base of the natural logarithm.[36] In plain terms, spending more than about 37 percent of the expected loss from a breach is generally not worth the cost.[37]
The model also finds that a firm may do better protecting information of moderate vulnerability. Extremely vulnerable information can be very expensive to protect.[35]
History
Computer security grew out of military concern about shared computers, then spread to the internet and to every kind of organization. Key events include the following.
- 1967: The Advanced Research Projects Agency (ARPA) organized a task force, working under the Defense Science Board, to recommend safeguards for classified information on multi-user, resource-sharing computers.[38]
- 1970: The report of the task force, which Willis Ware of RAND chaired, was published in February 1970; Ware wrote its final version. Known as the Ware report, it was classified Confidential until October 10, 1975.[38]
- 1972: Anderson's planning study for the US Air Force introduced the reference monitor concept.[31]
- 1975: Saltzer and Schroeder published their eight design principles.[3]
- 1976: Diffie and Hellman introduced public-key cryptography and digital signatures.[26]
- 1983: Cohen ran his first virus experiments. In each of five test attacks, the virus gained all system rights in under an hour.[15]
- 1984: Thompson's "Reflections on Trusting Trust" showed that a tampered compiler could plant a Trojan horse that leaves no trace in any source code.[18]
- 1985: The Orange Book, first issued in August 1983, was reissued as DoD 5200.28-STD in December 1985.[32]
- 1986: The US Computer Fraud and Abuse Act outlawed unauthorized access to protected computers.[16]
- 1988: The Morris worm, released on November 2, hit an estimated 6,000 of the roughly 60,000 computers then on the internet within 24 hours.[16] Its author, Robert Tappan Morris, became the first person convicted under the 1986 law, and DARPA asked the Software Engineering Institute to set up CERT/CC.[16][34]
- 1999: The CVE list was launched, and Alma Whitten and J. D. Tygar published "Why Johnny Can't Encrypt".[21][39]
- 2024: NIST published version 2.0 of the Cybersecurity Framework.[4]
Open problems
Proving a system is secure
Saltzer and Schroeder pointed out that security is a negative requirement. To show that all unauthorized use is prevented, one must show that every possible threat has been anticipated.[3] They wrote that no complete method then existed for building large general-purpose systems without flaws.[3]
Trusting tools and suppliers
Thompson's compiler showed that reading source code is not enough. It planted a backdoor (a hidden way into a system), and once the tampered compiler was installed, the hidden code could be removed from the source and the compiler would still put it back, leaving no trace in any source file.[18] Later writers describe his lecture as an early treatment of supply chain security, the problem now seen in supply chain attacks.[40]
Usable security
People make mistakes with security tools. In a 1999 study, Whitten and Tygar gave 12 experienced email users 90 minutes to sign and encrypt a message with PGP 5.0 (Pretty Good Privacy), an email encryption program. Only one third succeeded, and one quarter accidentally sent the secret in an email they thought was encrypted.[39]
Their paper, Why Johnny Can't Encrypt, argued that user errors cause or contribute to most computer security failures.[39] Designing security that ordinary people can use correctly is the subject of usable security.
Unsafe programming languages
Memory-safe programming languages can eliminate memory safety vulnerabilities.[19] In 2023 US agencies and partners in Australia, Canada, the United Kingdom, and New Zealand urged software makers to publish roadmaps showing how they will remove such flaws from their products.[19] Moving existing code to new languages has initial costs, which the agencies argue would be partly repaid by safer products over time.[19]
Subfields
Computer security splits into many specialties. Some are defined by what they protect, and others by the kind of work done.
- By what is protected: network security, application security, operating system security, hardware security, cloud computing security, mobile security, industrial control system security, medical device cybersecurity, and artificial intelligence (AI) security.
- By activity: identity and access management, security operations, digital forensics, malware analysis, and reverse engineering.
References
- cybersecurity (Glossary), NIST Computer Security Resource Center, citing CNSSI 4009-2022.
- information security (Glossary), NIST Computer Security Resource Center, citing 44 U.S.C. 3542.
- The Protection of Information in Computer Systems, J. H. Saltzer and M. D. Schroeder, Proceedings of the IEEE, 1975.
- The NIST Cybersecurity Framework (CSF) 2.0, National Institute of Standards and Technology, 2024.
- vulnerability (Glossary), NIST Computer Security Resource Center.
- threat (Glossary), NIST Computer Security Resource Center.
- attack surface (Glossary), NIST Computer Security Resource Center.
- risk (Glossary), NIST Computer Security Resource Center.
- malware (Glossary), NIST Computer Security Resource Center.
- Ransomware 101, Cybersecurity and Infrastructure Security Agency.
- phishing (Glossary), NIST Computer Security Resource Center.
- social engineering (Glossary), NIST Computer Security Resource Center.
- denial of service (Glossary), NIST Computer Security Resource Center.
- zero-day attack (Glossary), NIST Computer Security Resource Center.
- Computer Viruses: Theory and Experiments, Fred Cohen, 1984.
- The Morris Worm, Federal Bureau of Investigation, 2018.
- Trojan horse (Glossary), NIST Computer Security Resource Center, citing NIST SP 800-12 Rev. 1.
- Reflections on Trusting Trust, Ken Thompson, Communications of the ACM, 1984.
- The Case for Memory Safe Roadmaps, CISA, NSA, FBI, and international partners, 2023.
- The Urgent Need for Memory Safety in Software Products, Cybersecurity and Infrastructure Security Agency.
- CVE History, CVE Program.
- Helping our customers through the CrowdStrike outage, Microsoft, 2024.
- multi-factor authentication (Glossary), NIST Computer Security Resource Center.
- encryption (Glossary), NIST Computer Security Resource Center.
- New Directions in Cryptography, W. Diffie and M. E. Hellman, IEEE Transactions on Information Theory, 1976.
- Cryptography Pioneers Receive ACM A.M. Turing Award, Association for Computing Machinery, 2016.
- defense-in-depth (Glossary), NIST Computer Security Resource Center.
- firewall (Glossary), NIST Computer Security Resource Center.
- intrusion detection system (Glossary), NIST Computer Security Resource Center.
- Zero Trust (Glossary), NIST Computer Security Resource Center, citing NIST SP 800-207.
- Computer Security Technology Planning Study, Volume I, James P. Anderson, US Air Force Electronic Systems Division, 1972.
- Trusted Computer System Evaluation Criteria (DoD 5200.28-STD), US Department of Defense, 1985.
- The CSF 1.1 Five Functions, National Institute of Standards and Technology.
- Fostering Growth in Professional Cyber Incident Management, Software Engineering Institute, Carnegie Mellon University.
- The Economics of Information Security Investment, L. A. Gordon and M. P. Loeb, ACM Transactions on Information and System Security, 2002.
- Optimal Cybersecurity Investment of an Interconnected Risk-Neutral Firm, Tallinn University of Technology (thesis).
- Gordon-Loeb Model for Investing in Information Security, Robert H. Smith School of Business, University of Maryland.
- Security Controls for Computer Systems: Report of Defense Science Board Task Force on Computer Security, RAND Corporation, 1970.
- Why Johnny Can't Encrypt: A Usability Evaluation of PGP 5.0, A. Whitten and J. D. Tygar, 8th USENIX Security Symposium, 1999.
- Running the "Reflections on Trusting Trust" Compiler, Russ Cox, 2023.
