- Operating system update
- Software updates
- Uninstalling software
- System monitoring and auditing
- Conclusion: safety is a matter of regularity
Many people think that installing antivirus software or choosing the right password is enough to protect their computer. But there's much more to computer security than a simple one-off configuration. The reality is far more complex: the majority of cyber-attacks take advantage of vulnerabilities in outdated systems and software. In other words, computer security also involves regular maintenance of your machine.
In this chapter, I'll take you step-by-step through how to effectively maintain your computer, and minimize the risk of compromise.
Operating system update
As we saw at the start of this course, the operating system manages hardware (processor, memory, disks, peripherals, etc.), executes programs, organizes files and manages network connections. It is therefore a critical component on your machine.
Why update your OS?
Because of its complexity, no OS version is totally free of vulnerabilities. We're talking here about tens of millions of lines of code. These security flaws can be exploited by attackers to execute malicious code, gain unauthorized privileges or compromise the entire system. Some of these vulnerabilities are discovered responsibly by cybersecurity researchers, while others are already being actively exploited without the general public being aware of them: these are known as zero-day vulnerabilities.
Operating system vendors regularly release security updates designed to correct these vulnerabilities. Failure to install these patches is tantamount to deliberately leaving the door open to attacks, even if you think your usage is modest or your data worthless.
It's not just a question of fixing visible bugs, but of acting on your system's attack vectors. The fewer vectors there are, the fewer levers attackers have to compromise your machine.
Specifically, I recommend that you enable automatic updates. This feature is natively available on all modern systems. Windows Update, for example, handles this by default on Windows 10 and 11 machines. On macOS, security updates are integrated into the system update system. On Linux, depending on the distribution used, tools such as
unattended-upgrades (Debian/Ubuntu) or dnf-automatic (Fedora) allow you to schedule updates.Finally, bear in mind that in many cases, certain critical updates only take effect after a reboot. So it's important to reboot your machine regularly, especially after a system update. Updating your operating system often only takes a few minutes, but is one of the most effective bulwarks against many attacks.
How do I update my OS?
Even if automatic updates are enabled on your system, it's still important to check manually, at regular intervals, that there are no pending updates. Let's take a look at how to do this, depending on your system:
- Windows operating system
Windows features a centralized update manager called "Windows Update". This automatically downloads and installs updates, security patches, device drivers, and sometimes even microcode for the processor.
To manually check the status of updates :
Settings → Windows Update → Check for updates
Don't forget to check for optional updates in the same menu.
- Linux operating system
Linux distributions are based on a system of packages maintained by the community and your distribution's maintainers. Updates are applied via the package manager.
Under Debian (i.e. Ubuntu) :
sudo apt update && sudo apt upgrade -y
If you prefer to use a graphical Interface, on Ubuntu there's the Software Updater tool that lets you manage updates easily without going through the terminal.
Under Red Hat (Fedora) :
sudo dnf upgrade
Under Arch Linux :
sudo pacman -Syu
- MacOS operating system
Apple centralizes its system updates in the Interface settings. To check availability:
Apple menu → System Settings → General → Software Update
macOS automatically downloads security, system and application updates via the "Automatic Updates" option in the same menu.
Software updates
Your computer's security doesn't just depend on your operating system. Every piece of software you install represents a potential entry point for attacks. As soon as a program has an uncorrected security flaw, it can be exploited to compromise your system or steal your data.
Some software is more sensitive than others, because it interacts directly with the outside world or manipulates potentially hostile files. Among the most critical software are :
-
Web browsers: they are at the front line of attacks, as they process unverified content in real time and have a particularly large attack surface. What's more, they play a central role in protecting your personal data. And, above all, they tend to replace many software applications formerly used locally (e-mail clients, office suites, media players...). But we'll come back to this point in the next section of the SCU202 course;
-
Mail clients: they receive attachments or links from external sources that are uncontrollable and therefore risky;
-
Communication tools (TeamViewer, Zoom, Signal, Teams...): due to their interactive nature, they are targets for espionage attacks or remote control attempts. In the same way as e-mail clients, communication tools can be used as vectors for phishing attempts or the distribution of malicious attachments;
-
Antivirus, firewall and other detection solutions: these tools generally enjoy elevated privileges, as they continuously scan your files, processes and network connections. An outdated signature base, poor configuration or a vulnerability in the software itself can allow malware to go undetected, or even to gain elevated privileges.
Of course, these risks do not arise solely from poor maintenance, but it is important to pay particular attention to updating these sensitive software programs. I'm simplifying here, but of course, all your other software also needs to be regularly updated. Let's take a look at how to do just that, depending on your operating system.
Under Windows
On Windows 11, the Winget utility is integrated into the system. It allows you to list and update most of the software installed on your computer, directly via the terminal. Simply run Windows PowerShell:
winget upgrade --all
This command queries public repositories for the latest versions of the software you have, and updates them automatically.
Unfortunately, this command doesn't work for all software. That's why I recommend that you keep a list of all your software and manually check for updates on a regular basis, especially for sensitive applications. For the most critical software, such as your antivirus or web browser, I advise you to carry out this check on a daily basis.
Under Linux (Debian/Ubuntu)
The strength of Linux distributions lies in their centralized software management. The package manager (
APT in Debian's case) keeps the system and all installed software up to date via the official repositories.In the same way as for the OS update, to perform a global update of your software, simply run:
sudo apt update && sudo apt upgrade
This basic command refreshes the list of available packages (
apt update) and then applies the necessary updates (apt upgrade).For a more complete update, you can also use this command:
sudo apt update \ && sudo apt full-upgrade -y \ && sudo apt autoremove -y \ && sudo apt autoclean
sudo apt full-upgradeupdates all installed packages, including those that require dependencies to be added or removed.-yallows you to automatically answer "yes" to any confirmation the package manager may ask you for;sudo apt autoremove -y: removes unnecessary dependencies ;- sudo apt autoclean`: cleans the cache of obsolete packages.
If you have software distributed as Flatpak or Snap packages, some update automatically, but you can update them all manually with the command:
flatpak update sudo snap refresh
Under macOS
Software installed via the App Store can be easily updated in the following menu:
Apple menu → App Store → Update All
You can also activate automatic application updates in the App Store settings.
However, not all the applications installed on your Mac come from the App Store. For other applications, you'll have to update them manually. So, as with Windows users, I recommend that you keep a list of all your software and check regularly for new versions, especially sensitive ones like your web browser.
Uninstalling software
From an IT security perspective, the less software you have installed, the fewer potential entry points you have for an attacker. Every application installed on your system may contain security holes, even if you never use it. This is known as the attack surface: the larger it is, the greater the risk. Reducing this surface by removing unnecessary software is a simple but effective preventive measure.
Some pre-installed applications or programs installed for one-off use may remain on your computer for months without being used, while continuing to receive updates or interact with your system. Worse still, if these programs are no longer maintained, they may contain vulnerabilities.
Under Windows
To access the list of installed applications:
Settings → Apps → Installed apps
Go through this list of software and remove anything you no longer use, or don't know what it's for (after a quick internet check if necessary). Be careful with system software, but don't hesitate to uninstall pre-installed games, dubious maintenance tools or marketing applications.
Under Linux (Debian/Ubuntu)
Open a terminal and run the following command to delete a software program:
sudo apt remove name_of_the_software
Then run this command to automatically remove any dependencies that are no longer needed:
sudo apt autoremove
Under macOS
Under macOS, there are 2 main methods: via Launchpad or via Finder. If the application has been downloaded from the App Store, open Launchpad (from the Dock or the
/Applications directory), locate the application, then hold down the Option key or perform a long click until the icons start to shake. Then click on the cross next to the application, and confirm deletion.If the delete button doesn't appear, the application hasn't been installed from the App Store. In this case, use Finder. Close the application first, if it's running. Open Finder, go to the
/Applications directory, select the application you wish to delete, then move it to the recycle garbage can. Finally, empty the recycle garbage can to complete the uninstall.Don't forget browser extensions
Your browser's extensions and add-ons are often overlooked, but they too represent a frequent attack vector. A malicious or outdated extension can intercept your browsing data, inject code or discreetly spy on you.
Go to your browser settings and disable or delete any extensions you don't use or know about. Keep only those that are strictly necessary, from trusted sources and still maintained.
System monitoring and auditing
Cybersecurity also involves monitoring system activity. This proactive approach makes it possible to spot abnormal behavior (suspicious connections, unusual processes, unauthorized access attempts, etc.) early on and intervene before a serious incident occurs.
If you set up an auditing routine (even a basic one) you can detect the presence of malware, sleeping Trojans or spyware at an early stage. Such monitoring can be carried out using specialized tools.
Under Windows
As we saw in the previous section, Windows has historically been more exposed to computer attacks, due to its wide adoption and technical specificities. It is therefore important to complement basic protection with advanced diagnostic tools:
- Microsoft Defender: on Windows, having a good antivirus is a basic necessity. For many years, Microsoft Defender (formerly Windows Defender), the system's built-in antivirus, was considered unreliable, and third-party solutions were recommended instead. But this software has improved considerably over time, and is now, in my opinion, sufficient to provide basic protection for personal use. That said, we mustn't overestimate the role of antivirus software: it's above all your own digital practices that ensure your security. One of Defender's advantages is its native integration with Windows. In addition to real-time protection, it offers comprehensive scans that you can schedule weekly or run manually at regular intervals.
- Sysinternals Suite: this is a much more advanced set of tools offered by Microsoft for diagnosing, monitoring and troubleshooting Windows. Here are the main tools in this suite:
- Process Monitor: allows you to observe active processes, file accesses, registers, etc. in real time;
- Autoruns: displays all programs launched at startup, helping you to quickly detect persistent malware or applications that shouldn't be running;
- Process Explorer: monitors processes and detects suspicious behavior;
- TCPView: visualizes active network connections (detection of abnormal connections);
- Sigcheck: checks digital signatures on files for malicious code.
- GlassWire: a network monitoring tool. It tracks incoming and outgoing connections in real time, and alerts you to unusual activity.
Under Linux
On a well-maintained Linux machine used for personal purposes, the risks are lower. Nevertheless, here are some advanced tools for monitoring your system :
- Fail2ban: monitors system logs for unsuccessful access attempts (such as brute-force SSH login attempts). When suspicious behavior is detected, it temporarily bans the offending IP address via
iptables;
- Lynis: a comprehensive security audit tool that analyzes your system for misconfigurations, known weaknesses or deviations from best practice. It generates an easy-to-read report, with a security score and recommendations.
Under macOS
macOS is renowned for its security, thanks in particular to its application signature policies and relatively closed architecture. For personal use, an up-to-date machine with default settings already offers decent security. To take your system monitoring a step further, I recommend :
- KnockKnock: scans all elements configured to run at startup (agents, daemons, kernel modules...) and identifies those that are potentially suspicious, unsigned or unknown. It allows you to quickly identify malicious persistence on your system.
Conclusion: safety is a matter of regularity
Optimal computer security is not achieved by installing specific tools once, but by regular, rigorous and methodical maintenance. Keeping your operating system up to date, upgrading critical software, deleting unnecessary software and actively monitoring the system are the cornerstones of good maintenance. More generally, these best practices apply to all your digital tools: connected objects, servers, smartphones...
In the next chapter, we'll look at how you can avoid installing malware in practice, by learning how to check the integrity and authenticity of the files you download to your computer.
Quiz
Quiz1/5
scu2023.2
Which software category represents one of the most critical entry points for attacks on a computer?
