WASHINGTON — The United States has charged a senior officer in the Chinese People’s Liberation Army with orchestrating decades of cyber attacks against US agencies intended to destroy the military talent management system from within.

“The Chinese basically built an algorithm to identify toxic leaders and hacked HR to put them on the fast track to becoming generals and admirals,” said an intelligence official familiar with the Chinese efforts. “It could take us years to recover from this.”

According to an FBI investigation, Sr. Col. Cha Buduo coordinated with the Chinese Ministry of State Security and a Chinese-based hacking group known as APT4 to attack U.S. Army Human Resources Command, the Air Force Personnel Center, and U.S. Navy and Marine Corps human resource activities. Their objectives included encouraging the most talented junior officers to resign, preventing the promotion of officers with advanced degrees, selecting toxic leaders for senior commands and promoting the most egotistical and venal officers to the flag rank. The Coast Guard does not appear to have been targeted.

“Actually, we’re not even sure China knows the Coast Guard exists,” the official said.

Chinese hackers also falsified equal opportunity and command climate complaints against hundreds of Tier One operators to disrupt U.S. special operations. Those focused attacks appear to have overwhelmingly targeted Navy SEALs.

“The Chinese know that the American armed forces’ greatest strength is their leaders, like Patton, MacArthur, Petraeus and McChrystal,” said another intelligence official, who has tracked Cha for years. “They realized they could turn our strength into a weakness by hacking the computer systems that control promotions. So, since at least 2002—and maybe longer—Chinese military hackers have altered the results of every single promotion and command selection board across the entire Department of Defense.”

“They booted the best officers and pinned rank on the worst.”

Others have pushed back on the FBI’s conclusions, however.

“I ran the numbers and I don’t see it,” said John Martinet, the chief of analysis at U.S. Army Human Resources Command.”The algorithm the Chinese built to promote toxic leaders doesn’t produce statistically different results from typical promotion Army promotion boards.

“The main difference is actually that the supposedly malicious code improves diversity outcomes. We might keep using it.”

The Ministry of Foreign Affairs in Beijing denied that China is involved. In a statement, a spokesman called the US indictment “an absurd attempt to blame America’s inevitable decline on an imaginary enemy.”