Sahih Muslim 1847 a
It has been narrated on the authority of Hudhaifa b. al-Yaman who said:
People used to ask the Messenger of Allah (ﷺ) about the good times, but I used to ask him about bad times fearing lest they overtake me. I said: Messenger of Allah, we were in the midst of ignorance and evil, and then God brought us this good (time through Islam). Is there any bad time after this good one? He said: Yes. I asked: Will there be a good time again after that bad time? He said: Yes, but therein will be a hidden evil. I asked: What will be the evil hidden therein? He said: (That time will witness the rise of) the people who will adopt ways other than mine and seek guidance other than mine. You will know good points as well as bad points. I asked: Will there be a bad time after this good one? He said: Yes. (A time will come) when there will be people standing and inviting at the gates of Hell. Whoso responds to their call they will throw them into the fire. I said: Messenger of Allah, describe them for us. He said: All right. They will be a people having the same complexion as ours and speaking our language. I said: Messenger of Allah, what do you suggest if I happen to live in that time? He said: You should stick to the main body of the Muslims and their leader. I said: If they have no (such thing as the) main body and have no leader? He said: Separate yourself from all these factions, though you may have to eat the roots of trees (in a jungle) until death comes to you and you are in this state.
حَدَّثَنِي مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنَا الْوَلِيدُ بْنُ مُسْلِمٍ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ يَزِيدَ بْنِ، جَابِرٍ حَدَّثَنِي بُسْرُ بْنُ عُبَيْدِ اللَّهِ الْحَضْرَمِيُّ، أَنَّهُ سَمِعَ أَبَا إِدْرِيسَ الْخَوْلاَنِيَّ، يَقُولُ سَمِعْتُ حُذَيْفَةَ بْنَ الْيَمَانِ، يَقُولُ كَانَ النَّاسُ يَسْأَلُونَ رَسُولَ اللَّهِ صلى الله عليه وسلم عَنِ الْخَيْرِ وَكُنْتُ أَسْأَلُهُ عَنِ الشَّرِّ مَخَافَةَ أَنْ يُدْرِكَنِي فَقُلْتُ يَا رَسُولَ اللَّهِ إِنَّا كُنَّا فِي جَاهِلِيَّةٍ وَشَرٍّ فَجَاءَنَا اللَّهُ بِهَذَا الْخَيْرِ فَهَلْ بَعْدَ هَذَا الْخَيْرِ شَرٌّ قَالَ ‏"‏ نَعَمْ ‏"‏ فَقُلْتُ هَلْ بَعْدَ ذَلِكَ الشَّرِّ مِنْ خَيْرٍ قَالَ ‏"‏ نَعَمْ وَفِيهِ دَخَنٌ ‏"‏ ‏.‏ قُلْتُ وَمَا دَخَنُهُ قَالَ ‏"‏ قَوْمٌ يَسْتَنُّونَ بِغَيْرِ سُنَّتِي وَيَهْدُونَ بِغَيْرِ هَدْيِي تَعْرِفُ مِنْهُمْ وَتُنْكِرُ ‏"‏ ‏.‏ فَقُلْتُ هَلْ بَعْدَ ذَلِكَ الْخَيْرِ مِنْ شَرٍّ قَالَ ‏"‏ نَعَمْ دُعَاةٌ عَلَى أَبْوَابِ جَهَنَّمَ مَنْ أَجَابَهُمْ إِلَيْهَا قَذَفُوهُ فِيهَا ‏"‏ ‏.‏ فَقُلْتُ يَا رَسُولَ اللَّهِ صِفْهُمْ لَنَا ‏.‏ قَالَ ‏"‏ نَعَمْ قَوْمٌ مِنْ جِلْدَتِنَا وَيَتَكَلَّمُونَ بِأَلْسِنَتِنَا ‏"‏ ‏.‏ قُلْتُ يَا رَسُولَ اللَّهِ فَمَا تَرَى إِنْ أَدْرَكَنِي ذَلِكَ قَالَ ‏"‏ تَلْزَمُ جَمَاعَةَ الْمُسْلِمِينَ وَإِمَامَهُمْ ‏"‏ ‏.‏ فَقُلْتُ فَإِنْ لَمْ تَكُنْ لَهُمْ جَمَاعَةٌ وَلاَ إِمَامٌ قَالَ ‏"‏ فَاعْتَزِلْ تِلْكَ الْفِرَقَ كُلَّهَا وَلَوْ أَنْ تَعَضَّ عَلَى أَصْلِ شَجَرَةٍ حَتَّى يُدْرِكَكَ الْمَوْتُ وَأَنْتَ عَلَى ذَلِكَ ‏"‏ ‏.‏