Sunan Ibn Majah, Book 36, Hadith 155 (In-Book)

It was narrated from Abu Hurairah that the Messenger of Allah said: "Gog and Magog people dig every day until, when they can almost see the rays of the sun, the one in charge of them says: "Go back and we will dig it tomorrow." Then Allah puts it back, stronger than it was before. (This will continue) until, when their time has come, and Allah wants to send them against the people, they will dig until they can almost see the rays of the sun, then the one who is in charge of them will say: "Go back, and we will dig it tomorrow if Allah wills.' So they will say: "If Allah wills." Then they will come back to it and it will be as they left it. So they will dig and will come out to the people, and they will drink all the water. The people will fortify themselves against them in their fortresses. They will shoot their arrows towards the sky and they will come back with blood on them, and they will say: "We have defeated the people of earth and dominated the people of heaven." Then Allah will send a worm in the napes of their necks and will kill them thereby.'" The Messenger of Allah said: "By the One in Whose Hand is my soul, the beasts of the earth will grow fat on their flesh."

حَدَّثَنَا أَزْهَرُ بْنُ مَرْوَانَ، حَدَّثَنَا عَبْدُ الأَعْلَى، حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، قَالَ حَدَّثَنَا أَبُو رَافِعٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏"‏ إِنَّ يَأْجُوجَ وَمَأْجُوجَ يَحْفِرُونَ كُلَّ يَوْمٍ حَتَّى إِذَا كَادُوا يَرَوْنَ شُعَاعَ الشَّمْسِ قَالَ الَّذِي عَلَيْهِمُ ارْجِعُوا فَسَنَحْفِرُهُ غَدًا ‏.‏ فَيُعِيدُهُ اللَّهُ أَشَدَّ مَا كَانَ حَتَّى إِذَا بَلَغَتْ مُدَّتُهُمْ وَأَرَادَ اللَّهُ أَنْ يَبْعَثَهُمْ عَلَى النَّاسِ حَفَرُوا حَتَّى إِذَا كَادُوا يَرَوْنَ شُعَاعَ الشَّمْسِ قَالَ الَّذِي عَلَيْهِمُ ارْجِعُوا فَسَتَحْفِرُونَهُ غَدًا إِنْ شَاءَ اللَّهُ تَعَالَى وَاسْتَثْنَوْا فَيَعُودُونَ إِلَيْهِ وَهُوَ كَهَيْئَتِهِ حِينَ تَرَكُوهُ فَيَحْفِرُونَهُ وَيَخْرُجُونَ عَلَى النَّاسِ فَيَنْشِفُونَ الْمَاءَ وَيَتَحَصَّنُ النَّاسُ مِنْهُمْ فِي حُصُونِهِمْ فَيَرْمُونَ بِسِهَامِهِمْ إِلَى السَّمَاءِ فَتَرْجِعُ عَلَيْهَا الدَّمُ الَّذِي اجْفَظَّ فَيَقُولُونَ قَهَرْنَا أَهْلَ الأَرْضِ وَعَلَوْنَا أَهْلَ السَّمَاءِ فَيَبْعَثُ اللَّهُ نَغَفًا فِي أَقْفَائِهِمْ فَيَقْتُلُهُمْ بِهَا ‏"‏ ‏.‏ قَالَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ ‏"‏ وَالَّذِي نَفْسِي بِيَدِهِ إِنَّ دَوَابَّ الأَرْضِ لَتَسْمَنُ وَتَشْكَرُ شَكَرًا مِنْ لُحُومِهِمْ ‏"‏ ‏.‏

sunnah.com