Skip to main content

Command Palette

Search for a command to run...

Apache Obfuscation by disabling trace and server tokens

Published
•1 min read•View as Markdown
Apache Obfuscation by disabling trace and server tokens
L

Known for his open source and JavaScript security initiatives, Liran Tal is an award-winning software developer, security researcher, and open source champion in the JavaScript community. He's an internationally recognized GitHub Star, acknowledged for his open source advocacy, and has received the OpenJS Foundation's Pathfinder for Security for his work on Node.js security. His contributions to developer security education include leading OWASP projects, building supply chain security tools, participation in CNCF and OpenSSF initiatives, and authoring books such as O'Reilly's Serverless Security. He leads the developer advocacy team at Snyk.io and is on a mission to empower developers with better application security skills.

Mar 9, 2015 ~ 1 min read

Apache Obfuscation by disabling trace and server tokens

share this story on

Preventative measures to mitigate leaking the server software running

Apache Obfuscation can be achieved very easily and the benefits are great – it doesn’t disclose server information such as versions, OS, and does output verbose errors when ‘bad things happen’, and they happen.

2870445260_82be0db1db_z

Edit apache configuration, usually available here for RedHat based distributions: /etc/httpd/conf/httpd.conf

Make sure the following settings are present, save, and restart apache:

TraceEnable Off
ServerSignature Off
ServerTokens Prod

How do we test that this is actually working?

How to TraceEnable

  1. curl -v -X TRACE http://…
  2. Confirm you get a forbidden response

How test ServerTokens

  1. Make a request to the website and check the response headers
  2. Confirm the response contains only “Apache” information in the Server header

How to test ServerSignature

  1. Make a request to the website for a URL that should respond with Apache server error
  2. Confirm you don’t see information about the apache server software version, OS, etc.

More from this blog

Liran Tal's blog

178 posts

Author of Node.js Secure Coding, Awarded GitHub Star and OpenJS Foundation's Pathfinder Award for Security. Security researcher, advocate for open source, web security and kindness.