How could the engineers have deployed this without testing it?

By Prasanna Abeysekera

The Reality of Single Points of Failure

Windows endpoints are the foundation of many IT settings, valued for their versatility and extensive interoperability. While necessary, these mechanisms show a significant vulnerability: the possibility of a single point of failure disrupting the whole infrastructure. Regardless of the overall sophistication of the IT infrastructure, a business may require enhancements if it overly depends on specific components, such as endpoint detection systems. These components could be susceptible to insider threats, process failures, or deliberate attacks targeting the components or their subsystems.

A prominent cybersecurity company, CrowdStrike, was recently involved in an incident in which someone blatantly revealed the weakness. The update that introduced a file with the pattern "C-00000291*.sys" into the % WINDIR%System32driversCrowdStrike directory was the main cause of this event. The software creator claims that an action placed a file in its update pipeline, potentially in an improper format, causing the CrowdStrike driver to fail. This failure resulted in widespread system malfunctions, causing significant operational downtime and interruptions across global operating systems.

The Domino Effect of a Single File

This scenario demonstrates how a seemingly insignificant issue can trigger widespread ramifications. Despite having robust infrastructure and sophisticated security measures, the introduction of a flawed file resulted in a chain of failures. Various customers received different versions of the problematic file, further complicating the troubleshooting process.

The CrowdStrike driver is a software component that operates lowly within the operating system (OS). It is responsible for loading specific data structures from a file, which are organised data formats required for the driver to function correctly.

If the file the driver attempts to load is incorrectly formatted, the data must conform to the driver's expected organisation. Otherwise, the driver may encounter unexpected data.

When the driver encounters unexpected data, it can result in crashes. Due to the low-level nature of drivers within the OS, these crashes can be severe and lead to a Blue Screen of Death (BSOD). A BSOD is a critical error screen displayed by Windows when it encounters a fatal system error, causing the system to stop functioning to prevent damage.

The CrowdStrike driver depends on correctly formatted files to function. If it encounters unexpected data due to an incorrectly formatted file, it can crash, potentially leading to a BSOD.

Memory corruption occurs when a driver reads or writes outside of its allocated memory space, which can happen for various reasons, such as an invalid file format. When a driver encounters an invalid file format, it may misinterpret the data and attempt to access memory locations that it shouldn't, leading to several issues:

  • Memory Corruption: The driver can overwrite critical data in memory, leading to corruption. This can significantly affect the system's stability and functionality.
  • System Instability: Corrupted memory can cause unpredictable operating system and application behaviour, such as crashes, freezes, or other erratic issues.
  • Blue Screen of Death (BSOD): In severe cases, memory corruption can result in a system crash, triggering a BSOD. The operating system initiates this protective measure to prevent further damage.

In addressing these concerns, it is imperative to ensure the correct implementation and thorough testing of drivers. Tools like Driver Verifier can also play a significant role in identifying and diagnosing memory corruption issues by placing stress on the drivers and observing their behaviour.

Driver Verifier is a utility included in Windows that assists in monitoring and evaluating Windows kernel-mode drivers and graphics drivers for any illegal or corrupt behaviour. Here are some critical points about Driver Verifier:

  • Purpose: It is designed to identify and fix various driver issues that may cause system corruption, malfunctions, or other irregular behaviour.
  • Capabilities: Driver Verifier can discover inappropriate conduct by putting drivers through various tests and pressures. It can evaluate a driver's memory allocation, IRQL checks, and spin lock acquisitions and releases.
  • Usage: Driver Verifier can be run on multiple drivers simultaneously or one at a time. Using it on test computers or systems dedicated to testing and debugging is advisable.
  • How to Start: To initiate Driver Verifier, open a Command Prompt window as an administrator and enter "verifier" to launch the Driver Verifier Manager. You can select the settings and drivers you wish to test from there.
  • Caution: Running Driver Verifier has the potential to cause the computer to crash; therefore, you should only use it on test systems.

Unhandled exceptions occur when a program encounters an unexpected situation with no predefined solution. Drivers can be particularly problematic because they operate at a low level within the operating system. Unhandled exceptions in drivers can lead to system crashes or instability.

  • What are Unhandled Exceptions?
    • An unhandled exception is an error that occurs during a program's execution and is not caught by any error handling code. When this happens, the program may terminate unexpectedly, leading to potential data loss or system crashes.
  • Why Do They Occur in Drivers?
    • Drivers closely interact with hardware and the operating system. If a driver encounters unexpected data or a malformed file, it may not have the necessary error-handling mechanisms in place to manage the situation, resulting in an unhandled exception.

Consequences of Unhandled Exceptions in Drivers: Be aware of the impact.

  • System crashes: Drivers operating in kernel mode can lead to system crashes when unhandled exceptions occur, resulting in a blue screen of death (BSOD).
  • Data loss: Any unsaved data may be lost if the system crashes.
  • Security vulnerabilities: Malicious actors can exploit unhandled exceptions to execute arbitrary code or launch denial-of-service attacks.

Best Practices for Proper Error Handling:

  • Exception Handling: Drivers must implement robust exception handling to catch and manage errors effectively. This involves using try-catch blocks and ensuring all potential error conditions are anticipated and addressed.
  • Validation: Before processing data, drivers should validate the input to ensure it is well-formed and within expected parameters.
  • Logging: Implementation of logging mechanisms can aid in diagnosing and troubleshooting issues when they occur. Logs can provide insights into what went wrong and how to fix it.
  • Testing: Comprehensive testing, including stress testing and testing with malformed files, can help to identify potential issues before the driver is deployed.

Debugging Tools:

  • Debuggers: Developers can utilise debugging tools like WinDbg to analyse exceptions and comprehend their origins. These tools effectively examine the code and memory to pinpoint the root cause of the exception.
  • Crash Dumps: A crash dump file is typically generated when an unhandled exception causes a system crash. Analysing this file can provide insight into the system's state during the collision and help identify the problematic driver.

Developers can strengthen drivers by incorporating effective error handling and validation mechanisms, thereby reducing the likelihood of system crashes resulting from unhandled exceptions.

Critical System Operations:

  • Security Checks: Specific files play an essential role in drivers' proper functioning in critical system operations. These files are integral to the driver's ability to perform vital tasks, such as conducting security checks to ensure protection against unauthorised access and potential threats and facilitating seamless communication between the driver and other system components for coordinated operations.

Ensuring the integrity and validity of these critical files is of utmost importance, as it is integral to maintaining the system's stability and security. Implementing regular checks and updates is essential to minimise the risk of potential disruptions that could compromise the system's functionality and data security.

The Crucial Lessons: Significance of Thorough Testing and Validation

The recent incident involving CrowdStrike is a vital reminder for the cybersecurity community. It underscores the critical importance of robust validation processes, comprehensive testing, and careful manual oversight in implementing crucial updates. This emphasises the significance of thoroughly validating and testing all updates before deployment, particularly those involving low-level system components such as drivers.

This incident starkly reminds us that a single point of failure has the potential to compromise an entire IT infrastructure. As cybersecurity professionals, we are the first line of defence. It is our responsibility to prioritise thorough testing and validation to avert similar disasters in the future.

The recent CrowdStrike incident underlines the critical need to address vulnerabilities in our IT infrastructures. Even the most robust systems can be compromised, and Windows endpoints, while essential, can be single points of failure if not adequately managed and tested. As IT professionals, it is crucial to acknowledge these potential weaknesses and proactively implement strategies to minimise risks. This approach will lead to a more resilient and reliable infrastructure.

Mitigating Single Points of Failure

Addressing vulnerabilities of this nature requires a multifaceted approach:

  • Comprehensive Testing: Ensuring all updates, especially those affecting low-level system components, undergo thorough testing can prevent similar incidents.
  • Redundant Systems: Implementing duplicate systems can help lessen the impact of a single point of failure. This might involve maintaining backup drivers or alternative security measures that can take over if the primary system fails.
  • Automated Monitoring: Organisations' automated monitoring systems are crucial; they are integral to their proactive approach. Through the early detection of anomalies, we can promptly address potential failures, consequently positioning ourselves as an indispensable element in effectively managing the situation.
  • Robust Error Handling: Developing robust error handling within critical system components can prevent a single failure from cascading into a more significant issue.

NIST Cybersecurity Framework (CSF) 2.0

Adhering to the NIST Cybersecurity Framework (CSF) 2.0 could have significantly lessened the impact of the incident we discussed. This framework provides comprehensive guidance for managing cybersecurity risks and includes critical components that can help prevent errors.

Managing patch updates is crucial when it comes to maintaining the security and efficiency of your systems. Here are some essential guidelines to help you stay on top of this important task:
  • Always create different staging environments for testing patch updates. If you work in critical infrastructure, having a staging environment separate from production systems is essential.
  • Test version upgrades or patches for bugs before applying them to production systems.
  • Suppliers may refuse to supply or consider establishing a separate staging environment for commercial reasons. In such cases, refrain from using the product until approval is given to comply with your security requirements and adhere to essential controls through a framework. There are no excuses here.
  • Suppliers with administrative access can bypass the staging environment. Therefore, ensure that previous agreements are in place to restrict suppliers' access to the production environment only when necessary to resolve an issue.
  • Suppliers should work with corporate production teams to test version upgrades and fixes in a staging environment.
  • After confirming that the patch is operational, you decide whether to accept or apply it.

One essential aspect is the "Protect" function, which focuses on implementing safeguards to ensure the delivery of critical infrastructure services. Within this function, the "Configuration Management" (PR.IP-1) clause emphasises the importance of maintaining baseline configurations and inventories of organisational systems. It also stresses managing and controlling updates to prevent unauthorised changes.

Following the NIST CSF and its specific clauses can help organisations better manage and mitigate risks associated with software updates and configuration changes. This proactive approach helps ensure systems remain secure and resilient against potential threats.

The PR.IP-1 clause in the NIST Cybersecurity Framework (CSF) focuses on establishing and maintaining a baseline configuration for information technology and industrial control systems. This baseline configuration incorporates security principles, such as the concept of most minor functionality.

Here's a breakdown of what PR.IP-1 entails:

  • Baseline Configuration: This involves developing, documenting, and maintaining a current baseline configuration of the system. This configuration is a reference point for future builds, releases, and system changes.
  • Security Principles: The baseline configuration should incorporate security principles, such as the concept of least functionality, which enables only the necessary functions, ports, protocols, and services for the system to operate.
  • System Components: The baseline configuration includes information about system components, such as standard software packages installed on workstations, servers, network components, or mobile devices.

It adheres to PR.IP-1 enables organisations to establish robust and consistent system configurations that reduce the potential for unauthorised alterations and vulnerabilities.

Recognise your vulnerabilities and strengthen your defences

Who is the vendor?

The term "vendor" refers to a person or company that sells goods or services. The meaning can vary in different contexts:

  • Retail: A vendor is someone who sells products directly to consumers, either through a retail store, market stall, or online platform.
  • Business-to-Business (B2B): A vendor is a business that supplies products or services to other industries. For example, a company might purchase software, raw materials, or office supplies from a vendor.
  • Information Technology (IT): In the IT context, a vendor is a company that provides hardware, software, or services to other companies or consumers. Examples include Microsoft, Cisco, and Dell.
  • Procurement and Supply Chain: In the supply chain, a vendor provides necessary components or services to manufacturers who create products for the market.

In general, a vendor is an entity that offers something for sale, and the specific nature of what they offer and to whom can vary widely depending on the industry and context.

To mitigate the risk of loading an untested patch file, such as "C-00000291*.sys," the NIST Cybersecurity Framework (CSF) underscores the importance of adhering to several critical practices outlined within its guidelines:

  • Patch Management Planning: According to the NIST Special Publication 800-40 Rev. 4, organisations should have a comprehensive patch management plan that encompasses identifying, prioritising, acquiring, installing, and verifying patches. This ensures that patches undergo thorough testing before deployment.
  • Configuration Management (PR.IP-1): This section underscores the importance of maintaining a baseline configuration and managing system changes. By instituting a controlled update process, organisations can prevent the application of unauthorised or untested patches.
  • Risk Response Execution: The framework recommends preparing, deploying, verifying, and monitoring patches as part of the risk response execution. This involves testing patches in a controlled environment before deploying them to production systems.
  • Automatic Updates with Controls (SI-2(5)): Implementing automatic updates with predefined security controls can help ensure that only verified and authorised patches are applied.

By following these procedures, organisations can significantly reduce the risk of installing untested or unauthorised patches, thus improving their overall cybersecurity.

Acknowledgements

Explore the resources provided below to uncover vital information and acquire insight. You can find a wealth of information guiding your decision-making process on these sites.

Legal Disclaimer