I believe it's impossible to make. The default packets sent from the Minecraft Client could be checked, but a good 'hacker' can just spoof the packets.
Now if you could grab the clients protocol, profile name, jar name, etc would be good, but spoofing could make it seem like latest optifine.