Curated

Security

0 votes

Questions120

  1. Question 101

    Security

    A scanner flags a RHEL server running openssh-8.0p1 for a CVE that upstream OpenSSH fixed in version 8.7. The package changelog on the server lists the CVE ID in a recent security update. How should the analyst interpret this finding?

    Show the answer

    Correct answerB. It is likely a false positive because the vendor backported the fix

    Distributions backport security fixes into the existing version, so the version string stays the same while the flaw is patched. The changelog entry for the CVE ID confirms this. Judging by version number alone is the mistake that causes these false positives.

    Open this question
  2. Question 102

    Security

    A vulnerability scan of a Linux web server reports a CVE with the CVSS v3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Which statement correctly describes how this vulnerability can be exploited?

    Show the answer

    Correct answerC. An attacker can exploit it remotely without credentials or user interaction

    AV:N means network-reachable, PR:N means no privileges are needed, and UI:N means no user action is required. Together with low complexity, this is a 9.8 Critical. A local shell account would be AV:L, and a file-opening requirement would be UI:R.

    Open this question
  3. Question 103

    Security

    An administrator is rolling out a CIS Benchmark baseline to production Linux servers after an OpenSCAP scan reported many failed rules. One legacy application conflicts with two of the failed rules. Which two actions follow good practice for applying the benchmark? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersA. Test the remediation on a non-production system before applying it to productionD. Record the justified exceptions for the two conflicting rules in an OpenSCAP tailoring file

    A tailoring file documents approved deviations so later scans reflect them, and testing remediation on a non-production system catches breakage before it reaches production. Immediate automatic remediation on production is risky because some rules can disrupt applications.

    Open this question
  4. Question 104

    Security

    A security team must assess a RHEL 9 server against the CIS profile in the SCAP Security Guide data stream. They need an HTML report of pass/fail results and must not change the system. Which command does this?

    Show the answer

    Correct answerB. oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis --report cis.html ssg-rhel9-ds.xml

    oscap xccdf eval evaluates the system against a selected XCCDF profile and --report writes an HTML report without making changes. The generate fix subcommand only builds a remediation script from the profile and performs no scan, so it produces no pass/fail results.

    Open this question
  5. Question 105

    Security

    A company runs general-purpose RHEL web servers. Policy requires a baseline hardening level that is practical to deploy and causes little reduction in business functionality. Which CIS Benchmark profile should the team apply?

    Show the answer

    Correct answerC. Level 1 - Server

    Level 1 - Server is the baseline profile for server systems, with practical settings that limit the risk of disrupting services. Level 2 - Server is intended for high-security environments and can reduce functionality, so it is too restrictive for this baseline.

    Open this question
  6. Question 106

    Security

    A web server running a RHEL-based distribution may have had binaries from the httpd package altered after installation. The administrator wants to compare the installed files' size, digest, permissions and ownership against the package metadata in the RPM database. Which command does this?

    Show the answer

    Correct answerD. rpm -V httpd

    rpm -V verifies installed files against the RPM database and flags changes to size, digest, mode, owner and time. rpm -K checks the digest and signature of a package file, not files already installed, so it cannot reveal tampering on disk.

    Open this question
  7. Question 107

    Security

    An administrator of a RHEL-based server must confirm that packages are authentic and that no files have been tampered with. Which four actions verify file integrity or package authenticity? (Choose four.)

    Choose 4 answers

    Show the answer

    Correct answersB. Run aide --check against a database created earlier with aide --initC. Run rpm -V against an installed package to compare its files with the RPM databaseD. Run rpm -K on a downloaded package file to check its digest and GPG signatureE. Run rkhunter --check to compare monitored binaries against stored file properties

    rpm -V, rpm -K, aide --check and rkhunter --check each compare files or packages against known-good data or signatures. rpm -ql only lists file paths, and updatedb only refreshes the locate index, so neither checks integrity.

    Open this question
  8. Question 108

    Security

    An administrator runs aide --check after an approved patch window. AIDE reports changed binaries that match the patched packages. The administrator wants future checks to treat the patched state as the trusted baseline. What should be done?

    Show the answer

    Correct answerC. Run aide --update, then replace the database named by database_in with the newly generated database

    aide --update compares the filesystem to the old baseline and writes a new database, which must then be copied over the database AIDE reads. rkhunter --propupd updates only rkhunter's own file properties data, not the AIDE database.

    Open this question
  9. Question 109

    Security

    A security policy requires that a retiring spinning hard drive, /dev/sdb, be overwritten with three passes of random data followed by a final pass of zeros to hide that it was shredded. The administrator wants progress output. Which command meets the policy?

    Show the answer

    Correct answerB. shred -v -n 3 -z /dev/sdb

    shred -n 3 sets three random passes, -z adds the final zero pass, -v shows progress, and targeting /dev/sdb covers the whole disk. Targeting only /dev/sdb1 skips the rest of the disk and omits the zero pass.

    Open this question
  10. Question 110

    Security

    A technician is redeploying a used drive, /dev/sdc, to another team. The existing data must be destroyed, and the technician also wants every sector exercised to detect failing areas in the same operation. Which command does both?

    Show the answer

    Correct answerA. badblocks -wsv /dev/sdc

    badblocks -w runs a destructive write test, writing and reading back patterns on every sector, which erases the data and finds bad areas. The -n option is non-destructive and restores the original contents, so the data would survive.

    Open this question
  11. Question 111

    Security

    A company is decommissioning a cloud VM whose data disk /dev/vdb is a LUKS2 volume. No physical access to the storage is possible, and no header backup exists. Policy requires the data to be rendered unrecoverable quickly. Which action BEST achieves this?

    Show the answer

    Correct answerA. Run cryptsetup erase /dev/vdb to destroy all key slots

    Cryptographic destruction: erasing every LUKS key slot discards the only means of recovering the master key, so the ciphertext is unusable. Deleting or shredding files leaves data exposed, because rm only removes directory entries and shred is unreliable on journaled or remapped storage.

    Open this question
  12. Question 112

    Security

    A team builds Linux application images from public base images and installs libraries from third-party repositories. Which three situations represent software supply chain risk? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. A typosquatted package name is installed in place of the intended libraryD. A compromised maintainer account publishes a backdoored update to an upstream packageE. An unpinned dependency in a build script pulls a tampered version at build time

    Supply chain risk comes from untrusted or altered components arriving through upstream sources: a hijacked maintainer, a lookalike package name, or an unpinned dependency. A weak SSH password is tempting but is a host authentication weakness, not a flaw in how software was sourced.

    Open this question
  13. Question 113

    Security

    An administrator finds that a third-party repository file on several production servers sets gpgcheck=0. Which supply chain risk does this setting most directly create?

    Show the answer

    Correct answerC. Altered packages can install without any integrity warning

    Disabling GPG checking removes signature verification, so a package that was tampered with at the mirror or in transit installs silently. Stale metadata caching is a plausible concern, but it affects update timing, not whether package authenticity is verified.

    Open this question
  14. Question 114

    Security

    A security team is reviewing login banners on a Linux server. When is the text in /etc/motd shown to a user?

    Show the answer

    Correct answerA. After a successful login, before the shell prompt appears

    AWhy this is right: motd is the message of the day, printed only after authentication succeeds and before the shell starts.

    BWhy not this: The pre-login console text comes from /etc/issue; motd appears only after login.

    CWhy not this: A pre-authentication SSH banner comes from the sshd Banner setting, often /etc/issue.net, not from motd.

    DWhy not this: motd is shown at login, not each time a non-login shell such as a new terminal tab starts.

    /etc/motd is the message of the day, shown once login succeeds. The pre-login warning for local consoles comes from /etc/issue, and for network logins from /etc/issue.net or the sshd Banner setting, so treating motd as a pre-authentication banner is the common mistake.

    Open this question
  15. Question 115

    Security

    A compliance audit requires that remote users see a legal warning before they authenticate over SSH. The administrator has written the warning text and wants sshd to present it at the connection stage. Which configuration meets this requirement?

    Show the answer

    Correct answerA. Place the text in /etc/issue.net and set Banner /etc/issue.net in sshd_config

    sshd shows a pre-authentication banner only when the Banner directive points to a file, and /etc/issue.net is the conventional file for network logins. /etc/motd is tempting, but it is shown only after a successful login, so it cannot warn users before authentication.

    Open this question
  16. Question 116

    Security

    In a new shell session, an administrator runs ssh-add ~/.ssh/id_ed25519 and receives the error "Could not open a connection to your authentication agent." No agent is running for this session. Which action BEST resolves the problem?

    Show the answer

    Correct answerD. Run eval "$(ssh-agent -s)" in the shell, then run ssh-add again

    Evaluating the ssh-agent output exports SSH_AUTH_SOCK and SSH_AGENT_PID into the shell so ssh-add can reach the agent. Running ssh-agent alone only prints those variables, so the shell never receives them.

    Open this question
  17. Question 117

    Security

    An administrator is setting up key-based login for the user dana on a server and plans to set PasswordAuthentication no afterward. Which three actions are appropriate for making this change work safely? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Set ~/.ssh to mode 700 and authorized_keys to mode 600, owned by dana, so the sshd StrictModes check passesC. Confirm that key login works in a second session before setting PasswordAuthentication no and reloading sshdD. Generate a key pair with ssh-keygen on the client and append the public key to dana's ~/.ssh/authorized_keys on the server

    AWhy this is right: StrictModes makes sshd refuse keys if ~/.ssh or authorized_keys is writable by others.

    BWhy not this: The private key must stay on the client; authorized_keys holds only public keys.

    CWhy this is right: Testing key login in a second session before disabling passwords avoids locking yourself out.

    DWhy this is right: ssh-keygen makes the pair on the client and the public key is appended to authorized_keys.

    EWhy not this: ssh_host_* files are the server's own host keys; user keys belong in that user's authorized_keys.

    FWhy not this: PermitRootLogin governs only root; PasswordAuthentication is what turns off passwords for all users.

    The public key goes in authorized_keys, permissions must satisfy StrictModes, and testing in a second session prevents a lockout. The private key must never leave the client; authorized_keys holds only public keys. The ssh_host files hold the server's own host keys, and PermitRootLogin controls only root's logins.

    Open this question
  18. Question 118

    Security

    A security baseline requires that users cannot run remote graphical applications through SSH sessions to a server. Which sshd_config directive meets the requirement?

    Show the answer

    Correct answerB. X11Forwarding no

    AWhy not this: AllowTcpForwarding controls TCP port forwarding with -L and -R; X11 forwarding is a separate channel it does not block.

    BWhy this is right: X11Forwarding no makes sshd refuse X11 forwarding requests, so graphical applications cannot be forwarded.

    CWhy not this: PermitTunnel controls tun/tap device forwarding for VPN-style tunnels, not X11 traffic.

    DWhy not this: AllowAgentForwarding controls forwarding of the SSH agent's keys, not graphical application traffic.

    With X11Forwarding no, sshd rejects X11 forwarding requests, which reduces exposure of the client's X display to a compromised server. It does not just hide a variable; the forwarding channel is never set up.

    Open this question
  19. Question 119

    Security

    Members of the sftponly group are confined with ChrootDirectory /srv/sftp/%u in a Match Group block. Their sessions close immediately, and the log shows that /usr/lib/openssh/sftp-server cannot be executed. The global Subsystem line points to that binary. Which change BEST fixes this without copying binaries and libraries into each chroot?

    Show the answer

    Correct answerC. Change the Subsystem line to internal-sftp so the server handles SFTP itself

    internal-sftp runs inside the sshd process, so the chroot needs no binaries or libraries. Pointing ChrootDirectory at / defeats the confinement and does not meet the requirement.

    Open this question
  20. Question 120

    Security

    An administrator wants the sshd jail to ban any source address that fails authentication three times within a ten-minute window. Which pair of jail settings achieves this?

    Show the answer

    Correct answerB. maxretry = 3 and findtime = 10m

    maxretry sets the number of failures allowed and findtime sets the window in which they are counted. bantime only controls how long a ban lasts after it triggers, so it does not define the detection window.

    Open this question