Ubuntu ‘command-not-found’ tool can be abused to spread malware

Ubuntu 'command-not-found' tool can be abused to spread malware

February 14, 2024 at 11:00AM

A logic flaw in Ubuntu’s ‘command-not-found’ package suggestion system allows attackers to promote malicious Snap packages, posing significant supply chain risks for Linux users. Attackers can exploit typos, unreserved snap names, and unclaimed aliases to trick the utility into suggesting harmful packages. Mitigation steps include package authenticity verification and developer oversight.

Based on the meeting notes, the key takeaways are:

1. A logic flaw between Ubuntu’s ‘command-not-found’ package suggestion system and the snap package repository could enable attackers to promote malicious Linux packages to unsuspecting users.
2. Approximately 26% of Advanced Package Tool (APT) package commands are at risk of impersonation by malicious snap packages, presenting a significant supply chain risk for Linux and Windows Subsystem for Linux (WSL) users.
3. The loophole affects not only Ubuntu but also its forks or other Linux distributions that use the ‘command-not-found’ utility by default, along with the Snap package system.
4. Security risks include lack of validation mechanisms to ensure that suggested packages are authentic and safe, easy publishing of malicious snaps to the Snap Store, and potential abuse of snap interfaces and auto-update feature.
5. Attack methods include associating commands with typing errors with malicious snap packages, registering unclaimed snap names that users might expect to exist, and registering malicious snap packages for legitimate APT packages.
6. Mitigation steps may involve users verifying package authenticity before installation, Snap developers registering alias names similar to their apps, and APT package maintainers registering associated Snap names for their commands.

Please let me know if there is anything else you would like to include in the meeting summary.

Full Article