For anyone who was having trouble using the internet on Friday, it’s because of a widespread DDOS attack on an internet infrastructure company called Dyn. By attacking the DNS product, which helps associate an IP address to a domain name, many of the biggest sites went down. The attack was executed by infecting hundreds of thousands of internet-connected devices, which then hit Dyn’s network.

Now, you might be asking yourself, what does that have to do with BlackBerry Ltd.  (TSX:BB)(NASDAQ:BBRY)?

Quite a bit actually … We’re moving toward a world where there will be more devices connected to the internet, not fewer. That means that each of these devices, once connected to the internet, are a potential target for infection by malware. This Internet of Things (IoT) world is going to bring billions of new devices online.

Fortunately, BlackBerry is a security company that has an operating system called QNX, which is built specifically for the IoT. Therefore, attacks like this are a reminder that it is imperative that the software within all of these connected devices is as tight and secure as possible.

But how big of a market is it?

According to research firm Gartner, there will be 25 billion devices connected to the internet, which will generate revenue of US$300 billion. Cisco is even more bullish. It believes there will be 50 billion devices over the next five years and by 2024; the incremental revenue will be US$19 trillion. That’s not to say that BlackBerry is going to generate all of that money itself, but it will generate some.

Ford has already integrated the QNX operating system into some of its cars, which will help ensure that the vehicles are safe. No one wants their car to be hacked.

Here’s the thing, though. The IoT business is still very early on and while many are bullish, people typically overestimate what will happen in the short term and underestimate what will happen in the long term. So, with that in mind, we have to ask how BlackBerry is doing as a whole.

In September, BlackBerry announced that it would no longer be creating new devices. The CEO said in an interview, “the phone market on the high end is saturated.”

This is good news for the company because now it can focus on other opportunities–specifically, in the software space. According to one analyst, its portfolio of patents could help it generate US$400 million a year. And it brought on 3,000 enterprise clients in the most recent quarter with 81% of its software revenue recurring. And it recently acquired a cybersecurity consultancy in the U.K., which should help it bolster its offerings (especially after the Dyn attack).

So, should you buy? BlackBerry is an interesting company with a lot of baggage to get rid of. While I think it has a bright future as a software company, it could be turbulent on its way to achieving positive free cash flow and EBITDA by 2017. However, if you can stomach that, I think BlackBerry is a great buy.

Stock buy alert hits astounding 96% success rate!

The hand-picked investing team inside Stock Advisor Canada recently issued a buy alert for one special type of "bread-and-butter" stock where The Motley Fool U.S. has banked profits on 23 out of 24 recommendations. Frankly, with an astounding 96% success rate that has delivered average returns of 260%, chances are this new pick could deliver life-changing returns as well. Because the team at Stock Advisor Canada fully embraces the same time-tested investing philosophies that have led to countless Motley Fool winners globally. So simply click here to unlock the full details behind this new recommendation and join Stock Advisor Canada.

*96% accuracy includes restaurant stock recommendations from Motley Fool U.S. services Stock Advisor, Rule Breakers, Hidden Gems, Income Investor and Inside Value since each services inception. Returns as of 5/27/16.

NEW! This Stock Could Be Like Buying Amazon In 1997

For only the 5th time in over 14 years, Motley Fool co-founder David Gardner just issued a Buy Recommendation on this recent Canadian IPO.

Stock Advisor Canada’s Chief Investment Adviser, Iain Butler, also recommended this company back in March – and it’s already up a whopping 57%!

Enter your email address below to claim your copy of this brand new report, “Breakthrough IPO Receives Rare Endorsement.”

Fool contributor Jacob Donnelly has no position in any stocks mentioned. David Gardner owns shares of Ford. The Motley Fool owns shares of Ford.