Seems highly unlikely to ever work, but why assume the technology is evil? If you could create a system that had a high accuracy of detecting terrorists, then that would be a good system, not an evil one.
I get your point that a system that claims to detect terrorists but only really detected Arabic people would be an evil one - but you're automatically calling the terrorist system evil without knowing if it really does detect terrorists or not.
As an extra hypothetical question, do you feel a system that could detect people who were really just about to commit terrorist attacks as good or evil? At a conceptual level, assume the system somehow scanned brain waves or some other truly difficult method.