Chapter 17 of Half-Blood Prince gives us this explanation for how Morfin Gaunt was framed for the murder of the Riddle family:
Voldemort Stupefied his uncle, took his wand, and proceeded across the valley to ‘the big house over the way.’ There he murdered the Muggle man who had abandoned his witch mother, and, for good measure, his Muggle grandparents [...]. Then he returned to the Gaunt hovel, performed the complex bit of magic that would implant a false memory in his uncle’s mind, laid Morfin’s wand beside its unconscious owner, pocketed the ancient ring he wore, and departed.
Harry objects to this story, claiming:
He [Tom Riddle] was underage at the time, wasn’t he? I thought they [The Ministry] could detect underage magic!”
Dumbledore explains this by claiming:
You are quite right — they can detect magic, but not the perpetrator:
This effectively ends the conversation. However, I fail to see how it resolves the problem. My first objection is that if The Ministry specifically detects magic near the underaged, then they should know that somebody other than Morfin was present, raising questions about the events. My second is much more substantial. Chapter 2 of Chamber of Secrets leaves no doubt that when The Ministry detects underaged magic, they can detect the specific spells used:
We have received intelligence that a Hover Charm was used at your place of residence this evening at twelve minutes past nine.
and a very similar case can be found in Order of the Phoenix, differing only in that it specifically identifies Harry as the caster:
We have received intelligence that you performed the Patronus Charm...
So, if it is the case that The Ministry can detect the specific spells that were cast in an area, then how did they not know about the stunning spell and memory modification that Tom Riddle performed, calling in to question Morfin's confessions?
As revealed while discussing the current answers, this situation becomes even worse if we read in to the fact that the letters to Harry gave the time of the spell castings. This means that only does The Ministry apparently know what spells were used, they know the order that they were cast in, up to and including (if Dumbledore's guess is accurate) the time gap between the final murder and the use of the memory-changing spell. I can't quite see Morfin's confession being taken serious in a world where somebody wrote the letter Dear Mr Tom Riddle, We have received intelligence that a Stunning Spell, Avada Kedavra, Avada Kedavra, Avada Kedavra, and, after a break of a few minutes, a Memory Charm was used at....