To all appearances, 26-year-old Blake Benthall was living the Silicon Valley dream. He drove a $127,000 Tesla Model S and spent his days working as a contractor for companies that included Close, a secretive startup founded by former Googlers.

But according to federal prosecutors, he played another role that was hidden even from his colleagues at Close. By night, the authorities say, he was pulling in hundreds of thousands of dollars running the Silk Road 2, the illegal online drug bazaar created in the wake of the Silk Road's shutdown last year.

Benthall's story—or what we know of it from the public record—shows that crime in the internet age often brews where we least expect. The same skills that can help launch a modern startup can build something that runs afoul of the law. This is particularly true after the rise of bitcoin, the digital currency that has revamped the way we move money online, often several steps ahead of regulators and other authorities.

Benthall, a keyboardist and Radiohead fan, who considers Edward Snowden a "hero," describes himself on his Twitter profile as a "rocket scientist" and "bitcoin dreamer." He's active on GitHub, the social coding website that's de rigeur for high-tech programmers, and he's a fan of hackathons. Earlier this year, he spent days on a startup bus filled with coders and entrepreneurs, rolling from San Antonio to Austin's South by Southwest conference, creating a new business idea en route. A few years ago, he wrote a fun little program dubbed TweetCall, which lets you call an 800 number and convert whatever you say into the phone into a tweet.

"He just seemed like a regular programmer dude," says a programmer who knew Benthall casually. He describes Benthall as an extremely focused coder with a tendency to take control of projects. Other than the Tesla, Benthall didn't appear to be remarkably rich, or the kind of guy who would have $100,000 in cash lying around his house, as prosecutors allege.

He was a talented developer but a renegade and a "terrible team player at work," according to one Redditor who claims to have worked with Benthall. The alleged Silk Road 2 mastermind's LinkedIn profile says he worked short stints at a grab-bag of tech companies, including Elon Musk's SpaceX.

We don't know exactly when he worked there, or what he did for Close—just that he was a contract software developer—but we know a little more about the company. Close CEO Falson Fatemi didn't respond to our messages seeking comment, but in her online bio, she describes it as "a stealth startup of ex-Googlers backed by NEA, Felicis Ventures, Mark Cuban, Dave McClure, and more." And it would seem the company aims to provide a kind of software plug-in that helps you make sense of your far-flung social network connections.

In a 2012 blog post describing the "future I want to help create," Fatemi said she'd like to improve the intelligence of social networks. "I have so many connections on various platforms to the point that I don't know who I know anymore," she wrote. "I want technology that provides me with information on who I know, how often I communicate with them and on what platform, and generates my circles of friends automatically."

We probably wouldn't have known about Close if not for Benthall's arrest. The company makes a cameo in the Silk Road 2 charging documents. According to the documents, Benthall was hosting the Silk Road 2 server on a subdomain of the close.co internet address, which until Thursday was used by the startup.

In late May, after Benthall had left SpaceX, federal investigators snagged the server running the Silk Road 2. It had been tucked into a data center somewhere beyond US jurisdiction, but the feds got at it anyway. They had to take the computer offline for a few hours to copy its contents for forensic investigation.

During that time, the site's administrator, known as "Defcon"—the feds claim this is Benthall—may have experienced a mild panic attack. His internet service provider pumped out dozens of warning messages, warning that the Silk Road 2 server was offline. "Our server srv2.close.co has not been responding for several hours. Do NOT reboot the machine, there is a critical process we need to watch," Benthall allegedly said to the ISP.

But Fatemi apparently knew nothing about this server running on her company's Close.co domain. Benthall's arrest took her by surprise. "I just can't believe this," she wrote on Twitter on Thursday. "I've worked with Blake in the past and this seems out of character."

Kevin Poulsen contributed to this story.