A government cybersecurity specialist, who spoke on the condition of anonymity because such work is classified, said that many pornographic websites are infected and criminals and foreign intelligence services such as Russia’s use them to gain access to and harvest data from government and corporate computer networks.

“There are great dangers in interacting with any site that has high-quality imagery, whether it’s pornographic or not, or a lot of links,” said Chase Cunningham, chief of cyber analytics at Sterling, Virginia-based Decisive Analytics Corporation, in a telephone interview yesterday.