1. 4
  1.  

  2. 3

    I feel like this is moving the countermeasure too far in the direction of complex, subtle, etc. If you have the means to detect an attack, the obvious countermeasure is to print a stack trace, drop core, halt and catch fire.