A team is building a baseline image for internet-facing Linux web servers and wants to reduce their attack surface before deployment. Which four actions are hardening measures for the image? (Choose four.)
Choose 4 answers
Show the answer
Correct answersA. Delete default accounts and replace vendor-default credentialsC. Enforce a secure-configuration benchmark through configuration managementD. Limit the host firewall to the inbound ports the application requiresF. Remove unused packages and disable services the application does not need
AWhy this is right: Default accounts and vendor credentials are well-known entry points, so removing them is core hardening.
BWhy not this: Scanning finds weaknesses after deployment; it is vulnerability management, not a change to the image's configuration.
CWhy this is right: A benchmark enforced by configuration management keeps settings secure and stops them drifting back.
DWhy this is right: Allowing only required inbound ports closes network paths to services that have no business need.
EWhy not this: Central log collection aids detection and evidence retention but leaves the exposed surface unchanged.
FWhy this is right: Removing unneeded software and services eliminates code and listeners an attacker could target.
Hardening shrinks the attack surface by removing or locking down what the system does not need: unused services, default accounts, unenforced settings and open ports. Log forwarding and scanning support detection and vulnerability management but do not reduce the image's own exposure.