layer7-protocol is a method of looking for patterns in connections.
you can download a script with a list of common programs here (only for RouterOS v3 RC6)