ALBANY, N.Y. — A village in central New York made ransom payments of $300 and $500 last year to keep its computers running after two official-looking emails released malware throughout its system, state auditors said. In Maine this year, Lincoln County sheriff’s office computers were infected and held hostage. Sheriff Todd Brackett said after several attempts to retrieve the records, his agency paid a ransom of about $300 and the FBI helped track the payment to a Swiss bank account but failed to identify the hackers. The New York comptroller’s office, which has audited 100 municipal computer systems the past three years, said Ilion’s experience should warn others of the growing threat, which can infiltrate computers and make them inaccessible.