The Pegasus spyware, a product developed by Israeli company NSO Group, was used in attempted and successful hacks of smartphones belonging to journalists, government officials and human rights activists around the world, according to an investigation by 17 media organizations.