One of the key bit of the story in Star Trek Into Darkness is the militaristic paranoia of Admiral Marcus. Convinced that war with the Klingons is inevitable, he resorts to cooking all the tools he can imagine, and in the process recruits 20th century superman Khan from cryosleep. It's the headquarters of Section 31, not some simple Starfleet archives, that Khan destroys in retaliation for the apparent loss of his fellow sleepers.
What's Section 31? It's the CIA/MI6/Mossad of Starfleet, first introduced in the Deep Space Nine episode "Inquisition" from the fifth season. Section 31 agent Luther Sloan seeks to recruit Dr. Julian Bashir (who is himself a product of genetic manipulation like Khan; another installment of this informational series could feature the Star Trek history of biogenics). Bashir is horrified and rejects Sloan's offer, but that's not the end of it.
In the seventh season, in the thick of the Dominion War, Sloan takes no chances and this time forcibly recruits Bashir to manipulate the Romulans (which was a thing DS9 did really well, previously and more memorably in the siring Sisko spotlight "In the Pale Moonlight") in "Inter Arma Enim Silent Leges" (Latin for "in times of war the law falls silent").
Late in the season and in one of the final episodes, "Extreme Measures," Bashir gets the Sloan monkey off his back.
Late in Enterprise, Section 31 is revealed to have had a long history in Starfleet. Malcolm Reed was always a secretive fellow, but we didn't learn until the fourth season that he'd served with Section 31 early in his career. This became an issue when the agent known only as Harris shows up in another Klingon crisis (one that solved the smooth forehead/ridged forehead mystery and also involved genetic manipulation that tied directly into Khan's origins, by the way), "Affliction"/"Divergence," and attempts to act like a regular Sloan and force Reed back into service.
A few episodes later, in "Terra Prime"/"Demons" (which also featured, incidentally, actor Peter Weller, just like Into Darkness), Harris pops up again, this time to Reed and the rest of Captain Archer's crew's advantage. Sometimes even the bad guys can work to your advantage. And that's exactly what Admiral Marcus thought...
(Incidentally, while I'm dropping knowledge on you, hiding secret fleets was also the subject of the DS9 episode "Defiant," which featured another Star Trek character's double. Just as there ended up being two Spocks, there are technically two Rikers running around. Transporter duplicate Thomas Riker defected to the terrorist group the Maquis. These guys hated the Cardassians, and embarrassed them into admitting they had been amassing something very much like what Marcus had. This got very awkward when the Cardassians joined with the Romulans for a trip through the wormhole, where the combined fleet was destroyed by the Dominion. And then the Cardassians joined the Dominion. In hindsight it sort of makes sense.)