Countermeasures to defend systems against attacks can be classified into two categories: compile-time defenses and run-time defenses. Countermeasures are tactical solutions designed to avoid an unsuitable effect in the process. Strategies such as prevention, detection, and reaction are used to prevent problems.