















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















































































Question 1. Which Linux component is primarily responsible for enforcing discretionary access control (DAC) on files? A) SELinux B) AppArmor C) Unix permissions (rwx) D) PAM Answer: C Explanation: Traditional Unix permissions (read, write, execute for owner, group, others) implement DAC, deciding who can access a file based on its mode bits. Question 2. In the Linux boot process, which of the following runs first after the BIOS/UEFI hands control to the bootloader? A) initramfs B) kernel image (vmlinuz) C) systemd D) GRUB menu Answer: B Explanation: The bootloader loads and executes the kernel image (vmlinuz). initramfs is unpacked by the kernel after it starts. Question 3. Which syslog facility is typically used for kernel messages? A) auth B) daemon C) kern D) local Answer: C Explanation: The “kern” facility is reserved for kernel-generated messages.
Question 4. Which command displays the current SELinux mode (enforcing, permissive, or disabled)? A) sestatus B) getenforce C) selinuxenabled D) semanage - l Answer: B Explanation: getenforce prints the current SELinux mode directly. Question 5. What does the auditd daemon primarily record? A) Application logs B) Kernel audit events such as system calls and file accesses C) Network traffic D) Package installation history Answer: B Explanation: auditd collects audit records from the kernel, including system calls, file accesses, and user actions. Question 6. Which of the following is a recommended practice to protect the GRUB bootloader? A) Disable password protection on GRUB B) Store the kernel source code in /boot C) Set a GRUB password to restrict editing boot entries D) Use a plain text configuration file in /etc/grub.d Answer: C
Explanation: pam_cracklib (or pam_pwquality) checks password strength and complexity requirements. Question 10. Which of the following is the default firewall backend for recent Fedora releases? A) iptables B) firewalld (using nftables) C) ufw D) ipfw Answer: B Explanation: firewalld uses nftables as its backend in recent Fedora versions. Question 11. Which of these commands will display the current SELinux policy type (targeted, mls, etc.)? A) selinuxenabled B) semanage policy - l C) sestatus - b D) getenforce - p Answer: C Explanation: sestatus - b shows the loaded policy name and type. Question 12. What is the purpose of the chmod 4755 /usr/bin/sudo command? A) Set the sticky bit on sudo B) Set the setuid bit so sudo runs with root privileges C) Remove execute permission for group D) Change ownership to root Answer: B
Explanation: The leading “4” sets the setuid bit, allowing the binary to run with the file owner’s UID (root for sudo). Question 13. Which of the following is a secure alternative to the Telnet protocol? A) rlogin B) SSH C) FTP D) NFS Answer: B Explanation: SSH encrypts traffic and provides strong authentication, replacing insecure Telnet. Question 14. Which Linux kernel feature limits the set of system calls a process may invoke? A) SELinux B) AppArmor C) seccomp D) Capabilities Answer: C Explanation: Secure Computing Mode (seccomp) filters allowed system calls for a process. Question 15. Which of the following is the correct syntax to add a rule that drops all incoming traffic on port 23 (Telnet) using nftables? A) nft add rule ip filter input tcp dport 23 drop B) iptables - A INPUT - p tcp --dport 23 - j DROP C) firewall-cmd --add-port=23/tcp D) nft insert rule filter input tcp dport 23 reject Answer: A
D) It enforces kernel-level mandatory access control Answer: B Explanation: LDAP enables a central directory that can be queried by many hosts, facilitating single sign‑on. Question 19. Which of the following capabilities allows a process to bind to ports below 1024 without being root? A) CAP_NET_RAW B) CAP_NET_BIND_SERVICE C) CAP_SYS_ADMIN D) CAP_DAC_OVERRIDE Answer: B Explanation: CAP_NET_BIND_SERVICE permits binding to privileged ports (<1024) without full root privileges. Question 20. Which command is used to generate a cryptographic hash of a file for integrity checking? A) chmod B) md5sum C) chattr D) useradd Answer: B Explanation: md5sum (or sha256sum, etc.) computes a hash value that can be compared later for integrity verification. Question 21. Which of the following is the default file that stores static user account information on most Linux distributions? A) /etc/shadow
B) /etc/passwd C) /etc/group D) /etc/login.defs Answer: B Explanation: /etc/passwd contains user account entries (username, UID, GID, home directory, shell). Password hashes are moved to /etc/shadow. Question 22. What does the “sticky bit” on a directory (chmod 1777) enforce? A) Files cannot be deleted by anyone except the owner or root B) Files cannot be executed by anyone C) Directory contents are cached in memory D) All new files inherit the directory’s group ownership Answer: A Explanation: The sticky bit on a directory restricts file deletion/renaming to the file’s owner, the directory’s owner, or root. Question 23. Which of the following is a recommended method to protect SSH against brute‑force attacks? A) Allow root login over SSH B) Use password authentication only C) Change the default port and use key‑based authentication D) Disable PasswordAuthentication in sshd_config Answer: C Explanation: Changing the default port reduces automated scans, and key‑based authentication eliminates password guessing.
Explanation: pam_tally2 (or pam_faillock) tracks failed attempts; deny=3 locks the account after three failures. Question 27. Which of the following is the primary purpose of AIDE (Advanced Intrusion Detection Environment)? A) Real‑time network traffic monitoring B) File integrity checking against a known baseline C) Password cracking D) Managing SELinux policies Answer: B Explanation: AIDE creates a database of file attributes and later compares the system to detect unauthorized changes. Question 28. Which of the following is the correct syntax to create a new system user without a home directory? A) useradd - M - r username B) adduser --no-create-home username C) useradd - d /dev/null username D) useradd - s /sbin/nologin username Answer: A Explanation: -M prevents creation of a home directory, and -r creates a system account. Question 29. Which of the following statements about the Linux kernel’s “capabilities” model is true? A) Capabilities replace the need for user IDs completely. B) Each capability corresponds to a specific privileged operation. C) Capabilities are stored in /etc/capabilities.conf.
D) Only root can grant capabilities to a process. Answer: B Explanation: Capabilities break the all‑or‑nothing root privilege into discrete rights (e.g., CAP_NET_ADMIN). Question 30. Which of the following is a common method to protect the integrity of the bootloader on a UEFI system? A) Disabling Secure Boot B) Enabling Secure Boot with signed bootloader binaries C) Storing the bootloader on a FAT32 partition D) Using GRUB’s password feature only Answer: B Explanation: Secure Boot validates the bootloader’s signature before execution, ensuring integrity. Question 31. Which of the following is the most appropriate way to limit the number of concurrent SSH sessions per user? A) Set MaxSessions in /etc/ssh/sshd_config B) Use pam_limits.so with maxlogins in /etc/security/limits.conf C) Edit /etc/passwd and change the login shell D) Disable AllowTcpForwarding Answer: B Explanation: pam_limits.so reads the maxlogins limit from /etc/security/limits.conf to restrict simultaneous logins. Question 32. Which of the following is a key advantage of using nftables over iptables? A) nftables is backward compatible with iptables syntax.
Question 35. Which of the following authentication mechanisms provides mutual authentication between client and server? A) Password authentication over SSH B) Public key authentication over SSH C) Kerberos ticket‑granting D) RADIUS Answer: C Explanation: Kerberos uses tickets and shared secrets to authenticate both client and server, providing mutual authentication. Question 36. Which of the following is the most secure way to store SSH private keys on a workstation? A) In plain text in ~/.ssh/id_rsa B) Encrypted with a strong passphrase and stored in ~/.ssh/ C) On a USB flash drive without encryption D) In a shared network folder Answer: B Explanation: Encrypting the private key with a strong passphrase protects it even if the file is stolen. Question 37. Which of the following is a typical symptom of a compromised Linux host running a cryptominer? A) Increased CPU usage and high load average B) Frequent kernel panics C) Decreased network throughput only D) Automatic log rotation failures Answer: A
Explanation: Cryptominers consume CPU/GPU cycles, leading to sustained high load. Question 38. Which of the following is the correct command to display all active nftables rules? A) nft list ruleset B) iptables - L - n - v C) firewall-cmd --list-all D) nft - s Answer: A Explanation: nft list ruleset prints the complete nftables configuration. Question 39. Which of the following statements about SELinux “type enforcement” is true? A) It only controls file permissions, not processes. B) It defines rules that map subjects (processes) to object types. C) It is a user‑space daemon that monitors logs. D) It replaces the need for Unix permissions. Answer: B Explanation: Type Enforcement (TE) defines allowed interactions between process types and object types. Question 40. Which of the following is the best practice for managing sudo privileges for a group of administrators? A) Add each user individually to /etc/sudoers B) Create a %admin group and grant sudo rights to that group in /etc/sudoers C) Allow all users to run sudo without a password D) Use sudo su - for each admin login Answer: B
Answer: B Explanation: TPM hardware can store keys and perform secure boot measurements, enhancing platform trust. Question 44. Which of the following is the correct way to limit a process to a specific CPU core using taskset? A) taskset - c 2 myprogram B) taskset - a 0x02 myprogram C) taskset --cpu 2 myprogram D) taskset - p 2 myprogram Answer: A Explanation: -c specifies a list of CPUs (cores) on which the process may run. Question 45. Which of the following is a common indicator that an attacker is attempting a SYN flood DoS attack? A) Large number of ACK packets with no SYNs B) High number of half‑open TCP connections in netstat output C) Frequent ICMP “destination unreachable” messages D) Numerous DNS query timeouts Answer: B Explanation: SYN flood creates many incomplete handshakes, visible as many sockets in SYN_RECV state. Question 46. Which of the following files contains the mapping of user IDs to usernames? A) /etc/shadow B) /etc/passwd C) /etc/group
D) /etc/gshadow Answer: B Explanation: /etc/passwd holds username, UID, GID, home directory, and shell information. Question 47. Which of the following is the most secure way to transmit logs from multiple servers to a central log collector? A) Use plain syslog over UDP B) Use rsyslog with TLS encryption C) Copy log files via SCP nightly D) Forward logs using HTTP GET requests Answer: B Explanation: TLS encrypts log traffic, preventing interception and tampering. Question 48. Which of the following options in /etc/ssh/sshd_config disables password authentication entirely? A) PasswordAuthentication no B) PubkeyAuthentication yes C) ChallengeResponseAuthentication no D) PermitRootLogin no Answer: A Explanation: Setting PasswordAuthentication no tells sshd to refuse password‑based logins. Question 49. Which of the following is the correct method to add a new SELinux module from a compiled .pp file? A) semodule - i mymodule.pp B) semanage module add - f mymodule.pp C) setenforce 1 mymodule.pp
C) /etc/cron.d/root D) /home/root/.cronjobs Answer: B Explanation: Root’s personal crontab resides in /var/spool/cron/root. Question 53. Which of the following statements about Linux capabilities is FALSE? A) CAP_SETUID allows a process to change its UID arbitrarily. B) Capabilities can be dropped by a non‑root process. C) CAP_NET_RAW permits the creation of raw sockets. D) All capabilities are automatically granted to processes with UID 0. Answer: D Explanation: While root has all capabilities by default, they can be selectively removed using capability bounding sets. Question 54. Which of the following is the recommended way to encrypt a Linux swap partition? A) Use cryptsetup with a random key at boot B) Set the swap option in /etc/fstab to noexec C) Disable swap entirely D) Use ecryptfs on the swap file Answer: A Explanation: cryptsetup can create an encrypted swap device that uses a random key each boot, ensuring data is not recoverable. Question 55. Which of the following commands can be used to temporarily block an IP address using iptables? A) iptables - A INPUT - s 192.0.2.10 - j DROP
B) iptables - P INPUT DROP C) iptables - F D) iptables - L - n Answer: A Explanation: Adding a rule that matches the source IP and jumps to DROP blocks traffic from that address. Question 56. Which of the following is the primary purpose of the pam_limits.so module? A) Enforce password complexity B) Set resource limits (e.g., maxlogins, maxproc) per user or group C) Provide two‑factor authentication D) Log authentication attempts to syslog Answer: B Explanation: pam_limits.so reads /etc/security/limits.conf to enforce limits on resources. Question 57. Which of the following describes the “principle of least privilege” in Linux security? A) All users should have root access for convenience. B) Users and services should be granted only the permissions they need to perform their tasks. C) The system should run all daemons as the nobody user. D) Files should be world‑readable to simplify sharing. Answer: B Explanation: Least privilege minimizes attack surface by restricting rights to the minimum required. Question 58. Which of the following is the correct way to generate a self‑signed X. certificate for a web server using OpenSSL?