Perhaps one of my favorite books of all time is a little treatise by libertarian economist Walter Block titled Defending the Undefendable. It doesn't just defend a rogue's gallery of society's scalawags; it even elevates them, you might say, to heroic dimensions. I mean, who but a libertarian could praise pornographers and prostitutes, drug dealers and addicts, crooked cops, and blackmailers? There was something in it to offend everyone.

Why mention a political polemic on an investing site? Because the concept of virtue in vice is so closely aligned with investing in companies whose products are anathema to large segments of the population. There's profit to be made in licentiousness. Let's call it socially irresponsible investing.

Profiting from vice
On any decent roster of socially irresponsible companies, an investor would find the likes of tobacco companies, oil companies, liquor and spirits distributors, and a whole host of less-evil outfits like car manufacturers, strip mining companies, forest and paper product companies, and casino and gambling operations. These are companies that often rile one's sense of righteousness. Of course, any number of these could have made investors a ton of money over the years.

Altria (NYSE:MO), formerly known as the tobacco king Philip Morris, has nearly doubled in value over the past five years despite the litigation it has endured. Over the past decade, ExxonMobil (NYSE:XOM) has tripled in value. Casino giant Harrah's (NYSE:HET) has quadrupled.

Unlike Brutus, I come not to stick a knife in these avaricious entities but to praise them. And more than that, I hope to profit from them.

I realize this might be some pretty dark stuff for a relatively family-oriented financial website like The Motley Fool. Yet this is nothing new, really -- nothing that the likes of Peter Lynch hasn't espoused, though perhaps not in such stark terms. He believed that some of the greatest investments were legal businesses that make people "shrug, retch, or turn away in disgust." He used examples of companies that cleaned the grease out of restaurant traps and manufactured products from intestinal byproducts, and while those certainly do have an ick! factor surrounding them, I'm currently on the prowl for something more dissolute than yucky.

It's my belief that that the more reviled a company is, the more potential profit there is in its business, simply because huge swaths of the investing public shun it as an opportunity. Yet unlike Block's "undefendables," these companies perform services and provide products that are not only desired and necessary for our everyday lives, but also legal. Here are a few that seem right to our portfolios, even if they don't seem right to our moral compasses.

Legalized loan sharking
Payday lenders certainly seem to fit our bill for unsavory businesses. Walk in to an Advance America (NYSE:AEA) office with a check for money you don't have, and walk out with a fistful of dollars. A week later, you walk back in with more cash than you received previously and pay off that check you left there. The standard fee is $15 per $100 borrowed, which equals an annual interest rate of about 780% -- pretty steep by any measure. Yet payday lenders really do fill a void. Working-class individuals have essentially been abandoned by banks that no longer make such small loans. Without these cash or check advance centers, cash-strapped people would have no place to turn. A borrower just needs a job and a bank account to get a loan; no credit check is required.

And the numbers speak for themselves. The industry is growing by 20% a year, with same-store sales posting double-digit increases each quarter. Advance America is on track to grow earnings by 35% over the next two years and trades at just 16 times this year's earnings and 12 times next year's earnings. At a current price of just under $13, it has a market cap of $1 billion.

Of course, you could argue that Advance America is a public service to those less fortunate individuals that the banks won't touch, but with an annual interest rate of 780%?

Living the alternative lifestyle
Many people strongly believe in the sanctity of marriage and the wholesomeness of monogamy. There are many people, however, who choose to live outside those traditional norms. The swinger's lifestyle operates just below the veneer of society and is often talked about in hushed whispers. While there are several public companies that cater to this way of life -- operating restaurants, websites, and services geared toward bringing together these like-minded individuals -- it's probably best epitomized by the granddaddy of all such enterprises, the lupine Playboy (NYSE:PLA).

Certainly, founder Hugh Hefner has lived his life alternatively, and his Playboy Mansion is seen as the epicenter of decadence. Yet as the company turns profitable once again, the stock trades at an enterprise value-to-free cash flow ratio of just 5. It's raising subscription prices, bringing its content online, and becoming a place where insiders still own nearly a quarter of the outstanding stock. It recently traded for $15 a share and sports a market cap of under $500 million.

Merchants of death
The debate over whether a handgun is a constitutionally protected right of self-defense or a means for criminals to wreak havoc on the streets is one that doesn't usually end with pleasantries.

While there are certainly better-known brands, the handguns made by Sturm Ruger (NYSE:RGR) are on par with those of their competitors, and some would contend that they exceed the quality of those made by competitors. Equally impressive is the company's 50-year history of profitability, the lack of any long-term debt, and $1.23 in cash per share. Until last week, it also had a $0.10 quarterly dividend, which it chose to temporarily suspend. While potentially troublesome, it also shows the conservative nature of management, which prioritizes keeping the finances of the company in line over the niceties of playing to the likes of Wall Street.

With Congress adopting a ban on frivolous lawsuits targeting gun manufacturers, Ruger will be able to focus more closely on its business of making quality firearms. A measure of uncertainty has been removed from the company's operations that will allow it to improve upon its string of profitable years. At around $8 a share and a market cap of $218 million, it just barely makes the small-cap cut.

A Foolish footnote
Walter Block has noted that by defending pimps, prostitutes, scabs, and slumlords, he wasn't saying their actions were moral or that the individuals should engage in such conduct. Rather, these were non-violent, "victimless" criminals. After all, people voluntarily engage in transactions with them. Particularly notable is that thieves, muggers, murderers, and other violent aggressors are not "defendable" under any sane economic treatise.

The above-mentioned companies are legal entities engaged in legal activities for goods and services that consumers obviously want and are willing to pay for. For investors who can find virtue in vice, a good profit is out there for the taking.

Made a profit from a company whose business you think is unsavory? Why not donate part of the proceeds to charity? The Motley Fool has kicked off its ninth annual Foolanthropy campaign! Nominate your favorite charities on our Foolanthropy discussion board through Nov. 1. For guidelines on what makes a charity Foolish, visit www.foolanthropy.com.

The opinions expressed above are solely those of the author and do not necessarily represent the opinions of The Motley Fool.

Fool contributor Rich Duprey does not own any of the stocks mentioned in this article. The Motley Fool has a disclosure policy.