Hundreds of lawyers in New York have been illegally granted state pension benefits, according to Attorney General Andrew M. Cuomo.