id: disable-server-header info: name: Disable Server Header in Apache2 author: pussycat0x severity: medium description: | Ensures that 'ServerTokens Prod' and 'ServerSignature Off' are correctly set in Apache to prevent server information leakage. remediation: | Set 'ServerTokens Prod' and 'ServerSignature Off' in Apache configuration and restart the service. reference: - https://wiki.devsecopsguides.com/docs/checklists/apache/ - https://httpd.apache.org/docs/2.4/mod/core.html#serversignature metadata: verified: true tags: audit,config,auth,apache,hardening javascript: - pre-condition: | isPortOpen(Host,Port); code: | var m = require("nuclei/ssh"); var c = m.SSHClient(); c.Connect(Host,Port,User,Pass); const ApacheConfig = c.Run(Code) ApacheConfig let result = ""; if (ApacheConfig.includes("