The DOJ seized $2.3 million of the ransom that Colonial Pipeline paid to hacking group Darkside.
The FBI tracked the payments to a bitcoin wallet, for which it happened to have the password.
This let the FBI legally seize the money and cut off Darkside's access to its ransom money.
See more stories on Insider's business page.
The Department of Justice announced Monday that it had recovered a majority of the ransom paid by Colonial Pipeline to hackers who shut down its operations last month and caused massive fuel shortages and price hikes.
The DOJ said that it had recovered $2.3 million worth of bitcoin out of the $4.4 million ransom that Colonial had paid to Darkside, the group behind the hack.
How did the government pull it off?
The FBI had what was effectively the password to a bitcoin wallet that Darkside had sent the ransom money to, allowing the FBI to simply seize the funds, according to the DOJ.
'Following the money'
Despite cybercriminals' increasingly sophisticated use of technology to commit crimes, the DOJ said it used a time-tested approach to recover Colonial's ransom payment.
"Following the money remains one of the most basic, yet powerful tools we have," Deputy Attorney General Lisa Monaco said in the DOJ's press release.
Colonial was hacked by Darkside on May 7, and alerted the FBI that same day, according to the DOJ.
On May 8, with its operations knocked offline and amid an emerging gas crisis, Colonial opted to pay the ransom (much to the chagrin of government crimefighters who were simultaneously trying to shut down the hack).
Colonial told the FBI that Darkside had instructed it to send 75 bitcoin, worth about $4.3 million at the time, according to an affadavit from an FBI special agent involved in the investigation.
The FBI agent then used a blockchain explorer – software that lets users search a blockchain, like bitcoin, to determine the amount and destination of transactions – to figure out that Darkside had tried to launder the money through various bitcoin addresses (similar to bank accounts), according to the affadavit.
Eventually, through the blockchain explorer, the FBI agent was able to track 63.7 bitcoin to a single address that had received an influx of payments on May 27.
Fortunately for the FBI, according to the agent's affadavit, the agency had the private key (effectively the password) for that very address.
Bitcoin addresses rely on a two-key encryption system to keep transactions secure: one public and one private. The public key is shared openly so anybody can send money to that address. But once the sender has encrypted their payment with the recipient's public key, only the recipient's private key can decrypt and gain access to that money.
That's why private keys are meant to be closely held secrets, stored in a secure place. As of January, $140 billion in bitcoin – around 20% of existing bitcoin – were held in wallets where people had forgotten or lost their private keys.
In Darkside's case, the FBI managed to gain access to its public key, and after getting a seizure warrant from a federal court, the agency used the key to access Darkside's address and swipe 63.7 bitcoin, or around $2.3 million.
The FBI didn't say how it had managed to obtain the key, but said it sent a warning to other potential ransomware hackers.
"Ransom payments are the fuel that propels the digital extortion engine, and today's announcement demonstrates that the United States will use all available tools to make these attacks more costly and less profitable for criminal enterprises," Monaco said in the release.