Hackers gained access to the department's system that facilitates payment to farmers, the agency told employees on Thursday, the sources said.