Remember BlackBerry? The stock is enjoying a renaissance lately, surging nearly 10% in the past week and almost 50% this year. But this isn't Barack Obama's or Kim Kardashian West's BlackBerry.
The former mobile king, whose addictive QWERTY keyboard phones were once so popular with politicians, celebrities and traders that they were known as CrackBerries, now outsources the manufacturing of its namesake phones.
BlackBerry (BBRY) realized it wasn't going to win the device battle against Apple (AAPL) and the army of companies making phones that run on Google/Alphabet's (GOOGL) Android.
So BlackBerry, under CEO John Chen, has made a successful transition to software and connected devices, aka the Internet of Things. Software and services now account for about 60% of BlackBerry's overall sales.
The company has made particularly big inroads in telematics, running software for cars. Ford, GM, Fiat Chrysler, Honda and Toyota are all customers.
This focus may be the main reason why BlackBerry's stock has rallied so sharply this week. Shares rose above $10 for the first time in two years.
Cybersecurity is also a key business line for BlackBerry. It always has been.
A top-notch reputation for security is a main reason why governments and Wall Street firms stuck with BlackBerry even as consumers were flocking to touchscreen smartphones.
Related: BlackBerry soars on strong outlook
And security is once again a hot trend for investors following the WannaCry ransomware attacks that began last week. Shares of several cybersecurity stocks and ETFs that own them have surged since WannaCry started to infect PCs and other devices.
BlackBerry gets a piece of the cybersecurity pie (sorry) too. It reminded its customers (and perhaps investors as well) of its ability to help minimize the damage from attacks like WannaCry.
The company posted on its Inside BlackBerry corporate blog this week that it has tools to help businesses spot missing patches that can let viruses and other malware through. And it warned that more attacks like WannaCry are likely to come.
"The reality is that WannaCry is just the tip of the iceberg. Cyberattacks continue to increase exponentially in size and frequency, causing billions of dollars in damage to our governments, businesses and society," BlackBerry wrote.
"As we move towards the Internet of Things, these types of attacks will only get worse, threatening not just our privacy and security but also our personal safety," the company added.
Sounds scary. But it's good for BlackBerry's business. Chen told investors in March that BlackBerry should actually be back in black this year. It expects to report an annual profit after a series of losses.
Related: WannaCry cyberattack gives big boost to security stocks
BlackBerry is no longer burning cash and in danger of going under either. It wasn't that long ago, that investors were worried BlackBerry would run out of money. Some speculated it would have to sell to a larger tech firm in order to survive.
But BlackBerry finished last quarter with $1.7 billion on its books, up nearly $90 million from the end of November.
So don't be surprised to see BlackBerry's stock continue to ripen (sorry again) the next time there is another big cyberattack. The company is in a good position to capitalize on the growing threat of ransomware and other malicious bugs.