The WannaCry ransomware (a type of malicious software) has affected hundreds of thousands of computers and bank ATMs across 150 countries. The malware encrypts the files on a user's system and then displays a message demanding ransom to decrypt the infected files.

Not surprisingly, the ransomware attack has pushed cybersecurity stocks higher. For instance, shares of FireEye (NASDAQ:FEYE) have jumped close to 10% since reports of the cyber attack surfaced on May 13, with Goldman Sachs putting out a note that it could be one of the prime beneficiaries of the hacking.

But is it a good idea to buy FireEye based on this one incident, despite its huge losses, or should investors look at Check Point Software Technologies (NASDAQ:CHKP), given its focus on growing its bottom line? Let's find out.

Image of a hacker in a hoodie.

Image source: Getty Images.

The case for FireEye

Goldman Sachs analyst Gabriela Borges believes that FireEye's incident response business will receive a boost, thanks to its robust reputation and product development in this space. As it turns out, the cybersecurity specialist recently launched an integrated platform called Helix to provide users with an end-to-end solution that acts intelligently to detect and prevent threats.

More specifically, FireEye's latest solution is aimed at separating false alarms from the real threats, allowing organizations to detect, prevent, or fix malware attacks in a short time by combining artificial intelligence with other techniques. This could be a key selling point for this product, as the global median time taken to detect a threat is a long 99 days at present, which FireEye claims to reduce to just minutes.

As it turns out, Helix had already been adopted by four customers, including two new ones, on the day it was made commercially available. This helped the company add a total of 237 new customers during the first quarter. Therefore, it won't be surprising if FireEye is able to use the latest malware attack to its advantage and accelerate its turnaround by adding more customers.

The case for Check Point

Check Point Software could be another potential beneficiary of the cyber attack, as it is already working to thwart the threats posed by new variants of the ransomware. In fact, the company claims that its services, such as Sandblast Agent, come pre-built with anti-ransomware technology, which users can't disable even if they want to. This allows Check Point to protect its customers' machines and even recover their data in case of an attack.

Furthermore, Check Point claims that none of its clients were affected by the WannaCry hacking attack, per the company's last assessment as of this writing.

Check Point's customers are already spending more money on its services to better protect themselves against cyber attacks. For instance, the company closed 50 deals valued at $1 million-plus during the last reported quarter, up 16% from the prior-year period, thanks to the adoption of its advanced threat protection packages. It won't be surprising if the dollar value of its deals continues to climb going forward, as its products seem to have performed well during the hacking.

The better bet

Evidently, both FireEye and Check Point can take advantage of the WannaCry cyber attack, but there are major fundamental differences between them from an investing perspective. For instance, Check Point Software is already profitable, recording 9% growth in net income to $182.5 million during the last reported quarter. FireEye, on the other hand, reported a net loss of $83 million last quarter, though this did amount to a 47% year-over-year reduction.

FireEye's net loss dropped so drastically because of a 23% decline in the company's sales and marketing expenses and a 32% drop in research and development expenses. Still, sales and marketing currently accounts for a massive 54% of the company's total revenue, which might indicate that it is buying customers instead of focusing on product development.

On the other hand, Check Point Software's selling and marketing expenses are a relatively lower 24% of its revenue. That means it can afford to spend more money on marketing, which was the case last quarter, as this line item increased 16% year over year. What's more, Check Point hasn't lost sight of its product development moves either, as its research and development expenses increased almost 9% last quarter.

Therefore, Check Point Software looks like a better bet given its profitability, which places it in a stronger position to improve investments in sales and product development in order to attract more customers. FireEye could be turning around, as its latest results indicate, but investors shouldn't ignore the fact that it is taking its foot off the gas as far as product development is concerned, putting it at a potential disadvantage in the rapidly evolving cybersecurity industry.

Harsh Chauhan has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Check Point Software Technologies. The Motley Fool recommends FireEye. The Motley Fool has a disclosure policy.