Just Tech Me At
April 14, 2023
(updated July 11, 2023)
This series of articles will cover some of the aspects of blue team (defensive) operations. While there are many components of blue team operations, these articles will address 4 key activities of defensive cybersecurity and give you foundational knowledge on the topic. The activities are as follows:
We'll now explore some of the most commonly used Linux commands and tools employed by blue teams for patch management.
Defensive Activity:
Apply operating system and application updates to close security vulnerabilities.
Disclaimer: This site does not any encourage unethical hacking behavior. In fact, the cybersecurity articles posted on the website focus on defensive security (blue team operations). Vulnerability exploitation is not a topic covered on this website. If you haven't already done so, start your cybersecurity journey by reading and understanding ethical hacking concepts.
Keeping your Linux system up-to-date with the latest security patches and bug fixes is a critical component of any effective cybersecurity strategy. Without proper patch management, your system can be vulnerable to a wide range of security threats, including malware, viruses, and other types of attacks. Package installation is a common operational task. However, when security vulnerabilities are discovered in software packages, the developers of these packages often release patches to fix the issues. Patch management involves identifying and installing these updates to ensure that the software remains secure and protected against potential exploits.
Linux has built-in package management systems that can be used to update and manage software packages (including security patches). These package management systems typically have command-line interfaces that can be used to install, update, and remove packages. Package managers like apt-get, yum, and dnf provide a convenient and efficient way to manage software patches by automating the process of downloading, installing, and updating packages. These tools can be used to keep track of available patches, install patches for known vulnerabilities, and ensure that all software packages on the system are up-to-date and properly patched.
In addition to these package management commands, there are also third-party tools that can be used for patch management on Linux, such as Ansible, Chef, and Puppet. These tools can automate the process of updating and managing packages across multiple systems, and can provide more advanced features for patch management, such as patch scheduling and reporting.
By keeping software packages up-to-date with the latest patches, Linux users can help reduce the risk of cyber attacks and protect their systems from security vulnerabilities. Patch management is an ongoing process that requires regular updates and monitoring to ensure that the system remains secure against new and evolving threats. Using these tools can help ensure that your Linux system remains secure and protected against the latest cybersecurity threats.
Note that each of the tools listed below comes with a multitude of commands that can be used for patch management in Linux. Furthermore, each command has many options and variations.
The examples provided will merely introduce the package management system and its syntax. Consult the documents for a full description of available commands and command options.
In our code examples, we will use Wireshark, a network monitoring tool. The codes provided will show you how to install and later update/upgrade the Wireshark package so that it stays up-to-date and with all necessary patches offered by its developers.
apt-get - used to install and update packages on Debian-based systems (e.g. Ubuntu)
Difference Between Updating and Upgrading Packages:
With Debian-based systems, there is a difference between an update and an upgrade request.
An example of an apt-get request that you might run is the installation and later upgrading of Wireshark. The commands are as follows:
sudo apt-get install wireshark
Before "updating" your package, refresh your package list with the following command:
sudo apt-get update
Upgrade all packages with the following command:
sudo apt-get upgrade
Upgrade Wireshark only with the following command:
sudo apt --only-upgrade install wireshark
yum - used to install and update packages on Red Hat-based systems (e.g. CentOS)
The yum update command not only updates the package lists but also upgrades any installed packages to their latest available version. So, you can use the yum update command to upgrade your Wireshark installation to the latest version available in the repositories.
To install a packagle like Wireshark using yum, run the following command:
sudo yum install wireshark
Before "updating" your package, refresh your package list with the following command:
sudo yum check-update
Now "update" the package using the following command:
sudo yum update wireshark
dnf - used to install and update packages on newer Red Hat-based systems (e.g. Fedora)
To install a package like wireshark using dnf, issue the following command
sudo dnf install wireshark
Before "upgrading" your package, refresh your package list with the following command:
sudo dnf check-update
Now "upgrade" the package using the following command:
sudo dnf upgrade wireshark
Difference between yum, apt-get, and dnf
pacman - used to install and update packages on Arch Linux
pacman is the package manager for Arch Linux and its derivatives, such as Manjaro. It uses the Arch package format and can manage local and remote repositories, as well as install, update, and remove packages and their dependencies.
sudo pacman -S wireshark
Note that the -S option is an important part of the pacman package management tool, used to synchronize, search, download, and install packages and their dependencies from remote repositories.
Before "upgrading" your package, refresh your package list with the following command:
sudo pacman -Sy
Now "upgrade" the package using the following command:
sudo pacman -Syu wireshark
zypper - used to install and update packages on SUSE Linux
zypper is the default package manager for openSUSE and is similar to yum and dnf. It uses the RPM package format and can manage local and remote repositories, resolve package dependencies, and install packages and their dependencies.
sudo zypper install wireshark
Before "upgrading" your package, refresh your package list with the following command:
sudo zypper refresh
Now "upgrade" the package using the following command:
sudo zypper update wireshark
Patch management is an essential part of any effective cybersecurity strategy. Linux users have a wide range of powerful tools at their disposal for managing patches and keeping their systems secure. By using tools like apt-get, yum, dnf, and zypper, and following best practices for patch management, Linux users can ensure that their systems remain up-to-date with the latest security updates and bug fixes. Some of these best practices include regularly checking for updates, installing only trusted software, and keeping a backup of important data. Additionally, users should be aware of the risks associated with not patching their systems, such as the potential for data breaches and other security threats. With the right tools and strategies in place, Linux users can help ensure that their systems remain secure and protected against the latest cybersecurity threats.
A1: Patch management is the process of regularly updating software applications, operating systems, and firmware to address vulnerabilities, fix bugs, and improve overall system security. It involves identifying, testing, and deploying patches to mitigate security risks and keep systems up to date.
A2: Patch management is crucial for cybersecurity due to the following reasons:
A3: Patch management can present various challenges, including:
A4: Best practices for patch management include:
A5: Various tools can aid in patch management, such as:
A6: Patching frequency depends on factors such as the criticality of the systems, the potential risk exposure, and the availability of patches. However, it is generally recommended to regularly apply patches as soon as they become available, especially for critical security updates.
A7: In rare cases, patching can cause system disruptions or compatibility issues. That's why testing patches in a controlled environment is important before deploying them to production systems. Monitoring and having a rollback plan can help mitigate any unforeseen issues.
A8: Utilize patch management tools that allow centralized monitoring and deployment, automate patching processes, and provide reporting capabilities. Regularly audit and review patch compliance to ensure all systems are up to date.
A9: Yes, organizations can choose to outsource patch management to specialized managed service providers (MSPs) or security vendors who offer patch management services. This can help alleviate the burden of patch management tasks and ensure effective and timely patching.
A10: Vulnerability management involves identifying, assessing, and prioritizing vulnerabilities. Patch management is a component of vulnerability management that focuses on addressing vulnerabilities by applying patches. Both processes work together to enhance overall cybersecurity by mitigating risks and reducing vulnerabilities.
For more articles on Cybersecurity, see the following:
Let Tutorials Point get you on your way. Visit and enroll today!