Two North Carolina men were arrested on Thursday in the hacking of the personal email accounts of the director of the Central Intelligence Agency and other senior officials.

The men — Andrew Boggs, 22, of North Wilkesboro, and Justin Liverman, 24, of Morehead City — were accused of working with a prolific hacking group called Crackas With Attitude. Prosecutors said the group had targeted American officials, their families and United States computer systems from October 2015 to February 2016.

The F.B.I. said that members of the group had tricked people into providing information that had allowed them to gain access to the victims’ accounts, a technique known as social engineering.

At least three teenage members of the group lived in Britain, the authorities said. Earlier this year, the authorities there said they had arrested the group’s suspected ringleader, a 17-year-old known as Cracka.