For those of you who have been reading my blog for some time, you know that I have written about the software supply chain security problem. In a nutshell, the problem is that programmers rarely write code from zero anymore. Instead teams write pieces of code and integrate it. Then there is limited testing due to time and budget. Finally, everyone crosses their fingers and the code is released.
The folks at CCleaner discovered the hard way that it doesn’t always work out the way you expected. Or hoped.
About 6 months ago researchers at Talos (a part of Cisco) and Morphisec discovered that the absurdly popular disk cleaner software CCLEANER had been compromised and was downloading infected software from the official web site and had been doing so for a month.
Worse yet, the code was cryptographically signed, meaning two things. Most users would trust it and the attack happened from within Ccleaner’s four walls.
Finally more details of the story are coming out; useful for anyone else that writes software, for free or for money, and distributes it to outside parties. This could be YOU!
2.27 million infected downloads (in just a month) later, Avast, the owner of Ccleaner is spilling the beans.
Not only is this a software supply chain lesson, but it is also a merger and acquisition lesson because this was discovered right after Avast bought Ccleaner from Piriform.
The attackers had stolen credentials and used them to log into Piriform’s London network using the remote desktop software Team Viewer that Piriform used. From there they infected other computers, only working at night when the computers were likely not used, to avoid detection.
They then installed some malware called Shadowpad, which allowed them, among other things, to log every single keystroke on the infected machines.
Then they waited. Two months after the acquisition closed, they infected the software inside the fence and waited for the infected software to be signed and uploaded to the web.
The attackers were very smart on top of this. While 2.27 million infected copies were downloaded and 1.65 million copies asked the control server for instructions, only 40 payloads, representing 11 highly targeted companies, were activated with a second stage. That is very patient. To be willing to download over two million copies to only infect 40 very precise targets. Those targets were in particular tech companies like Cisco .
Information for this post came from Wired.
So what does this mean for you?
First, if you are acquiring a company – or selling one – this could happen to you. If you are the seller, you could sued for millions. If you are the buyer you could be on the hook for millions. It all hinges on the words in the contract. CONDUCTING SOFTWARE SECURITY DUE DILIGENCE DURING AN ACQUISITION IS VERY IMPORTANT. This is an example of why.
While this is not an example of downloading an infected library, the library did get infected. How did the bad guys infect the code and get it checked in to the official library? How come no review detected the added code that no one officially added? The SECURE SOFTWARE DEVELOPMENT LIFECYCLE process might have caught this.
Could this have been caught during testing? Probably. You would have needed to be watching for where on the Internet that CCleaner was talking to – that it shouldn’t have been. In fact, since it was trying to talk to Russian and Korea, that could have been an alarm bell since the test network likely should never have tried to do that. But you have to be looking for it.
How come the attackers were able to compromise Team Viewer in the first place. My bet is that Piriform was not using two factor authentication. Bad boys and girls. I know two factor is not friendly. Neither is having 2 million infected copies of your software downloaded by your customers.
In the end you need to look at the entire software development process and think like a hacker to decide where he or she could compromise the process.
Obviously, these guys did.
How many other companies are already infected and don’t even know it? THAT IS WHAT IS SCARY!