Web applications attacks/HTML comments

From aldeid
Jump to navigation Jump to search

Description

HTML comments enable developers to put comments in the code of a HTML page. It helps future developers to better understand the code. These comments, unlike PHP comments, are visible in the page that is sent to the browser. Hackers massively use these comments because it can provide useful information (passwords, hidden pages or directories, etc.).

Example

Protection

Avoid putting critical information in HTML comments.

Tools

Web Application Attack and Audit Framework (W3AF) is an automated tool that enables to detect web applications vulnerabilities. It has a "findComment" plugin, included in the "grep" module, that automatizes the detection of comments in the source code of HTML pages.

Comments