Traced to Ka'b al-Ahbar (automatic guess): a report of earlier scriptures, not a hadith of the Prophet ﷺ.
الكوفة آمنة من الخراب حتى تخرب مصر قال الحكم في حديثه: عن صفوان قال: حدثني من سمع كعبا يقول: تعرك الكوفة عرك الأديم، ثم الملحمة العظمى بعد الكوفة
Kufa is safe from ruin until Egypt is destroyed. The battle of Kufa is the battle of the ancients, and then the great epic after Kufa
عبد القدوس والحكم بن نافعصفوبن عمروعبد الرحمن بن جبيركعبautomatic reading, unverified