The Cybersecurity and Infrastructure Security Agency, the federal government’s cybersecurity threat advisor, and the FBI, its cyber enforcement agency, are improving lines of communication between government and industry and making it harder for hackers to do their jobs.