# Cyberattack

A cyberattack (or cyber attack) occurs when there is an unauthorized action against computer infrastructure that compromises the confidentiality, integrity, or availability of its content.
The rising dependence on increasingly complex and interconnected computer systems in most domains of life is the main factor that causes vulnerability to cyberattacks, since virtually all computer systems have bugs that can be exploited by attackers. Although it is impossible or impractical to create a perfectly secure system, there are many defense mechanisms that can make a system more difficult to attack, making information security a field of rapidly increasing importance in the world today.
Perpetrators of a cyberattack can be criminals, hacktivists, or states. They attempt to find weaknesses in a system, exploit them and create malware to carry out their goals, and deliver it to the targeted system. Once installed, the malware can have a variety of effects depending on its purpose. Detection of cyberattacks is often absent or delayed, especially when the malware attempts to spy on the system while remaining undiscovered. If it is discovered, the targeted organization may attempt to collect evidence about the attack, remove malware from its systems, and close the vulnerability that enabled the attack.
Cyberattacks can cause a variety of harms to targeted individuals, organizations, and governments, including significant financial losses and identity theft. They are usually illegal both as a method of crime and warfare, although correctly attributing the attack is difficult and perpetrators are rarely prosecuted.

## Definitions

A cyberattack can be defined as any attempt by an individual or organization "using one or more computers and computer systems to steal, expose, change, disable or eliminate information, or to breach computer information systems, computer networks, and computer infrastructures". Definitions differ as to the type of compromise required – for example, requiring the system to produce unexpected responses or cause injury or property damage. Some definitions exclude attacks carried out by non-state actors and others require the target to be a state. Keeping a system secure relies on maintaining the CIA triad: confidentiality (no unauthorized access), integrity (no unauthorized modification), and availability. Although availability is less important for some web-based services, it can be the most crucial aspect for industrial systems.

## Prevalence

In the first six months of 2017, two billion data records were stolen or impacted by cyber attacks, and ransomware payments reached US$2 billion, double that in 2016. In 2020, with the increase of remote work as an effect of the COVID-19 global pandemic, cybersecurity statistics reveal a huge increase in hacked and breached data. The worldwide information security market is forecast to reach $170.4 billion in 2022.

## Vulnerability

Over time, computer systems make up an increasing portion of daily life and interactions. While the increasing complexity and connectedness of the systems increases the efficiency, power, and convenience of computer technology, it also renders the systems more vulnerable to attack and worsens the consequences of an attack, should one occur.
Despite developers' goal of delivering a product that works entirely as intended, virtually all software and hardware contains bugs. If a bug creates a security risk, it is called a vulnerability. Patches are often released to fix identified vulnerabilities, but those that remain unknown (zero days) as well as those that have not been patched are still liable for exploitation. The software vendor is not legally liable for the cost if a vulnerability is used in an attack, which creates an incentive to make cheaper but less secure software. Vulnerabilities vary in their ability to be exploited by malicious actors. The most valuable allow the attacker to inject and run their own code (called malware), without the user being aware of it. Without a vulnerability enabling access, the attacker cannot gain access to the system.
The Vulnerability Model (VM) identifies attack patterns, threats, and valuable assets, which can be physical or intangible. It addresses security concerns like confidentiality, integrity, availability, and accountability within business, application, or infrastructure contexts.

## Protection

A system's architecture and design decisions play a major role in determining how safe it can be. The traditional approach to improving security is the detection of systems vulnerable to attack and hardening these systems to make attacks more difficult, but it is only partially effective. Formal risk assessment for compromise of highly complex and interconnected systems is impractical and the related question of how much to spend on security is difficult to answer. Because of the ever changing and uncertain nature of cyber-threats, risk assessment may produce scenarios that are costly or unaffordable to mitigate. As of 2019, there are no commercially available, widely used active defense systems for protecting systems by intentionally increasing the complexity or variability of systems to make it harder to attack. The cyber resilience approach, on the other hand, assumes that breaches will occur and focuses on protecting essential functionality even if parts are compromised, using approaches such as micro-segmentation, zero trust, and business continuity planning.
The majority of attacks can be prevented by ensuring all software is fully patched. Nevertheless, fully patched systems are still vulnerable to exploits using zero-day vulnerabilities. The highest risk of attack occurs just after a vulnerability has been publicly disclosed or a patch is released, because attackers can create exploits faster than a patch can be developed and rolled out.
Software solutions aim to prevent unauthorized access and detect the intrusion of malicious software. Training users can avoid cyberattacks (for example, not to click on a suspicious link or email attachment), especially those that depend on user error. However, too many rules can cause employees to disregard them, negating any security improvement. Some insider attacks can also be prevented using rules and procedures. Technical solutions can prevent many causes of human error that leave data vulnerable to attackers, such as encrypting all sensitive data, preventing employees from using insecure passwords, installing antivirus software to prevent malware, and implementing a robust patching system to ensure that all devices are kept up to date.
There is little evidence about the effectiveness and cost-effectiveness of different cyberattack prevention measures. Although attention to security can reduce the risk of attack, achieving perfect security for a complex system is impossible, and many security measures have unacceptable cost or usability downsides. For example, reducing the complexity and functionality of the system is effective at reducing the attack surface. Disconnecting systems from the internet is one truly effective measure against attacks, but it is rarely feasible. In some jurisdictions, there are legal requirements for protecting against attacks.

## Attack process and types

The cyber kill chain is the process by which perpetrators carry out cyberattacks.
* Reconnaissance: would-be attackers search for information about the system in order to target it. They may seek out publicly available information or carry out social engineering attacks to obtain more information about the target's systems.
* Weaponization: after finding a vulnerability, attackers build an exploit to gain access, and malware to carry out the attack.
* Delivery: once complete, the malware is delivered to the target. Most data breaches and malware insertions are enabled by phishing, where the attacker sends a malicious communication, often an email, in an attempt to get the recipient to click on a link or attachment to deliver malware. Drive-by-download does not require any clicks, only a visit to a malicious website. Sometimes insiders are behind the attack and can use their credentials to bypass security. Some attacks are delivered indirectly via associated companies that have a business relationship with the target. Others may be delivered by directly accessing hardware, particularly in the cases of bribery or blackmail.
* Exploitation: the attacker's software is executed on the targeted system, and often creates a backdoor to enable remote control by the attacker.
* Many attackers will not launch an attack right away. The attacker often seeks to persist after system interruption (such as crash or restart), evade detection, and escalate privileges, and secure multiple channels of communication with its controllers. Other common actions include responding to remote controls and collecting and copying data to a device controlled by the attacker (data exfiltration).

### Activity

After the malware is installed, its activity varies greatly depending on the attacker's goals. Many attackers try to eavesdrop on a system without affecting it. Although this type of malware can have unexpected side effects, it is often very difficult to detect. Botnets are networks of compromised devices that can be used to send spam or carry out denial-of-service attacks—flooding a system with too many requests for the system to handle at once, causing it to become unusable. Attackers may also use computers to mine cryptocurrencies, such as Bitcoin, for their own profit.
Ransomware is software used to encrypt or destroy data; attackers demand payment for the restoration of the targeted system. The advent of cryptocurrency enabling anonymous transactions has led to a dramatic increase in ransomware demands.

## Perpetrators and motivations

The stereotype of a hacker is an individual working for themself. However, many cyber threats are teams of well-resourced experts. "Growing revenues for cyber criminals are leading to more and more attacks, increasing professionalism and highly specialized attackers. In addition, unlike other forms of crime, cybercrime can be carried out remotely, and cyber attacks often scale well." Many cyberattacks are caused or enabled by insiders, often employees who bypass security procedures to get their job done more efficiently. Attackers vary widely in their skill and sophistication and well as their determination to attack a particular target, as opposed to opportunistically picking one easy to attack. The skill level of the attacker determined which types of attacks they are prepared to mount. The most sophisticated attackers can persist undetected on a hardened system for an extended period of time.
Motivations and aims also differ. Depending whether the expected threat is passive espionage, data manipulation, or active hijacking, different mitigation methods may be needed.
Software vendors and governments are mainly interested in undisclosed vulnerabilities (zero-days), while organized crime groups are more interested in ready-to-use exploit kits based on known vulnerabilities, which are much cheaper. The lack of transparency in the market causes problems, such as buyers being unable to guarantee that the zero-day vulnerability was not sold to another party. Both buyers and sellers advertise on the dark web and use cryptocurrency for untraceable transactions. Because of the difficulty in writing and maintaining software that can attack a wide variety of systems, criminals found they could make more money by renting out their exploits rather than using them directly.
Cybercrime as a service, where hackers sell prepacked software that can be used to cause a cyberattack, is increasingly popular as a lower risk and higher profit activity than traditional hacking. A major form of this is to create a botnet of compromised devices and rent or sell it to another cybercriminal. Different botnets are equipped for different tasks such as DDOS attacks or password cracking. It is also possible to buy the software used to create a botnet and bots that load the purchaser's malware onto a botnet's devices. DDOS as a service using botnets retained under the control of the seller is also common, and may be the first cybercrime as a service product, and can also be committed by SMS flooding on the cellular network. Malware and ransomware as a service have made it possible for individuals without technical ability to carry out cyberattacks.

## Targets and consequences

Targets of cyberattacks range from individuals to corporations and government entities. Many cyberattacks are foiled or unsuccessful, but those that succeed can have devastating consequences. Understanding the negative effects of cyberattacks helps organizations ensure that their prevention strategies are cost-effective. One paper classifies the harm caused by cyberattacks in several domains:
* Physical damage, including injury or death or destruction of property
* Digital damage, such as the destruction of data or introduction of malware
* Economic losses, such as those caused by disrupted operations, the cost of investigation, or regulatory fines.
* Psychological harm, such as users being upset that their data has been leaked
* Reputational damage, loss of reputation caused by the attack
* Negative externalities to society at large, such as consumers losing access to an important service because of the attack.

### Consumer data

Thousands of data records are stolen from individuals every day. According to a 2020 estimate, 55 percent of data breaches were caused by organized crime, 10 percent by system administrators, 10 percent by end users such as customers or employees, and 10 percent by states or state-affiliated actors. Opportunistic criminals may cause data breaches—often using malware or social engineering attacks, but they will typically move on if the security is above average. More organized criminals have more resources and are more focused in their targeting of particular data. Both of them sell the information they obtain for financial gain. Another source of data breaches are politically motivated hackers, for example Anonymous, that target particular objectives. State-sponsored hackers target either citizens of their country or foreign entities, for such purposes as political repression and espionage.
After a data breach, criminals make money by selling data, such as usernames, passwords, social media or customer loyalty account information, debit and credit card numbers, and personal health information (see medical data breach). This information may be used for a variety of purposes, such as spamming, obtaining products with a victim's loyalty or payment information, prescription drug fraud, insurance fraud, and especially identity theft. Consumer losses from a breach are usually a negative externality for the business.

### Critical infrastructure

Critical infrastructure is that considered most essential—such as healthcare, water supply, transport, and financial services—which has been increasingly governed by cyber-physical systems that depend on network access for their functionality. For years, writers have warned of cataclysmic consequences of cyberattacks that have failed to materialize as of 2023. These extreme scenarios could still occur, but many experts consider that it is unlikely that challenges in inflicting physical damage or spreading terror can be overcome. Smaller-scale cyberattacks, sometimes resulting in interruption of essential services, regularly occur.

### Corporations and organizations

There is little empirical evidence of economic harm (such as reputational damage) from breaches except the direct cost for such matters as legal, technical, and public relations recovery efforts. Studies that have attempted to correlate cyberattacks to short-term declines in stock prices have found contradictory results, with some finding modest losses, others finding no effect, and some researchers criticizing these studies on methodological grounds. The effect on stock price may vary depending on the type of attack. Some experts have argued that the evidence suggests there is not enough direct costs or reputational damage from breaches to sufficiently incentivize their prevention.

### Governments

Government websites and services are among those affected by cyberattacks. Some experts hypothesize that cyberattacks weaken societal trust or trust in the government, but as of 2023 this notion has only limited evidence.

## Responses

Responding quickly to attacks is an effective way to limit the damage. The response is likely to require a wide variety of skills, from technical investigation to legal and public relations. Because of the prevalence of cyberattacks, some companies plan their incident response before any attack is detected, and may designate a computer emergency response team to be prepared to handle incidents.

### Detection

Many attacks are never detected. Of those that are, the average time to discovery is 197 days. Some systems can detect and flag anomalies that may indicate an attack, using such technology as antivirus, firewall, or an intrusion detection system. Once suspicious activity is suspected, investigators look for indicators of attack and indicators of compromise. Discovery is quicker and more likely if the attack targets information availability (for example with a denial-of-service attack) rather than integrity (modifying data) or confidentiality (copying data without changing it). State actors are more likely to keep the attack secret. Sophisticated attacks using valuable exploits are more less likely to be detected or announced – as the perpetrator wants to protect the usefulness of the exploit.
Evidence collection is done immediately, prioritizing volatile evidence that is likely to be erased quickly. Gathering data about the breach can facilitate later litigation or criminal prosecution, but only if the data is gathered according to legal standards and the chain of custody is maintained.

### Recovery

Containing the affected system is often a high priority after an attack, and may be enacted by shutoff, isolation, use of a sandbox system to find out more about the adversary patching the vulnerability, and rebuilding. Once the exact way that the system was compromised is identified, there is typically only one or two technical vulnerabilities that need to be addressed in order to contain the breach and prevent it from reoccurring. A penetration test can then verify that the fix is working as expected. If malware is involved, the organization must investigate and close all infiltration and exfiltration vectors, as well as locate and remove all malware from its systems. Containment can compromise investigation, and some tactics (such as shutting down servers) can violate the company's contractual obligations. After the breach is fully contained, the company can then work on restoring all systems to operational. Maintaining a backup and having tested incident response procedures are used to improve recovery.

### Attribution

Attributing a cyberattack is difficult, and of limited interest to companies that are targeted by cyberattacks. In contrast, secret services often have a compelling interest in finding out whether a state is behind the attack. Unlike attacks carried out in person, determining the entity behind a cyberattack is difficult. A further challenge in attribution of cyberattacks is the possibility of a false flag attack, where the actual perpetrator makes it appear that someone else caused the attack. Every stage of the attack may leave artifacts, such as entries in log files, that can be used to help determine the attacker's goals and identity. In the aftermath of an attack, investigators often begin by saving as many artifacts as they can find, and then try to determine the attacker. Law enforcement agencies may investigate cyber incidents although the hackers responsible are rarely caught.

## Legality

Most states agree that cyberattacks are regulated under the laws governing the use of force in international law, and therefore cyberattacks as a form of warfare are likely to violate the prohibition of aggression. Therefore, they could be prosecuted as a crime of aggression. There is also agreement that cyberattacks are governed by international humanitarian law, and if they target civilian infrastructure, they could be prosecuted as a war crime, crime against humanity, or act of genocide. International courts cannot enforce these laws without sound attribution of the attack, without which countermeasures by a state are not legal either.
In many countries, cyberattacks are prosecutable under various laws aimed at cybercrime. Attribution of the attack beyond reasonable doubt to the accused is also a major challenge in criminal proceedings. In 2021, United Nations member states began negotiating a draft cybercrime treaty.
Many jurisdictions have data breach notification laws that require organizations to notify people whose personal data has been compromised in a cyberattack.