The more ubiquitous cameras become, the less we're aware they're even there. They stare out at us blankly from our phones and laptops, our Xboxes and iPads, a billion eyes and ears just waiting to be turned on. But what if they were switched on—by someone else—when you least expected it? How would you feel, how would you behave, if the devices that surround your life were suddenly turned against you?

It's a question that James Kelly and his girlfriend, Amy Wright, never thought they'd have to entertain. But one instant message changed everything. Amy, a 20-year-old brunette at the University of California at Irvine, was on her laptop when she got an IM from a random guy nicknamed mistahxxxrightme, asking her for webcam sex. Out of the blue, like that. Amy told the guy off, but he IM'd again, saying he knew all about her, and to prove it he started describing her dorm room, the color of her walls, the pattern on her sheets, the pictures on her walls. "You have a pink vibrator," he said. It was like Amy'd slipped into a stalker movie. Then he sent her an image file. Amy watched in horror as the picture materialized on the screen: a shot of her in that very room, naked on the bed, having webcam sex with James.

Mistah X wasn't done. The hacker fired off a note to James's ex-girlfriend Carla Gagnon: "nice video I hope you still remember this if you want to chat and find out before I put it online hit me up." Attached was a video still of her in the nude. Then the hacker contacted James directly, boasting that he had control of his computer, and it became clear this wasn't about sex: He was toying with them. As Mistah X taunted James, his IMs filling the screen, James called Amy: He had the creep online. What should he do? They talked about calling the cops, but no sooner had James said the words than the hacker reprimanded him. "I know you're talking to each other right now!" he wrote. James's throat constricted; how did the stalker know what he was saying? Did he bug his room?

They were powerless. Amy decided to call the cops herself. But the instant she phoned the dispatcher, a message chimed on her screen. It was from the hacker. "I know you just called the police," he wrote. She panicked. How could he possibly know? She ran into her bathroom and slammed the door behind her. As she pleaded for the police to come quickly, she reached into the shower and cranked the water all the way up, hoping the hacker couldn't hear her.

···

The campus police were in no position to handle a case like this. Whoever devised the malware—a sophisticated program capable of dodging antivirus software—clearly had a leg up on university cops. The task of hunting him down fell to agents Tanith Rogers and Jeff Kirkpatrick of the FBI's cyber program in Los Angeles. Since its founding in 2002, the program's cyber squads have worked out of a cluttered, bustling office on Wilshire Boulevard, a maze of cubicles that looks more like the office of a video-game company than of a federal agency. Bookshelves spill with tomes on hacking and programming. A black T-shirt on a hook bears a bloody chain saw and the words IN CASE OF ZOMBIES.

Kirkpatrick and Rogers had developed a reputation as the unit's own Mulder and Scully, tech-savvy agents who play to each other's strengths. Rogers, a thirtysomething who wears her blond hair pulled back in a bun, honed her skills as an interviewer during her nearly nine years as a police detective in Washington State. Kirkpatrick, a programming expert, spent over a decade working in information security in the private sector. While Rogers often takes the lead consoling victims and grilling suspects, Kirkpatrick can wade through thousands of lines of code to find the slightest abnormality. The agents had worked some of the biggest cases to come through the cyber program, taking down the stalker of ESPN sportscaster Erin Andrews and busting up Operation Phish Phry—one of the largest online fraud rings ever, which netted the crooks about $1.5 million.