This is FRESH AIR. I'm Terry Gross. Your worst nightmare about how a smartphone can be hacked to spy on its owner became a reality for 37 people around the world whose phones were infected by spyware or whose phones had an attempted penetration. These people included journalists, activists, business executives and two women close to the murdered Saudi journalist Jamal Khashoggi. A forensic analysis revealed that the phones had been penetrated by military-grade spyware called Pegasus, which had been licensed to governments by the private Israeli security company NSO Group. The company says that the Pegasus spyware it sells to governments is intended to collect data from suspected criminals and terrorists. But apparently, the reality is that the spyware was widely misused.