Skip to content
All posts

Top 10 Types of Cybersecurity Attacks and How to Mitigate Them, Part 3

In Parts 1 and 2 of this blog series, we previously discussed cybersecurity attacks that could be countered by training and implementing various solutions and products. In part 3, we will discuss cybersecurity attacks where the processes to address these security threats are more involved.   

7. Code Injection

Code injection attacks like SQL injection and Cross-Site Scripting (XSS) exploit vulnerabilities in web applications to insert malicious code into a program, typically through input fields that are not properly sanitized or validated. This malicious code is then executed by the application, allowing the attacker to manipulate the database, gain unauthorized access, or perform other malicious actions.   

   For example, in the case of SQL injection, the attacker injects SQL commands into an input field, which are then executed by the database server, potentially leading to data breaches, data manipulation, or even complete control over the database.   

A screen shot of a computer

Description automatically generated 
 

Illustration of a SQL injection attack.   

 

What to do?   

Secure Coding   

Implementing secure coding practices is fundamental in preventing code injection attacks. Input validation involves rigorously checking all user inputs to ensure they conform to expected formats and data types, thereby preventing malicious code from being processed by the application. This includes using whitelists to allow only acceptable characters and patterns and rejecting anything that does not match. Output encoding, on the other hand, transforms potentially dangerous data into a safe format before it is rendered by the browser or used in another part of the system. For instance, converting special characters into HTML entities prevents them from being executed as code in a web context. Together, input validation and output encoding form a robust defense against injection attacks by ensuring that user inputs are handled safely and that any potentially harmful data is neutralized before it can cause harm.   

Regular Security Audits and Updates to Application Security Measures   

Conducting regular security audits and keeping application security measures up to date are crucial for mitigating code injection attacks. Security audits involve systematically examining the application’s code, configurations, and operations to identify vulnerabilities and weaknesses that could be exploited by attackers. This includes both manual code reviews and automated scanning tools that can detect common injection flaws. Additionally, keeping security measures current means applying patches and updates promptly as soon as they are released by software vendors, thereby closing known vulnerabilities that could be targeted. Continuous monitoring and improvement of security protocols ensure that new threats are addressed and that the application’s defense mechanisms remain effective against evolving attack techniques. Regularly updated security measures and audits create a proactive security posture, reducing the risk of successful code injection attacks.   

8. Supply Chain

A supply chain refers to entities involved in the creation, distribution, and maintenance of software products, including developers, vendors, integrators, distributors, and end-users, and encompassing all the processes and resources involved in delivering software from its initial conception to its deployment and ongoing support.   

We can distinguish two types of supply chains: the hardware supply chain, dealing with physical components such as processors, memory chips, circuit boards, etc. and the software supply chain, dealing with intangible assets like code, libraries, frameworks, and applications.   

Both hardware and software supply chains are critical components of the modern technology ecosystem, and they can be targeted by malicious actors seeking to exploit vulnerabilities for various nefarious purposes, including cybersecurity attacks.   

Software Supply Chain Attacks  

Malicious actors typically compromise the software development process itself to inject malicious code or tamper with legitimate code; this can happen at various stages of software development, such as during coding, building, testing, or distribution.   

One common method is to compromise the code repositories where developers store their source code, by injecting malware into the codebase, which then gets distributed to unsuspecting users when they download or update the software.   

Include an example, GitHub?   

Another approach involves compromising the build or distribution systems used by software vendors, by infiltrating these systems, attackers can insert backdoors, trojans, or other forms of malware into the software packages before they are distributed to users.   

 Illustration of a software supply chain attack. 

Illustration of a software supply chain attack.   

 

An infamous example of software supply chain attacks is the SolarWinds hack, a sophisticated cyberattack discovered back in December 2020, where malicious actors compromised SolarWinds' Orion software update mechanism to distribute malware to thousands of organizations. By injecting malicious code into legitimate software updates, attackers gained access to networks of government agencies, technology firms, and other organizations worldwide, allowing threat actors to exfiltrate sensitive data, conduct espionage, and potentially disrupt critical infrastructure, highlighting the vulnerability of software supply chains to sophisticated cyber threats.   

Hardware Supply Chain Attacks   

Malicious actors would attempt to tamper with physical hardware devices at various points along the supply chain, from the fabrication of integrated circuits to the assembly of final products., and compromise it inserting hardware implants, modifying firmware, or altering the device's configuration.    

The goal of hardware supply chain attacks may vary, from espionage and data exfiltration to sabotage and disruption of critical infrastructure.   

Illustration of a hardware supply chain attack.   

Illustration of a hardware supply chain attack.   

 

One example is the 2018 Bloomberg Businessweek report, which alleged that Chinese operatives had inserted malicious chips into Supermicro server motherboards during the manufacturing process. This compromised hardware was reportedly used by major technology companies and government agencies, although some parties involved disputed the accuracy of these claims.   

Another example is the 2015 discovery by Kaspersky Lab of the Equation Group, which revealed a series of sophisticated malware implants in hard drive firmware. The Equation Group, believed to be linked to the NSA, used these implants to establish persistent backdoors in targeted systems, showcasing the potential for hardware-based cyber espionage.   

What to do?   

Adapt Privileged Accounts   

Privileged accounts should be carefully managed and regularly reviewed to ensure they have only the access necessary for their functions. This involves implementing strict access controls, monitoring usage, and employing multi-factor authentication (MFA) to reduce the risk of unauthorized access. Additionally, employing just-in-time (JIT) access provisioning can help by granting elevated permissions only for the duration required to complete specific tasks, thereby minimizing the potential attack surface for malicious actors seeking to exploit these accounts.   

Follow the Principle of Least Privilege (PoLP)   

Implementing the Principle of Least Privilege (PoLP) involves configuring accounts and processes to have the minimum levels of access—or permissions—necessary to perform their functions. This practice limits the potential damage that can occur if an account is compromised, as attackers will have access to fewer resources. Regular audits and reviews should be conducted to ensure that permissions are appropriate and updated as roles and requirements change, thereby reducing the overall risk of a successful supply chain attack.   

Harden On-Premises System   

Enhancing the security of on-premises systems is critical to protecting against supply chain attacks. One effective measure is deploying a FIPS (Federal Information Processing Standards) validated Hardware Security Module (HSM) to securely store token signing certificate private keys. An HSM provides a robust layer of physical and cryptographic protection, ensuring that sensitive keys remain secure and less vulnerable to tampering or unauthorized access, thereby reinforcing the integrity of the overall security infrastructure.   

Vulnerability Monitoring   

Proactive vulnerability monitoring is essential in identifying and mitigating risks associated with supply chain attacks. Utilizing Security Information and Event Management (SIEM) solutions allows organizations to collect, analyze, and correlate security data from various sources in real-time. This continuous monitoring enables the rapid detection of unusual activities or potential threats, facilitating swift remediation efforts to address vulnerabilities before they can be exploited by malicious actors.   

Implement Behavioral Analytics-Based Threat Detection   

Employing behavioral analytics-based threat detection can significantly enhance an organization's ability to identify and respond to sophisticated cyber threats. By deploying Endpoint Detection and Response (EDR) software, such as Cylance Optics, organizations can monitor and analyze user and system behaviors to detect anomalies that may indicate malicious activities. This approach allows for the early detection of advanced threats that traditional security measures might miss, enabling faster and more effective responses to potential supply chain attacks.   

Having thoroughly discussed code injection and supply chain attacks, you now know that the best mitigation strategies include secure coding and regular security audits as well as adapting privileged accounts, hardening on-premises systems, vulnerability monitoring, and implementing behavioral analytics-based threat detection. If you have questions or concerns about cybersecurity attacks and want to ensure that your organization’s cyber hygiene and security posture remain strong and endure through best practices, the team at ISEC7 can complete a security assessment and help you navigate the options available to you; ISEC7 can also add additional layers of security Please stay tuned for our next blog post that will conclude this series and break down the final types of cybersecurity attacks – DNS tunneling and zero-day exploits – and how to address them.