A new way to get insider information…hack it! The WSJ reported this week that three Chinese hackers (traders) earned more than $4 million in illegal profits after they hacked into the computer systems of prominent U.S. law firms and stole nonpublic information on mergers and acquisitions. These hacks should be a loud wake up call for law firms, which have long been considered vulnerable to cyberattacks.

The traders bought shares of at least five publicly traded companies, including drug and chip makers, before the firms announced the deals, according to an indictment from the Manhattan U.S. attorney’s office. The traders learned about the deals by gaining access to email accounts of law-firm partners working on the transactions. The hackers reportedly took millions of documents from two law firms’ servers between April 2014 to late 2015.

Federal investigators were probing hacks of Cravath, Swaine & Moore LLP and Weil, Gotshal & Manges LLP, which represent Wall Street banks and Fortune 500 companies in matters including lawsuits and multibillion-dollar merger negotiations. The traders were arrested in Hong Kong on Sunday, and law-enforcement officials are seeking to have them extradited to the U.S. Manhattan U.S. Attorney Preet Bharara noted that his incident “should serve as a wake-up call for law firms around the world: you are and will be targets of cyber hacking, because you have information valuable to would-be criminals.”

Five other law firms were targeted, prosecutors allege, though hackers weren’t able to access their networks. Prosecutors say those five firms were targeted by the defendants on more than 100,000 occasions between March and September 2015.

How did they do it? Traders reportedly won access to the deals by installing malware on firms’ computer networks, which allowed them to download information from email accounts. The defendants compromised the accounts of an information-technology employee at each law firm, and then posed as the employees to gain access to the firms’ private networks and email servers.