177629 matches found
Configure the dmesg Access Permission Properly
The permission to access dmesg information is restricted. Unprivileged users cannot view system information. This prevents any one from obtaining sensitive information and attacking the system. Only processes with the CAPSYSLOG capability are allowed to access kernel logs. In this way, the least...
Do Not Install the Telnet Client
Telnet is an application-layer protocol and is usually used for remote login, operation control, and system modification of servers. Telnet data is not encrypted, and user names, passwords, and transmitted data can be easily stolen by attackers. Therefore, do not install or use Telnet clients. Us...
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...
Ensure That the Number of Files That Can Be Opened by Users Is Correctly Configured
The number of files that can be opened in Linux is limited. Once the limit is reached by a user, other users can no longer open files. By default, openEuler limits the maximum number of file handles that can be opened by each user to 1024. If the value exceeds 1024, new file handles cannot be...
Configure Session Audit Rules
You are advised to audit and monitor the /var/run/utmp, /var/log/wtmp, and /var/log/btmp files. /var/run/utmp records all login events, /var/log/wtmp records all login, logout, shutdown, and restart events, and /var/log/btmp records login failure events. If session audit is not configured,...
Record the cron Logs
Generally, cron is used to schedule tasks in Linux. Because cron can be exploited by hackers to load malicious code, all the cron logs need to be recorded to trace system exceptions. Otherwise, the exception information cannot be displayed in logs when there are malicious operations. As a result,...
Enable Kernel SMAP
Supervisor Mode Access Prevention SMAP can be enabled to prevent the kernel from accessing data in user space. If SMAP is not enabled, attackers can access data in user space through kernel-mode code redirection, which increases the attack surface and reduces system security. SMAP is enabled by...
Ensure That auditd Is Enabled
The auditd component is a user-space component of the Linux audit framework, providing the auditctl, ausearch, and aureport programs to audit and view logs. Audit rules are configured using the auditctl program. When getting started, auditctl reads these rules from /etc/audit/audit.rules. The aud...
Configure Audit Rules for Time Changes
The system time is essential for the normal running of services. The system time can be changed through synchronization with the time server and manual operations of administrators. The latter is prone to attacks because attackers can change the system time to invalidate some protection policies...
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...
Configure a Proper SSH Service Authentication Mode
A proper authentication mode helps ensure user and system data security. Typically, the user/password authentication mode is suitable for human-machine users. In non-interactive login scenarios, the public and private keys are suitable for authentication. In high-risk scenarios, only the public a...
Ensure That GPG Verification Is Configured for the Yum Repositories
Software packages may be tampered with by attackers during network transmission or local storage. If the integrity verification is not performed on the software packages, software tampered with by attackers may be installed. As a result, the server or even the entire network cluster is attacked. ...
Enable the haveged Service
The haveged service can generate an unpredictable stream of random numbers in a simple way. These random numbers can fill the system entropy pool, which can solve the problem of low system entropy in some cases. You are advised to enable this service to meet the needs of encryption, decryption, o...
Do Not Install Network Sniffing Tools
If network sniffing tools exist in the production environment, attackers may use them for network analysis and attacks. Therefore, in the production environment, do not install network sniffing, packet capturing, or analysis tools, such as tcpdump, Ethereal, and Wireshark. SPDX-FileCopyrightText:...
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...
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 the iptables Policies for Loopback Properly
The loopback address 127.0.0.0/8 is a special address on a server. It is irrelevant to NICs and is mainly used for the inter-process communication of a local device. Packets with the source address 127.0.0.0/8 from NICs should be discarded. If policies related to the loopback address are improper...
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 a Proper Number of Concurrent Sessions Allowed for a Single SSH Connection
SSH allows a client that supports multiplexing to establish multiple sessions based on a network connection. MaxSessions limits the number of concurrent SSH sessions that can be established for each network connection. This prevents system resources from being occupied by a single connection or a...
Configure Audit Rules for File System Mounting
Generally, for deployed services, the file system mounting does not change. Therefore, any change in the file system mounting may indicate attacks. For file systems with changes in mounting, audit and monitor their mounting conditions for tracing. By default, audit rules for file system mounting...
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...
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...
Do Not Enable 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...
Do Not Enable the rsync Service
The rsync service can synchronize data between servers or between local drive partitions. However, information leakage risks exist because rsync uses non-encrypted transmission protocols. If the rsync service is enabled and data is transmitted between servers over the network, attackers can...
Do Not Enable 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...
Ensure That Partitions That Do Not Require SUID/SGID Bits Are Mounted Using nosuid
After the SUID bit is set for an executable file, the user who executes the file not the file owner is temporarily granted the permission of the file owner. For example, common user test executes a program whose permission is 755 and owner is root. In this case, if the SUID bit is not set,only th...
Configure at and cron Services Properly
The at service is used to execute simple tasks once, and the cron service is used to execute periodic and scheduled tasks. In the cron command, the /etc/cron.deny file is the blocklist configuration file, and the /etc/cron.allow file is the allowlist configuration file, which is absent by default...
Enable the rsyslog Service
System logs are stored in the memory by default. If the rsyslog service is disabled, system logs cannot be dumped to persistent storage devices and will be lost after the system is restarted. The rsyslog service is used to dump and distribute system logs, supporting the following functions: 1...
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...
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,...
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...
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 the Core Dump Properly
A core dump records the memory status when a program stops abnormally or breaks down. It helps locate faults but may contain sensitive information in the process memory. In some cases, the core dump function needs to be enabled to record problem causes. When enabling the core dump function,...
Do Not Enable the DNS Service
The Domain Name System DNS is a hierarchical naming system that maps names to IP addresses of computers, services, and other network resources. Unless a system is the designated DNS server, you are advised to disable its DNS service to reduce the attack surface. SPDX-FileCopyrightText: 2025...
Enable Reverse Path Filtering
Setting net.ipv4.conf.all.rpfilter and net.ipv4.conf.default.rpfilter to 1 forces the Linux kernel to perform reverse path filtering on a received packet and check the validity of its source address. If the Linux kernel queries the routing table in which the source address is included and finds...
Configure a Proper Value for MaxAuthTries
MaxAuthTries indicates the maximum number of user authentication failures allowed in a single connection. If the number of user authentication failures exceeds the value, the connection is automatically disconnected. You are advised to set this field to a value less than or equal to 3. If this...
Ensure That the Sticky Bit Is Set for Globally Writable Directories
The sticky bit of a common file is ignored by the kernel. The sticky bit shows up as the execute permission flag of a directory and is indicated with t. If the sticky bit set is for a directory, a user who is not root or the directory owner cannot delete files or directories in the directory,...
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 the SELinux Policy Correctly
SELinux policies are classified into basic policies and user-defined policies. Basic policies: policies defined in the basic policy package, including selinux-policy, selinux-policy-targeted, and selinux-policy-mls. User-defined policies: policies modified or added by users. SELinux can implement...
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...
Correctly Configure the Default File Permission For rsyslog
Log files record system behaviors. The rsyslog log tool records logs in specified files. When the specified log file does not exist in the system, rsyslog creates a log file. The permission of the created log file can be configured in the rsyslog configuration file. The configuration of the defau...
Disable PermitUserEnvironment
PermitUserEnvironment allows users to set SSH environment variables, which may be exploited by attackers to launch attacks. If PermitUserEnvironment is set to yes, attackers can modify SSH environment variables to evade the security mechanism or execute attack code. This configuration must be...
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 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...
Ensure That the umask Value Is Correct
The umask value is the mask for default file or directory permissions. When a file or directory is created, its default permission is set to 777 minus the umask value. For a file, its execute permission is also removed. If the umask value is set improperly, the permission of new files may be too...
Ensure That the su Command Is Restricted
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...
Do Not Allow Hidden Executable Files
In Linux, the name of a hidden file starts with a dot .. Hidden executable files are not allowed in the system. Note that . and . are not hidden files. They refer to the current directory and upper-level directory, respectively. The .bashrc, .bashprofile, and .bashlogout files are script files us...
Do Not Install Insecure SNMP Versions
Simple Network Management Protocol SNMP is a standard protocol designed to manage network nodes in IP networks. This protocol allows the exchange of network management and control data between network elements NEs. If SNMP is installed in scenarios where SNMP is not required, additional system...
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...