KABUL, Afghanistan — Detainees are hung by their hands and beaten with cables, and in some cases their genitals are twisted until the prisoners lose consciousness at sites run by the Afghan intelligence service and the Afghan National Police, according to a United Nations report released here on Monday.