Barnaby Jack hit the jackpot at Black Hat on Wednesday. Twice.

Exploiting bugs in two different ATM machines, the researcher from IOActive was able to get them to spit out money on demand and record sensitive data from the cards of people who used them.

He showed the attacks on two systems he had purchased himself -- the type of generic ATM machines typically found in bars and convenience stores. Criminals have been hitting this type of machine for years, using ATM skimmers to record card data and PIN numbers, or in some cases simply pulling up a truck and hauling the machines away.

But according to Jack there's an easier, much more alarming way to get the money out. Criminals can connect to the machines by dialing them up -- Jack believes a large number of them have remote management tools that can be accessed over a telephone -- and then launching an attack.

After experimenting with his own machines, Jack developed a way of bypassing the remote authentication system and installing a homemade rootkit, named Scrooge, that lets him override the machine's firmware. He also developed an online management tool, called Dillinger, that can keep track of compromised machines and store data stolen from people who use them.

Criminals could find vulnerable ATMs by using open-source "war-dialling" software to call hundreds of thousands of numbers, looking for those that respond by saying they have the vulnerable management software installed. Criminals have already used a similar technique over the Internet to break into vulnerable point-of-sale systems.

Jack's tools are just proof-of-concept software, designed to show how vulnerable the machines really are, he said. "The goal of the talk is to spark discussion on the best ways to remediate," he said.

"It's time to give these devices an overhaul," Jack said. "Companies who manufacture the devices aren't Microsoft. They haven't had 10 years of continual attacks against them."

The machines Jack hacked were, however, based on Microsoft's Windows CE operating system.

In an dramatic on-stage demonstration at Black Hat, he connected remotely to an ATM and ran a program called Jackpot that caused the ATMs to spit out cash, while playing a tune and splashing the word "Jackpot" across the screen of the machine.

In a second demo, he walked up to the machine, opened it with a key he had obtained on the Internet, and installed his own firmware. A single, standard key can open many different types of machines, he said, presenting another serious security problem.

Jack had planned to deliver the talk at last year's conference, but it was pulled after ATM vendors asked for more time to patch the issues he'd discovered.