Security breaches are making the news these days. On a regular basis, even. There are plenty of losers in these attacks, but a few winners as well.

Source: Target

Last fall, Target (NYSE: TGT) was hit by a ring of credit card hackers. By messing with the software of checkout registers in Target's stores, the thieves absconded with more than 40 million consumer credit card numbers. Target's CEO resigned over this debacle, and the company is still suffering from the attack's lingering effects. Experts say that hackers reached the cash registers by way of an air conditioning systems contractor with access to Target's information infrastructure.

In June, Chinese restaurant chain P.F. Chang's disclosed a similar data breach. This attack affected 33 of P.F.Chang's 200 locations, impacting an unknown number of credit and debit cards. Like Target, P.F. Chang's apologized profusely and offered free credit monitoring services to affected customers. The company also shut down its breached card processing systems, moving back to manual processing of all card payments until the affected systems had been replaced.

This week saw a triple whammy in headline-making data security breaches.

Home Depot (NYSE: HD) reported another credit card heist, reportedly by the same gang that launched the Target and P.F. Chang attacks.

Separately, several celebrities had their personal photos extracted from Apple (NASDAQ: AAPL) iCloud backups, then published for the world to see.

Elsewhere, one server for the Healthcare.gov sign-up site was breached by unknown hackers. That particular system didn't contain any sensitive data, and the hackers walked away empty-handed. Still, the incident raised eyebrows over Obamacare's information security.

This is by no means a complete list of major security breaches over the last year. These incidents are simply signs of a much broader problem, as data security is becoming a top priority for consumers and businesses alike.

Winners and losers
For consumers, these data breaches raise the specter of lost privacy and the dangers of a cashless society. For the actual targets of these attacks, they provide a good reason to review, refresh, and upgrade security systems.

And of course, that opens up an opportunity for the security experts who provide safer systems.

For example, VASCO Data Security (OSPN -0.40%) provides modern security systems to financial institutions. These solutions include two-factor authentication keys and digital signatures.

The company highlighted the Target breach as a driver of strong first-quarter results. VASCO is also jumping on social media channels to highlight the benefits of stronger security, illustrated with all the latest hacking examples. VASCO shares have more than doubled year to date thanks to stirring interest in high-quality data safety systems.

Fortinet (FTNT 0.28%) also sells endpoint security product, like VASCO. But the company's real focus is on the network behind the scenes, where sophisticated firewalls and threat detection systems can catch the same hacking attempts from a different angle.

Fortinet CEO Ken Xie highlighted strong demand from the retail sector when his company beat earnings estimates in the January 2014 report. "We do see more strong demand in the retail space to be more secure, especially a lot of online transaction, all these kinds of things," Xie said in response to an analyst question regarding the impact of attacks like the Target heist.

And like VASCO, Fortinet has been crushing the market in recent quarters. The stock has gained 37% in 2014.

VDSI Chart

VDSI data by YCharts

Investing in data security experts when consumers and enterprises are under attack may seem cynical. On the flipside of that argument, these companies are working to eliminate the security threats around us. Either way, you could think of security specialists as a kind of "sin stock" investment, where the product will always be in high demand for all the wrong reasons.