The Ministry of Justice says a cyber-attack in April resulted in the theft of personal data from legal aid applicants and criminal records.