The military has blamed militant group Boko Haram for the attacks in which at least 23 people died and 108 were injured.