Researchers have revealed how cyber-thieves sliced into cash machines in order to infect them with malware earlier this year.