Curated

Security

0 votes

Try a few cards

Card 1 of 10

All cards120

  1. Which Linux service lets a client cache credentials and authenticate against remote LDAP, Kerberos, or Active Directory providers?

    SSSD (System Security Services Daemon). It sits between PAM/NSS and remote identity providers, and its offline cache lets users log in when the server is unreachable.

  2. Which journalctl option limits output to messages from a specific systemd unit?

    The -u option, as in journalctl -u sshd.service. It filters the journal to entries logged by that unit and combines with options like --since and -p to narrow results further.

  3. Which auditctl option adds a watch on a file or directory path?

    The -w option sets the path to watch, as in auditctl -w /etc/passwd -p wa -k identity. Pair it with -p to choose which access types (r, w, x, a) are logged and -k to tag events with a searchable key.

  4. Which firewall-cmd option adds the HTTPS service to the public zone?

    firewall-cmd --zone=public --add-service=https. Without --permanent, the rule applies only to the runtime configuration and is lost on reload or reboot.

  5. Which ufw command permits inbound SSH by service name rather than port number?

    ufw allow ssh. ufw looks up the service name in /etc/services and opens its port, 22/tcp, for both IPv4 and IPv6 rules.

  6. Which tool stores many IP addresses or networks in one named set for a single firewall rule to match?

    ipset. It lets one iptables rule match thousands of addresses through a hash lookup instead of one rule per address, and nftables offers the same idea natively through its own sets.

  7. What is Netfilter in the Linux kernel?

    Netfilter is the kernel framework that provides packet filtering, NAT, and packet mangling through hooks in the network stack. User-space tools such as iptables, nftables, firewalld, and ufw configure its rules.

  8. Which translation type rewrites a packet's destination address, such as forwarding a public port to an internal server?

    DNAT (destination NAT). In iptables it is the DNAT target in the nat table's PREROUTING chain, and it is the basis of port forwarding.

  9. What does a stateful firewall track that a stateless firewall does not?

    It tracks connection state, such as NEW, ESTABLISHED, and RELATED. Because of this, one rule can allow reply traffic without a separate rule for each return packet.

  10. Which sysctl parameter turns on IPv4 packet forwarding between network interfaces?

    net.ipv4.ip_forward, set to 1. Setting it with sysctl -w only lasts until reboot, so add net.ipv4.ip_forward=1 to /etc/sysctl.conf or a file in /etc/sysctl.d/ to persist it.

  11. Which command should you use to edit /etc/sudoers safely?

    visudo. It locks the file against simultaneous edits and checks syntax before saving, so a typo cannot break sudo and lock administrators out.

  12. Which command sets the append-only attribute on /var/log/audit.log?

    chattr +a /var/log/audit.log. With this attribute, data can only be added to the file, so existing content cannot be overwritten or deleted, while chattr +i would block all changes including appends.

  13. Which command changes both the owner and group of a file in one step?

    chown owner:group file, for example chown alice:dev report.txt. The colon separates the new owner from the new group, and chgrp is only needed when changing the group alone.

  14. Which command displays the access control list of a file, including named users and groups?

    getfacl. It prints the owner, group, and every ACL entry, including the mask and any default entries on directories.

  15. Which encrypted service replaces Telnet for remote command-line administration on Linux?

    SSH (Secure Shell), typically served by sshd on TCP port 22. Telnet sends credentials and data in plaintext on TCP port 23, so SSH encrypts the session and authenticates the host and user.

  16. Which modprobe.d directive stops a kernel module from loading even when something tries to load it by running modprobe?

    install <module> /bin/false (or /bin/true), for example "install cramfs /bin/false" in a file under /etc/modprobe.d/. A "blacklist" line alone only stops automatic alias-based loading, so the install line is what blocks an explicit modprobe.

  17. Which find command lists every file on the system with the SUID bit set?

    find / -perm -4000 -type f 2>/dev/null. The -4000 mode matches files with the SUID bit set, and redirecting stderr hides permission-denied noise; chmod u-s <file> then removes the bit from any binary that does not need it.

  18. What does UEFI Secure Boot verify before allowing a bootloader or kernel to run?

    Secure Boot checks that boot components are signed by a key stored in the firmware's trusted databases, blocking unsigned or tampered code. A TPM event log records measurements for attestation but does not by itself allow or block execution.

  19. Which PAM module enforces password complexity and minimum length rules on Linux?

    pam_pwquality, which replaced the older pam_cracklib module. Its settings, such as minlen, dcredit and ucredit, are set in /etc/security/pwquality.conf or as arguments in the PAM password stack.

  20. Define multifactor authentication (MFA).

    MFA requires two or more authentication factors from different categories before granting access. The categories are something you know, something you have, and something you are, so a password plus a hardware token or fingerprint qualifies.

  21. What is the purpose of checking a password against a breach list?

    It identifies passwords already exposed in past data breaches so they can be rejected or changed. Attackers include leaked passwords in credential-stuffing and dictionary attacks, so a password on such a list is unsafe regardless of its complexity.

  22. Which command assigns /sbin/nologin as the login shell for the existing user svc_backup?

    usermod -s /sbin/nologin svc_backup. This sets the shell field in /etc/passwd, so interactive logins are refused and the user sees a polite message instead of a prompt.

  23. Which pam_tally2 option sets how many failed logins are allowed before an account is locked?

    deny=N sets the failed-attempt threshold that triggers the lock. unlock_time sets how many seconds the lock lasts, not when it starts.

  24. Which sudo practice best applies least privilege for an administrator who only needs to restart one service?

    Least privilege grants only the access a task requires, so a sudoers rule limited to that one command fits. Wheel membership usually grants full root access through sudo, which is far broader than needed.

  25. Which cryptsetup command initializes a partition as a LUKS2 encrypted volume?

    cryptsetup luksFormat --type luks2 /dev/sdX. It writes the LUKS2 header and sets the first passphrase, and destroys any existing data on the partition.

  26. Which OpenSSL command opens a test TLS client connection to a server and displays its certificate details?

    openssl s_client -connect host:port. It performs a TLS handshake and prints the certificate chain, negotiated protocol version, and cipher, and options like -tls1_3 force a specific version.

  27. Which Linux command computes a SHA-256 digest of a file?

    sha256sum computes the SHA-256 digest of a file. Running sha256sum -c against a saved checksum list verifies that files are unchanged, but it cannot prove who created the list.

  28. Which hash algorithms are considered broken for security use because of practical collision attacks?

    MD5 and SHA-1. Both are vulnerable to collision attacks, so certificates, signatures and integrity checks should use SHA-256 or stronger.

  29. Which command adds a custom root CA certificate from /usr/local/share/ca-certificates to the system trust store on Ubuntu?

    update-ca-certificates rebuilds the Debian/Ubuntu trust store from .crt files in /usr/local/share/ca-certificates. update-ca-trust is the RHEL-family equivalent and reads from /etc/pki/ca-trust/source/anchors.

  30. What is the main security risk of trusting a self-signed certificate on a Linux server?

    A self-signed certificate has no trusted CA chain, so clients cannot confirm who the server is and may be exposed to man-in-the-middle attacks. It can still encrypt traffic, so encryption itself is not the issue.

  31. What does IOC stand for in security, and what does it signal?

    Indicator of compromise: forensic evidence that a system may have been breached. Examples on Linux include unexpected outbound connections, modified system binaries, new unknown user accounts, and unusual cron jobs.

  32. What CVSS base score range is rated Critical?

    9.0 to 10.0. CVSS v3.x also rates 7.0–8.9 High, 4.0–6.9 Medium, 0.1–3.9 Low, and 0.0 None, so scanners use these bands to prioritize remediation.

  33. Which OpenSCAP command evaluates a system against an SCAP profile such as a CIS Benchmark?

    oscap xccdf eval --profile <profile_id> <datastream.xml> runs the evaluation. Adding --report report.html produces a readable results report showing which rules passed or failed.

  34. Which rpm option verifies installed package files against the RPM database's size, mode, and checksum?

    rpm -V (or rpm --verify) followed by the package name. It prints nothing when files match, and flags changed attributes such as 5 for a digest mismatch, S for size, and T for modification time.

  35. Which destruction method makes encrypted data unrecoverable by securely deleting only the encryption key?

    Cryptographic destruction (crypto-erase). With data encrypted at rest, such as LUKS, destroying every copy of the key leaves the ciphertext unreadable without overwriting the whole disk.

  36. What is the main risk when installing packages from an untrusted third-party repository?

    Malicious code in the package is the core supply chain risk, because a compromised or untrusted source can deliver backdoored software that runs with elevated privileges. Slower resolution and disk usage are operational side effects, not security risks.

  37. Which file holds the pre-login banner shown to remote telnet and SSH clients, when SSH is configured to use it?

    /etc/issue.net is the file for network logins. For SSH, it only displays when sshd_config sets "Banner /etc/issue.net"; /etc/issue is the equivalent for local console logins.

  38. Which framework decides whether an unprivileged process may perform a specific administrative action, based on policy rules?

    Polkit evaluates action-level policy rules to authorize unprivileged processes for privileged operations. PAM is tempting, but it provides a modular authentication stack for applications rather than per-action authorization policy.

  39. Which logrotate directive compresses rotated log files with gzip by default?

    The compress directive gzips rotated logs by default. Delaycompress only postpones compression until the next rotation cycle, so it does not enable compression on its own.

  40. Which auditctl option tags a rule with a key so ausearch can filter events by it?

    The -k option attaches a filter key to a rule, and ausearch -k then retrieves matching events. The -F option adds field filters such as arch or uid but does not name the rule.

  41. Running firewall-cmd --runtime-to-permanent copies the permanent configuration into the runtime configuration, discarding any runtime-only changes.

    The direction is reversed. The --runtime-to-permanent option saves the current runtime configuration to the permanent configuration so it survives a reload or reboot. Copying permanent settings into runtime is what firewall-cmd --reload does.

  42. Which ufw command blocks inbound TCP traffic to port 8080 only, leaving UDP unaffected?

    Appending /tcp restricts the rule to TCP, so UDP on 8080 is untouched. Omitting the protocol, as in plain "ufw deny 8080", blocks both TCP and UDP.

  43. Which command-line tool manages rules for the nftables framework?

    nft is the native utility for nftables tables, chains and rules. iptables manages the older Netfilter xtables rules, while firewall-cmd is the firewalld front end.

  44. Which Netfilter hook handles packets addressed to the local host after the routing decision?

    The input hook runs after routing for packets destined to the local system. Prerouting runs before the routing decision, and output handles locally generated packets.

  45. Which translation type rewrites outbound packets' source address to a specified, fixed public IP address?

    SNAT rewrites the source address to an administrator-specified static IP. MASQUERADE also rewrites the source, but it uses the outgoing interface's current address, which suits dynamic IPs.

  46. Which firewall type evaluates each packet in isolation against its rules, with no memory of earlier packets?

    A stateless packet filter judges every packet only on its header fields against the rule set. Stateful and connection-tracking firewalls remember connection state, and a proxy works at the application layer.

  47. Which file can persistently store net.ipv4.ip_forward=1 so forwarding survives a reboot?

    Kernel parameters set in /etc/sysctl.conf (or /etc/sysctl.d/*.conf) are applied at boot. modprobe.d only sets kernel module options, not sysctl parameters.

  48. Running sudo -i as a regular user starts a root login shell after prompting for the root account's password.

    sudo -i starts a root login shell, but it prompts for the invoking user's own password (unless NOPASSWD applies), not root's. su - is the command that asks for the target account's password, which is root's by default.

  49. Which command sets the immutable attribute on /etc/resolv.conf?

    chattr +i sets the immutable flag, which blocks modification, deletion, and renaming until it is removed with chattr -i. +a is append-only, which still allows data to be added.

  50. With a umask of 022, a newly created regular file receives permissions of 755 by default.

    The umask is subtracted from the base mode, and regular files start at 666, not 777, so no execute bit is set by default. A umask of 022 gives files 644 (rw-r--r--). Directories start at 777, so they become 755.