In a field office near Brunswick, Ga., a federal agent working as an undercover cybersleuth signed on to a large file-sharing network sometimes used by traders in child pornography.

Using a law-enforcement computer program called RoundUp, the agent, Stephen D. Logan, scanned computer activity by the network’s members in the state of Washington. He located a computer offering illegal photos and videos, and downloaded three files as evidence.

Local police took it from there, obtaining a warrant based on the distant search. The owner of the computer was convicted of possessing and distributing child pornography, and is now serving an 18-year sentence at a federal prison in Texas.

Had Mr. Logan worked for the F.B.I., his work on the case might have seemed routine. But Mr. Logan worked for the Naval Criminal Investigative Service, and his mission that day in April 2011, he would later testify, had been to look for military service members trading in child pornography in Washington, the location of several naval bases.