Federal agents used court orders to chip away at North Korea’s cyberattacks.