Language:
كتاب الوتر
14  
Witr Prayer
(7)
Chapter: To recite Qunut before and after bowing
(7)
باب الْقُنُوتِ قَبْلَ الرُّكُوعِ وَبَعْدَهُ
Sahih al-Bukhari 1002

Narrated `Asim:

I asked Anas bin Malik about the Qunut. Anas replied, "Definitely it was (recited)". I asked, "Before bowing or after it?" Anas replied, "Before bowing." I added, "So and so has told me that you had informed him that it had been after bowing." Anas said, "He told an untruth (i.e. "was mistaken," according to the Hijazi dialect). Allah's Messenger (ﷺ) recited Qunut after bowing for a period of one month." Anas added, "The Prophet (ﷺ) sent about seventy men (who knew the Qur'an by heart) towards the pagans (of Najd) who were less than they in number and there was a peace treaty between them and Allah's Messenger (ﷺ) (but the Pagans broke the treaty and killed the seventy men). So Allah's Messenger (ﷺ) recited Qunut for a period of one month asking Allah to punish them."

حَدَّثَنَا مُسَدَّدٌ، قَالَ حَدَّثَنَا عَبْدُ الْوَاحِدِ، قَالَ حَدَّثَنَا عَاصِمٌ، قَالَ سَأَلْتُ أَنَسَ بْنَ مَالِكٍ عَنِ الْقُنُوتِ،‏.‏ فَقَالَ قَدْ كَانَ الْقُنُوتُ‏.‏ قُلْتُ قَبْلَ الرُّكُوعِ أَوْ بَعْدَهُ قَالَ قَبْلَهُ‏.‏ قَالَ فَإِنَّ فُلاَنًا أَخْبَرَنِي عَنْكَ أَنَّكَ قُلْتَ بَعْدَ الرُّكُوعِ‏.‏ فَقَالَ كَذَبَ، إِنَّمَا قَنَتَ رَسُولُ اللَّهِ صلى الله عليه وسلم بَعْدَ الرُّكُوعِ شَهْرًا ـ أُرَاهُ ـ كَانَ بَعَثَ قَوْمًا يُقَالُ لَهُمُ الْقُرَّاءُ زُهَاءَ سَبْعِينَ رَجُلاً إِلَى قَوْمٍ مِنَ الْمُشْرِكِينَ دُونَ أُولَئِكَ، وَكَانَ بَيْنَهُمْ وَبَيْنَ رَسُولِ اللَّهِ صلى الله عليه وسلم عَهْدٌ فَقَنَتَ رَسُولُ اللَّهِ صلى الله عليه وسلم شَهْرًا يَدْعُو عَلَيْهِمْ‏.‏
Reference : Sahih al-Bukhari 1002
In-book reference : Book 14, Hadith 13
USC-MSA web (English) reference : Vol. 2, Book 16, Hadith 116
  (deprecated numbering scheme)