Section 18.176 Race Conditions Flashcards
Objectives 2.2 Explain common threat vectors and attack strategies. Objectives 2.3 Explain various types of vulnerabilities Objectives 2.4 Given a scenario, you must be able to analyse indicators of malicious activity. Objectives 2.5 Explain the purpose of mitigation techniques used to secure the enterprise. Objectives 2.6 Given a scenario, you must be able to apply common security techniques to computing resources.
Race Condition
Software vulnerabilities related to the order and timing of events in concurrent processes
■ Exploiting race conditions allows attackers to disrupt intended program behavior and gain unauthorised access
■ Race conditions occur when multiple threads or processes access and manipulate shared resources simultaneously
Dereferencing
Software vulnerability that occurs when the code attempts to remove the
relationship between a pointer and the thing that the pointer was pointing to in the memory which allows changes to be made
■ Vulnerabilities stem from unexpected conflicts and synchronisation issues
Exploiting Race Conditions
Attackers exploit race conditions by timing their actions to coincide with
vulnerable code execution
■ Exploitation may lead to unauthorized access, data manipulation, or system
crashes
A real-world example of race condition exploitation
Dirty COW Exploit
Targeted Linux and Android systems, leveraging race conditions in the Copy On Write function
Types of Race Conditions
Time-of-Check (TOC)
Attackers manipulate a resource’s state after it is checked but before it is used
● For example, overdrawing a bank account due to a time delay between
checking and transferring funds
Types of Race Conditions
Time-of-Use (TOU)
● Attackers alter a resource’s state after it is checked but before it is used
● Focuses on the time when the resource is utilised, rather than the time of the initial check
Time-of-Evaluation (TOE)
Attackers manipulate data or resources during the system’s decision-making or evaluation process
● Can lead to incorrect results or unexpected behavior
Mitigating Race Conditions
Mutex
Mutually exclusive flag that acts as a gatekeeper to a section of code so that only one thread can be processed at a time
○ Mutexes ensure only one thread or process can access a specific section of code at a time
Properly design and test locks to prevent deadlocks
Mitigating Race Conditions
Deadlock
Occurs when a lock remains in place because the process it’s waiting for is
terminated, crashes, or doesn’t finish properly, despite the processing being complete