EC-Council Certified Ethical Hacker (CEH) v12Reconnaissance TechniquesMedium

A cybersecurity consultant is advising a small business on hardening its public-facing web server. During reconnaissance, an ethical hacker successfully identified the exact version of the web server software (e.g., Apache 2.4.52) and the underlying operating system (e.g., Ubuntu 20.04) by simply connecting to the web server's default port. Which countermeasure should the business prioritize to prevent this type of information disclosure?

  1. AModify or remove server banners and error messages.
  2. BDisable directory listing on the web server.
  3. CEncrypt all web traffic using HTTPS.
  4. DImplement DNSSEC for domain name resolution.
Show answer & explanation

Correct answer: A. Modify or remove server banners and error messages.

The scenario describes 'banner grabbing,' where connecting to a service (like a web server) reveals detailed version information in its banner or default error messages. Modifying or removing these banners and ensuring error messages are generic prevents attackers from easily obtaining specific software versions and OS details.

Why the other options are wrong

  • B. Disabling directory listing prevents attackers from browsing file directories, but it doesn't stop server banners from being displayed.
  • C. Encrypting traffic with HTTPS protects data in transit but does not hide the server banner or default error messages that are part of the initial connection handshake.
  • D. DNSSEC is for DNS integrity and authentication; it doesn't prevent banner grabbing from a web server.

Service Banner Grabbing Countermeasures

Actions taken to prevent the disclosure of detailed service and OS version information from server banners or default error messages, which can be used by attackers for targeted exploits.

  • Server banners reveal versions
  • Modify or remove default banners
  • Genericize error messages
  • Reduce attack surface

Memory trick: Don't shout your software version to the world.

More Reconnaissance Techniques questions