Witnesses have told of beatings, electric shocks and other physical abuse and humiliation administered to David Hicks, a convert to militant Islam who was captured in Afghanistan, and Mamdouh Habib, arrested as a suspected terrorist in Pakistan more than two years ago.