Federal officials say hackers have attempted to compromise public water systems in at least seven U.S.