A new technique could one day help prevent hackers from sabotaging electric power substations and other critical infrastructure.