WAS Information Protection Guide: Removing Sample Files and Configuring Response Headers
Key point
To prevent exposure of WAS version and OS information, deleting unnecessary sample files and changing HTTP response header settings are essential.
Details
The type, version, and server operating system information of a WAS (Web Application Server) provides attackers with an environment that makes it easier to identify vulnerabilities and launch attacks, so it should be protected at the same level as personal information. If operated with default settings as-is, such information can be inadvertently exposed, potentially leading to financial and psychological damage.
Removing Unnecessary Files
Sample programs, manuals, and admin pages that are not needed for actual operation become attack surfaces, so they must be deleted.
- IIS: Delete directories such as
iissamples,iishelp,msadc\samplein versions 5.0/6.0 (not applicable in 7.0 and above) - Apache: Delete manual directories such as
[Apache Dir]/htdocs/manualwhen installed via compilation - Tomcat: Delete the
webapps/examples,host-manager,manager,docsdirectories - NGINX: Does not provide separate sample files or help directories
Hiding HTTP Response Header Information
To prevent the Server field in HTTP response headers from exposing WAS version and OS information, change the settings for each server.
- IIS: Install the URL Rewrite module and replace the
Serverheader value with0or similar via outbound rules - Apache: Apply
ServerTokens Prod,ServerSignature Offsettings - Tomcat: Change the
serverattribute value inserver.xmltoUnknown Serveror similar - NGINX: Apply the
server_tokens off;directive - Node.js: Add the
app.disable('x-powered-by');code to remove theX-Powered-Byheader
Customizing Status Code Pages
Since default HTTP status code pages (404, 500, etc.) may contain server information, map them to custom HTML pages suited to each server to hide the information and provide user-friendly guidance.
- IIS: Specify custom page paths for each status code using the
<httpErrors>tag inweb.config - Apache: Set file paths for each status code via the
ErrorDocumentdirective - Tomcat: Map status codes and locations using the
<error-page>tag inweb.xml - NGINX: Specify common or individual pages for 4xx, 5xx status codes using the
error_pagedirective - Spring Boot: Place HTML files for each status code in the
src/main/resources/errorfolder - Node.js: Respond with custom error pages using
res.sendFilevia Express middleware
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.