In 2009 a story broke about an underground group called DarkMarket —the so called eBay for criminals, a very tight group that traded stolen credit card numbers and identity theft tools, as well as the items needed to make fake credentials and more.
An FBI agent by the name of J.Keith Mularski went under deep cover and infiltrated the DarkMarket site. After a while, Agent Mularski was made an administrator of the site.
Despite many trying to discredit him he hung in for more than three years as the admin of the site.
During this time, Mularski had to live as a malicious hacker, speak and act as one, and think as one. His pretext was one of a malicious spammer and he was knowledgeable enough to pull it off.
His pretext and his social engineering skills paid off because Agent Mularski infiltrated Darkmarket as the infamous Master Splynter, and after three years was essential in shutting down a massive identity theft ring.
They three-year social engineering sting operation netted over 59 arrests and prevented over $70 million in bank fraud. This is just one example of how social engineering skills can be used for good.