Preventing spyware attacks