A Game-Theoretic Framework for Detecting Advanced Persistent Threats