Board Thread:Theories and Speculation/@comment-27924662-20160426075538/@comment-362960-20160426140703

Indeed, Yahiko's Pain body was in the mausoleum that Konan put it in, and only Obito had access to it. Konan was presumably thrown into the lake that surrounds Amegakure and thus like Jiraiya was completely inaccessible.

The real question however is both how did Kabuto acquire Nagato's DNA...and how did he know that Nagato was the real Pain? Per chapter 489, he already had Nagato ready to go, only one arc after he died in Konoha. No blood was shed there and Konan took possession of his body before anyone else had access to him. Even Obito didn't know where his body was at that point. Which means that Kabuto or Orochimaru knew that Nagato was the real Pain, long before it was something revealed in the main story. Either Orochimaru figured it out or Kabuto got the information as a spy. It could be that Danzo told Orochimaru when he was working with ROOT, and Orochimaru retrieved Nagato's blood or hair from the battlefield where Hanzo betrayed him.