كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(54)
Chapter: It is recommended to say qunut in all prayers if a calamity befalls the Muslims – and refuge is sought from Allah (regarding that). It is recommended to say qunut in Subh at all times. And the clarification that it is to be said after raising the head from bowing in the final rak`ah, and it is recommended to say it out loud
(54)
باب اسْتِحْبَابِ الْقُنُوتِ فِي جَمِيعِ الصَّلاَةِ إِذَا نزَلَتْ بِالْمُسْلِمِينَ نَازِلَةٌ ‏‏
Sahih Muslim 677 c

Anas b. Malik reported:

The Messenger of Allah (ﷺ) observed Qunut for a month in the dawn prayer after ruku' and invoked curse upon Ri'l, Dhakwan, and said that 'Usayya had disobeyed Allah and His Apostle (ﷺ).
وَحَدَّثَنِي عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ الْعَنْبَرِيُّ، وَأَبُو كُرَيْبٍ وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ وَمُحَمَّدُ بْنُ عَبْدِ الأَعْلَى - وَاللَّفْظُ لاِبْنِ مُعَاذٍ - حَدَّثَنَا الْمُعْتَمِرُ بْنُ سُلَيْمَانَ، عَنْ أَبِيهِ، عَنْ أَبِي مِجْلَزٍ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَنَتَ رَسُولُ اللَّهِ صلى الله عليه وسلم شَهْرًا بَعْدَ الرُّكُوعِ فِي صَلاَةِ الصُّبْحِ يَدْعُو عَلَى رِعْلٍ وَذَكْوَانَ وَيَقُولُ ‏ "‏ عُصَيَّةُ عَصَتِ اللَّهَ وَرَسُولَهُ ‏"‏ ‏.‏
Reference : Sahih Muslim 677c
In-book reference : Book 5, Hadith 380
USC-MSA web (English) reference : Book 4, Hadith 1435
  (deprecated numbering scheme)