The U.S. government is launching an expansive program dubbed Perfect Citizen to detect cyber assaults on private U.S. companies and government agencies running critical infrastructure such as the electricity grid and nuclear power plants, according to people familiar with the program.