177629 matches found
Do Not Install the Print Service
A server running Common Unix Printing System CUPS provides print services to other devices on the network. Running the CUPS service requires additional system resources and expands the attack surface. Therefore, do not start the CUPS service in the scenario where the CUPS service is not required...
Disable IP Forwarding
If a node does not function as a gateway server, disable the IP forwarding function. Otherwise, attackers can use the node as a router. In the container scenario, if network packets need to be forwarded through the host, IP forwarding is allowed. SPDX-FileCopyrightText: 2025 Greenbone AG Some tex...
Ensure That Partitions That Do Not Need to Be Mounted with Devices Are Mounted Using nodev
The nodev option specifies that the file system cannot contain device files. It is used to reduce the attack surface and improve security. If a directory is mounted with the nodev option, all device files, such as files of block devices and character devices in the directory, are parsed as common...
Do Not Install the LDAP Service
Lightweight Directory Access Protocol LDAP is a protocol that provides access control and is used to maintain distributed directory information. The LDAP service increases system resource usage and expands the attack surface. If the LDAP service is not required, do not install the LDAP service. T...
Configure the Rotate Policy in rsyslog
rsyslog collects logs from the system and records them in files. logrotate copies and compresses log files periodically and quantitatively to ensure that log files do not occupy too many drive resources or even cannot be maintained. If the rotate policy is not configured for log files, they will...
Ensure That the Password Complexity Is Set Correctly
Simple passwords, including short passwords and passwords containing only digits or letters, are easy to guess by brute force cracking tools. As such, users are required to set complex passwords. For service scenarios with high security requirements, follow industry best practices. For example,...
Receive Remote rsyslog Messages Only on A Specified Log Host
By default, rsyslog does not listen on log messages from a remote system. Log message listening via TCP is performed in a similar way to log message listening via UDP, both requiring rsyslog to load a module, that is, the imtcp.so module and the imudp.so module respectively. The TCP/UDP port to b...
Ensure That the su Command Inherits the User Environment Variables Without Escalating Privileges
The su command enables a common user to have the permissions of the superuser or other users. It is often used for switching the user from a common user to the root user. The su command provides a convenient way for users to change their identities. However, if the su command is run without...
Ensure That Users Are Required to Change Their Passwords Upon the First Login
If a password, such as one reset by an administrator, is not promptly changed in the service environment when it is not set by the user, it may lead to low-cost attacks. Therefore, it is necessary for users to change their password upon their initial login. However, the root user...
Configure TIME_WAIT for TCP
TIMEWAIT indicates the time for TCP to wait for connection destruction. If this parameter is set to a large value, a large number of TCP connections are not closed and DoS attacks occur. You are advised to set this parameter to a value less than or equal to 60. SPDX-FileCopyrightText: 2025...
Configure Proper Cryptographic Algorithms for the SSH Service
As cryptographic technologies develop and computing capabilities improve, some cryptographic algorithms are no longer suitable for today SPDX-FileCopyrightText: 2025 Greenbone AG Some text descriptions might be excerpted from a referenced sources, and are Copyright C by the respective right...
Do Not Install the NIS Server
Network Information Service NIS works in client-server mode. NIS clients running the ypbind daemon obtain information from a server. NIS is inherently insecure and is vulnerable to DoS and buffer overflow attacks. Therefore, do not install the NIS server in the service scenario where NIS is not...
Configure the Default Policies of iptables to DROP Properly
Generally, iptables policies can be configured in allowlist or blocklist mode. You are advised to configure iptables policies in allowlist mode. Connections that do not comply with the rules in the allowlist are prohibited. Therefore, you can configure the DROP or REJECT policy for the INPUT,...
Configure sudoers Audit Rules
The sudo command allows common users to perform privileged operations as the root user, which is highly risky. Though attackers cannot access the root user easily, they can escalate the privilege using the sudo command. You are advised to configure audit for the /etc/sudoers file and the...
Do Not Start the debug-shell Service
The debug-shell service is used to locate faults that occur during system boot. This service is installed with systemd. The debug-shell service requires no authentication, that is, attackers can access the root shell by simply pressing Ctrl+Alt+F9 during systemd startup when the OS is booting. Th...
Configure Proper Policies for INPUT of nftables
The INPUT chain is used to filter packets received from external systems. For any service provided for external systems, configure the corresponding INPUT policy and enable the related port so that external clients can access the service through the port. If the policy is not set, all packets tha...
Ensure That the UIDs Are Unique
The UIDs of users in /etc/passwd must be unique. In the Linux system, user permissions are determined based on UIDs. If multiple users use the same UID, these users have the same permissions and users of the users can access each other SPDX-FileCopyrightText: 2025 Greenbone AG Some text...
Ensure That Passwords Are Encrypted Using Strong Hash Algorithms
For system security, passwords cannot be stored in plaintext in the system and must be encrypted. Irreversible cryptographic algorithms must be used in scenarios where passwords do not need to be recovered. If a password is encrypted with a weak algorithm, attackers can increase the computing pow...
Configure Audit Rules for User Information Changes
Generally, for deployed services, users and user groups do not change. Passwords, however, are changed periodically but not frequently due to validity periods. It is recommended that key authentication and authorization data be audited and monitored so that changes can be traced. Performing attac...
Configure the Scripts Executed by crontab to Be Writable Only by Their Owners
crontab is the configuration file used by the system to execute scheduled tasks. The path of the configuration file is /etc/crontab. With crontab, the OS automatically executes the tasks defined by the administrator based on service requirements. Therefore, the execution scripts or programs...
Do Not Enable the DHCP Service
The Dynamic Host Configuration Protocol DHCP service provides dynamic allocation of IP addresses to machines. Unless a system is the designated DHCP server, you are advised to disable its DHCP service to reduce the attack surface. SPDX-FileCopyrightText: 2025 Greenbone AG Some text descriptions...
Configuring the SSH Service Port Properly
A server typically has multiple NICs and IP addresses. You need to plan IP addresses to determine which ones are used for services or management. Not all IP addresses need to listen on SSH connections. You can specify only some IP addresses to perform SSH connections to reduce the attack surface...
Ensure That the Permissions on Important Files and Directories Are Minimized
According to the principle of least privilege, the minimum access permission must be correctly set for key files or directories in the system, especially those containing sensitive information. Only users with relevant permissions can access these files or directories. If the file or directory...
Ensure That the GIDs Are Unique
The group IDs GIDs in /etc/group must be unique. In the Linux system, user group permissions are determined based on GIDs. If multiple user groups use the same GID, these user groups have the same permissions and can access each other SPDX-FileCopyrightText: 2025 Greenbone AG Some text descriptio...
Configure Audit Rules for Network Environment
Attackers may change the system domain name and host name to launch attacks, such as host spoofing. It is recommended that the user set the audit of system calls setdomainname and sethostname and the audit of the /etc/hosts file to monitor changes in the system domain name and host name. You can...
Configure Proper Policies for OUTPUT of nftables
There are two occasions in which a server sends outgoing packets: 1. The local host process proactively connects to an external server, for example, performing an HTTP access, or sending data to a log server. 2. The local host responds to the external access to the local services. If no policy is...
Do Not Install the TFTP Client
Trivial File Transfer Protocol TFTP is used for file transfer between a Linux server and other servers, desktop systems, as well as terminal devices. TFTP does not support authentication and encryption mechanisms. Data tends to be forged, tampered with, or stolen by attackers during communication...
Do Not Allow Globally Writable Files
Globally writable files can be written by any user in the system, which is generally not needed. If a file is improperly set to globally writable, the file can be easily tampered with by attackers, causing security risks. Therefore, if a file is required to be globally writable, the actual scenar...
Disable the Root User from Logging in to the System Using SSH
The PermitRootLogin parameter in the SSH configuration file /etc/ssh/sshdconfig specifies whether the root user can log in to the system using SSH. The root user is not allowed to log in to the system using SSH. System administrators must use their own user to log in to the system using SSH and r...
Configure a Proper Number of Concurrent Unauthenticated SSH Connections
Without knowing the password, an attacker can set up a large number of concurrent connections that have not been authenticated to consume system resources. The number of concurrent unauthenticated SSH connections is not configured in openEuler by default. You are advised to configure the upper...
Configure Audit Rules for File Access Control Permissions
File access permission control is the basic permission management in Linux. Different users can access different files after being authorized. This prevents sensitive information leakage or file data tampering between users and prevents common users from accessing high-permission files or...
Configure the Authentication Blocklist and Allowlist Properly
SSH provides the blocklist and allowlist function. You can set a list of users or user groups to allow or deny SSH login for them. By default, this function is not configured in openEuler. The related fields are as follows: AllowUsers userlist specifies the space-separated users who are allowed t...
Configure Proper Policies for OUTPUT of iptables
There are two occasions in which a server sends outgoing packets: 1. The local host process proactively connects to an external server, for example, performing an HTTP access, or sending data to a log server. 2. The local host responds to the external access to the local services. If no policy is...
Do Not Install Debugging Tools
Debugging scripts and tools in the service environment may be exploited by attackers to launch attacks. Therefore, do not install any debugging tools or files in the production environment. Such tools or files include but not limited to: code debugging tool privilege escalation commands, scripts,...
Ensure That Soft and Hard Link Protection Is Correctly Configured
In Linux, a soft or hard link is a file pointing to another file target. In other words, the target is opened once the link file is opened. Therefore, an attacker can forge a soft link as a common user for a privileged user to execute, causing security issues such as privilege escalation. The sam...
Disable the TCP Forwarding Function of SSH
Setting AllowTcpForwarding to no disables the SSH client from performing TCP port forwarding. TCP port forwarding is a function of transmitting data between a local host and a remote host through an SSH tunnel. By disabling this function, you can restrict the data transmission and access scope of...
Disable the Function of Receiving ICMP Redirect Messages
ICMP redirect messages transmit routing information and notify hosts of a better path through which the hosts send data packets. This is a method for allowing an external routing device to update a system routing table. After both net.ipv4.conf.all.acceptredirects and...
Enable the enforcing Mode
SELinux is a built-in security module in Linux distributions. It controls the access from applications to resources in a fine-grained way, thus improving system security. SELinux can run in any of the following modes: 1. enforcing: If the user does not have the permission to access the resource,...
Enable PAM Authentication
Pluggable Authentication Modules PAM on the Linux platform provides a series of open source shared library files .so files. You can flexibly control the authentication process by configuring parameters. After PAM authentication is configured for SSH, the user authentication management module of t...
Set the User Validity Period Correctly
The life cycle of a user must be managed based on the application scenario. For example, the life cycle of a temporarily created management or maintenance user or a user required by a periodic service ends when the service life cycle ends. These users should be deleted when their life cycles end...
Log Spoofing Source Routing and Redirect Packets
Logging spoofing, source routing, and redirect packets sent to the system helps discover attack sources and formulate protection measures. SPDX-FileCopyrightText: 2025 Greenbone AG Some text descriptions might be excerpted from a referenced sources, and are Copyright C by the respective right...
Configure Audit Rules for Privilege Escalation Operations
In openEuler, logs of privilege escalation operations using the sudo command are recorded in the /var/log/secure file by default. This file also records other authentication-related security logs. If you want to audit privilege escalation operations using sudo, you are advised to record logs...
Record System Authentication-related Events in Logs
System authentication-related events must be recorded to help analyze users SPDX-FileCopyrightText: 2025 Greenbone AG Some text descriptions might be excerpted from a referenced sources, and are Copyright C by the respective right holders. SPDX-License-Identifier: GPL-2.0-only...
Ensure That the Unnecessary SUID/SGID Bit on a File Is Deleted
SUID set user ID and SGID set group ID are special permission bits used to control program permissions in UNIX and UNIX-like OSs, including Linux. It is important to ensure that files do not contain unnecessary SUID or SGID bits to improve system security. These bits allow files to run with the...
Avoid the .forward File in the Home Directory
An email address can be configured in the .forward file. When a user receives an email, the email is automatically forwarded to the email address. If there are no email forwarding scenarios, you are advised to delete the .forward file. If the .forward file exists, emails containing sensitive...
Do Not Configure the Encryption Algorithm Overwriting Policy for the SSH Service
The configuration files of the SSH encryption algorithms are /etc/ssh/sshdconfig and /etc/sysconfig/sshd. When the SSH service is running, you can edit the /etc/sysconfig/sshd file to overwrite the encryption algorithm policy. If the encryption algorithm overwriting policy is configured, users ar...
Do Not Install the Samba Service
The daemon of Samba allows the system administrator to configure the Linux system to share file systems and directories with Windows systems. Samba publishes file systems and directories through the Server Message Block SMB protocol. Windows users will be able to mount these directories and file...
Configure Audit Rules for File Access Failures
System calls, such as open, truncate, ftruncate, create and openat, are audited and monitored. If the -EACCES or -EPERM error is returned, you lack the permission to access the files. In this case, audit logs need to be recorded. File access failures due to a lack of proper permissions are common...
Configure Kernel Parameter kptr_restrict Properly
kptrrestrict is used to protect kernel symbol addresses. When the protection level is low, common users can obtain kernel symbol addresses, which are easy to be exploited by attackers. This increases the attack surface and reduces system security. Currently, kptrrestrict can be set to any of the...
Enable auditd to Start upon System Startup
By enabling auditd to start upon system startup, you can audit the events generated during system startup before the auditd service is started. If audit is not enabled during system startup, you may not be able to audit attacks during the startup procedure. By default, audit is not enabled during...