Cheating detection technology will be a cat and mouse game, but a good teacher who knows his students will spot cheating almost immediately (proving it might be more difficult).

The only solution is to evaluate students in ways that they can't cheat. Hand-written exams in class, oral exams, etc. but that is quite time-consuming and most teachers at least in K-12 are already overloaded.