Jackson A. Cosko, a former Democratic staff member who admitted to “doxing” several prominent Republicans during the confirmation process for Supreme Court Justice Brett Kavanaugh, stole Senate data by installing devices that covertly logged the keystrokes typed on at least six office computers on Capitol Hill.

Cosko, 27, pleaded guilty Friday to two counts of making public restricted personal information, one count of computer fraud, one count of witness tampering and one count of obstruction of justice related to publicizing the private information of five GOP senators last fall.

A staffer at the time of Rep. Shelia Jackson-Lee, Texas Democrat, Cosko was arrested in October after the Wikipedia pages of the senators – Lindsay Graham of South Carolina, Orrin Hatch and Mike Lee of Utah and Rand Paul and Mitch Mcconnell of Kentucky – were updated to include their home addresses and personal phone numbers.

In a statement of facts entered in court alongside his guilty plea, Cosko said he was angry about his termination from a previous job working for Sen. Maggie Hassan, New Hampshire Democrat, and that he retaliated by using a former colleague’s key to break into her office in the months after his firing and surreptitiously install “keylogger” devices on at least six office computers.

“During burglaries after the installation of the keyloggers, the defendant accessed the keylogger devices and obtained the information they had recorded,” U.S. Attorney Alessio D. Evangelista wrote in a statement of facts signed by Cosko.

“The defendant was thus able to identify the login credentials that provided access to Senate computers and computer networks,” the prosecutor explained. “The defendant then fraudulently used those stolen login credentials, unlawfully accessed Senate computers and computer networks and then stole data (including dozens of additional log credentials for other electronic accounts) belonging to Senator Hassan’s Office or its employees.”

Cosko ultimately stole dozens of gigabytes of data during the burglaries, ranging from login credentials, credit card information and Social Security numbers, to the personal contact information for several lawmakers later targeted, according to the document.

On September 27, Cosko was watching a televised broadcast of a hearing concerning the fate of President Trump’s controversial pick to the high court when he admittedly “became angry” and decided to publish the personal information, or “dox,” three senators involved: Mr. Graham, Mr. Hatch and Mr. Lee.

Mr. Paul subsequently called for an investigation, and Cosko responded days later by similarly updating the Wikipedia pages for both Mr. Paul and Mr. Mcconnell, the Senate majority leader at the time, he acknowledged in the court document.

Cosko physically broke into Ms. Hassan’s office for the last time on Oct. 2 using a key obtained from the former colleague, according to the filing. He was using a staffer’s computer to try to access their emails when he was spotted by a witness and fled the scene. He later sent a threatening message to the person who caught him and separately dispatched the former colleague back to the room to try to “wipe down” the computers, Cosko acknowledged. He was arrested that same day.

Cosko faces between 30 and 57 months behind bars during a sentencing hearing currently scheduled for June 13.

“Mr. Cosko takes full responsibility for his actions and is sincerely remorseful,” defense lawyer Brian W. Stolarz said in a statement, The Washington Post reported. “Sadly, Mr. Cosko’s ongoing struggle with drugs contributed to a regrettable course of conduct. He is committed to rehabilitating his life, his reputation and addressing his addiction.”