Enforce Apache2 ServerTokens Prod
ID: file-enforce-server-tokens-prod
Severity: medium
Author: pussycat0x
Tags: audit,config,file,apache,hardening
Description
Section titled “Description”ServerTokens should be set to ‘Prod’ to prevent Apache from exposing version details in response headers.
YAML Source
Section titled “YAML Source”id: file-enforce-server-tokens-prod
info: name: Enforce Apache2 ServerTokens Prod author: pussycat0x severity: medium description: | ServerTokens should be set to 'Prod' to prevent Apache from exposing version details in response headers. remediation: | Set 'ServerTokens Prod' in the Apache configuration file and restart the service. reference: - https://httpd.apache.org/docs/2.4/mod/core.html#servertokens metadata: verified: true tags: audit,config,file,apache,hardening
file: - extensions: - conf
matchers-condition: and matchers: - type: word words: - "<Directory" - "<FilesMatch" condition: and
- type: word words: - "ServerTokens Prod" negative: true# digest: 4a0a0047304502203e2c006ed53c2e090511e51e530a99cc72cf7fbcaba4c13b3075e2ded3bd4e81022100b2daccea27a12d56eb104781903fadfb001e031c5c7aee4b9f6e06233b12f75c:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "file/audit/apache/file-enforce-server-tokens-prod.yaml"