There, they use two strategies to prevent that:
1) Do not tell the counterfeiters how you discriminate their products from the real ones.
2) Keep the technology you use out of the hands of the counterfeiters.
For this problem, for 2), I think the cat is out of the bag. A with money, keeping tech out of the hands of government-size entities is impossible, but keeping it out of the hands of small players is doable. Here, doing that that would require locking down all computers in the hands of small players to the level iOS does it. Not impossible, but won’t happen overnight, and I don’t think we want to go there.
That leaves 1). That’s a bit at odds with “publish or perish”, but I guess the likes of NSA personnel aren’t in that rat race, so it might be possible for the NSA to provide an online “fake or real?” tool. Of course, that would mean the likes of the NSA could lie when asked whether their fake was real and when asked whether a real image they don’t want to be known as real was real, so we would need multiple, independent such parties.