Amr bin Shu'ayb narrates from his father, and he from his grandfather (may Allah be pleased with him), that the Prophet (peace and blessings be upon him) said concerning a kanz (treasure) which people obtain from old ruined houses: "If it was found in an inhabited house or on a frequented road, then let it be announced; and if he obtained it from an old ruin of the Jahiliyyah or from an uninhabited village, then in it and in rikaz there is khums."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الزكاة / 7648