All cards120
- Running setenforce 0 on a system in enforcing mode disables SELinux completely until the next reboot.
setenforce 0 switches SELinux to permissive mode, not disabled. In permissive mode the policy stays loaded and denials are logged but not blocked. Disabled mode is set through the SELINUX= setting in /etc/selinux/config or a kernel parameter and needs a reboot.
- Which sshd_config directive stops the root account from logging in over SSH?
PermitRootLogin no. Administrators then log in as a regular user and escalate with sudo, so actions are tied to a named account.
- Name the program that holds decrypted private keys in memory so you type the passphrase only once.
ssh-agent, loaded with keys via ssh-add. It lets later SSH connections authenticate without prompting for the passphrase again during the session.
- Which SSH-based file transfer subsystem replaces plaintext FTP on a hardened Linux server?
SFTP runs over SSH on port 22 and encrypts both credentials and data. TFTP is no replacement: it is also unencrypted and has no authentication.
- Which command unloads the cramfs module from the running kernel after you have disabled that filesystem?
rmmod removes a loaded module from the running kernel, which is needed because a modprobe.d rule only blocks future loads. modprobe cramfs would load the module, not unload it.
- Which command removes only the SUID bit from a file, leaving other permissions unchanged?
chmod u-s clears the set-user-ID bit on the owner class. chmod g-s clears SGID instead, and u-x removes execute permission, which leaves the s bit meaningless but not properly removed.
- On most Linux distributions with UEFI Secure Boot enabled, the small first-stage bootloader signed by the Microsoft UEFI CA, which then verifies GRUB and the kernel, is called ___.
shim
- Which command forces user alice's password to expire after a maximum of 90 days?
chage -M sets the maximum number of days a password stays valid. Lowercase -m sets the minimum days between changes, -W sets the warning period, and -I sets the inactivity period after expiry.
- Which credential pair counts as multifactor authentication for a Linux login?
A password (something you know) plus a hardware token (something you have) uses two different factor types. The other pairs combine credentials from the same category, knowledge, so they are not MFA.
- What does the Pwned Passwords range API receive so a password can be checked without being exposed?
The k-anonymity model sends only the first five hex characters of the SHA-1 hash, and the client matches the returned suffixes locally. The full password or full hash never leaves the client.
- Which useradd option sets /bin/rbash as the login shell for a new user?
The -s option sets the login shell at account creation. The -d option sets the home directory, not the shell.
- The pam_tally2 module option ___ sets the number of seconds after which a locked account is automatically unlocked.
unlock_time
- Administrators who need elevated rights for a single task should run that one command with sudo instead of logging in as the ___ account.
root
- Which gpg option encrypts a file using a passphrase rather than a recipient's public key?
The --symmetric (-c) option encrypts with a passphrase-derived key. Plain --encrypt uses public-key encryption and requires a recipient.
- Which TLS protocol version is the newest and removes support for legacy cipher suites such as RC4 and CBC-mode ciphers?
TLS 1.3 is the newest version and permits only AEAD cipher suites, dropping RC4, CBC-mode ciphers and static RSA key exchange. TLS 1.2 is still widely used but still allows CBC-mode and other legacy suites.
- What does an HMAC require that a plain SHA-256 hash does not?
HMAC mixes a shared secret key into the hash, so it proves both integrity and authenticity. A private signing key belongs to asymmetric digital signatures, not HMAC.
- Which cipher is considered weak and should be disabled in TLS and SSH configurations?
RC4 is a stream cipher with known keystream biases, so modern TLS and SSH configurations disable it. AES-GCM, ChaCha20 and AES-CTR remain acceptable when used correctly.
- On RHEL-based systems, a custom root CA certificate is copied into the /etc/pki/ca-trust/source/___ directory before running update-ca-trust.
anchors
- Because no certificate authority issues a self-signed certificate, a compromised one cannot be invalidated through a published certificate ___ list that clients check.
revocation
- Which finding on a Linux server is a typical indicator of compromise?
A second UID 0 account gives hidden root-level access, a classic persistence IOC. Logrotate, automatic updates and key-based admin logins are routine activity, not signs of compromise.
- A protocol analyzer such as Wireshark is the tool used to discover which TCP ports are open on a remote host by sending probe packets to a range of ports.
Discovering open ports by probing is the job of a port scanner such as Nmap. A protocol analyzer captures and decodes traffic already crossing a network interface; it does not actively probe ports, so it cannot enumerate open ports on its own.
- Which oscap xccdf eval option applies fixes automatically for failed rules during the scan?
--remediate runs the fix for each failed rule in the selected benchmark profile as the evaluation finishes. --report only writes an HTML report of the findings and changes nothing on the system.
- Which command lists installed Debian package files whose checksums differ from the package's recorded checksums?
debsums -c compares installed files against package MD5 checksums and prints only changed files. dpkg -L only lists a package's files and does not check them.
- Which command overwrites a file multiple times with random data and can optionally remove it afterward?
shred overwrites a file's contents repeatedly with random data, and the -u option removes it afterward. wipefs only erases filesystem signatures, leaving the underlying data intact and recoverable.
- Publishing a malicious package with a name nearly identical to a popular package, hoping users install it by mistake, is called ___.
typosquatting
- In /etc/issue, the agetty escape code \r inserts the ___ release number, matching the output of uname -r.
kernel
- A Key Distribution Center issues tickets so users can prove their identity to network services without sending passwords, a role performed by the ___ authentication protocol.
Kerberos
- Running logrotate with the single-letter option ___ prints the actions it would take without changing any log files.
-d
- Which firewall-cmd option opens TCP port 8080 in a zone?
--add-port takes a port/protocol pair and opens it in the chosen zone. --add-service expects a defined service name such as http, not a port number.
- When a rule such as ufw allow http names a service instead of a port number, ufw looks up the matching port in the ___ file.
/etc/services
- Because the iptables command filters only IPv4 traffic, the separate ___ command is used to manage IPv6 rules in the legacy netfilter toolset.
ip6tables
- Userspace tools such as iptables and nftables configure packet filtering rules that are enforced by Netfilter, which runs inside the Linux ___.
kernel
- Mapping many private hosts onto one public IP address by tracking each connection's unique source port is known by the acronym ___.
PAT
- Which sudoers tag stops an allowed program from running other commands via shell escapes?
NOEXEC blocks the exec family of calls for the permitted program, so editors and pagers cannot spawn a shell. NOPASSWD only skips the password prompt and does not limit what the program can launch.
- After an administrator runs chattr +a on a log file, the file can only be opened for appending, and the attribute can be removed only by root or a process with the ___ capability.
CAP_LINUX_IMMUTABLE
- Which octal mode represents the permissions rwxr-x---?
Owner rwx is 7, group r-x is 5, and others --- is 0, giving 750. Mode 755 is tempting but would also give others read and execute.
- Which setfacl option removes all extended ACL entries from a file?
The -b option removes all extended ACL entries, leaving only the standard permissions. The -x option removes only the entries you specify, and -k removes only the default ACL.
- In a fail2ban jail, the maxretry setting defines how many seconds an offending IP address stays banned after it is blocked.
maxretry is the number of failures allowed before a ban is triggered. The ban duration is set by bantime, and findtime defines the window in which the failures are counted.
- When sshd uses ChrootDirectory for SFTP users, the chroot directory must be owned by root and must not be writable by any other user or group.
sshd rejects the connection if any component of the ChrootDirectory path is not root-owned or is group- or world-writable. Users therefore write only inside a subdirectory they own, not in the chroot root itself.
- After Telnet is removed, remote administration moves to OpenSSH, which listens by default on TCP port ___.
22
- A modprobe.d entry beginning with the keyword ___ stops a filesystem module such as udf from being loaded automatically through alias matching, but does not stop an administrator from loading it manually with modprobe.
blacklist
- In a four-digit octal file mode, the SUID bit is represented by the leading digit ___.
4
- To prevent users from reusing old passwords, the pam_pwhistory module records previous password hashes in the /etc/security/___ file.
opasswd
- A code generated by an authenticator app on a user's phone is an example of the "something you ___" authentication factor.
have
- A free public service lets administrators check whether a password or email address appears in known breach data. The service is called Have I Been ___.
Pwned
- The login shell assigned to an account, such as /bin/rbash, is stored in the seventh field of that account's entry in the ___ file.
/etc/passwd
- To encrypt a file so that only the holder of a specific recipient's private key can read it, run gpg with the --recipient option and the --___ option.
encrypt
- RFC 8996 formally deprecated TLS 1.0 and TLS ___, so modern Linux servers should disable both.
1.1
- The hexadecimal output of the sha256sum command is always ___ characters long, regardless of the size of the input.
64
- A new, unauthorized public key in a user's authorized_keys file that the user did not add is an indicator of compromise because it can give an attacker passwordless ___ access.
SSH