At first glance, the headquarters of today's corporate-intelligence companies look just like the offices of law firms. If you visit the watercoolers, however, you're likely to find people chatting about ways to fish for data on Facebook. The conference room might be littered with "actionable intelligence" from a packaged-food company's recent marketing meeting, notes about new products and pricing snatched from a hotel ballroom. The closets no doubt hold the remnants of disguises—a bicycle courier's helmet and pouch, say, or garment bags from Barneys.

Some setups are complex. The CIA guys love to create "backstops"—paper companies with all the markings of legitimate enterprises, fake investment firms (usually with British-sounding names like Chislehurst Capital) complete with Manhattan offices, phony business cards, and vague yet professional-looking websites. (Some are even registered with the Delaware secretary of state.) The creators of these Potemkin funds schedule pitch meetings with corporate executives hungry for capital. They almost always take the bait, freely sharing their strategic plans with people they hardly know. It's an inexpensive ruse, and most security companies leave the fronts in place for future cases.

More often than not, though, the key to success is simple ingenuity. Sarah once worked for a food conglomerate eager to learn about the products in its rival's pipeline. "I started volunteering at an inner-city school through the Junior Achievement program," she says. "As soon as I had earned the confidence of administrators, I wrote the target company's public-relations department to say I had some high-school students who wanted to see firsthand how a food company worked. Could we tour their facility? On the way to the factory, I prepped the kids to ask all the questions my client had asked me: 'Are you going to start making your foods with zero trans fats? Are you going to re-label the products as healthier?' The company answered all the kids' questions without paying any attention to me."

For the most part, the work is rewarding—like getting paid to solve a puzzle—but you have to be willing to get your hands dirty. In the interest of self-preservation, my colleagues and I try to stay within the law—no stealing, no trespassing, no wiretaps (that's where Steven Seagal's pal Anthony Pellicano made his mistake)—but that leaves a lot of gray areas. You don't want to do anything that might land you in the newspaper, in a courtroom, or in front of a congressional committee. And yet, every once in a while, you pay someone to sleep with the homely sister of a CEO's nemesis and pump her for information. A Hollywood agent once text-messaged me while she was on a date to ask, "Does this guy own or lease his Mercedes?"