As the threats posed by computer hackers have metastasized, some businesses are realizing that even the best security technology won't keep their systems safe. So they're trying a different approach: training tech staffers to think like the bad guys.

This approach was on display during a recent weekday in a small conference room in Redwood City, Calif. At the front of the room, instructor Keatron Evans was holding court with a group of seven information-technology professionals. Mr. Evans explained to the group that the classroom's...