Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
[VulnWatch] vulnerabilities in fortigate firewall webinterface
From: Maarten Hartsuijker (maartenhphreaker.net)
Date: Wed Nov 12 2003 - 15:46:27 CST
Several vulnerabilities in web interface of Fortigate firewall of which
the most serious one will under specific circumstances allow a remote
attacker to obtain a username and password of the Fortigate.
pre 2.50 maintenance release 4
Issue 3 - Fortinet OS 2.50 MR4, available from FTP as of 29
Issue 1 and 2 - Fortinet OS 2.50 MR5, available from FTP as of 05 Nov.
VENDOR FIRST NOTIFIED
Advisory posted on issue 3 a month ago.
1. Improper input validation.
2. Username and MD5 hash of password are stored in cookie.
3. Web filter log parses unfiltered session details.
IMPROPER INPUT VALIDATION
The variables from several URL's are parsed in the HTML code of the
resulting web page. However, the variables are not sanitized before they are
used. Therefore, they can be used to inject code into the admin interface.
The examples below show you an simple alert box, but this could just as well
be used to:
- Steel the cookie of the user that is logged in
- Include (for instance) the Cisco homepage into the website that
is displayed after clicking the URL.
Besides, improper input validation is also a very good starting point for
other types of attacks.
USERNAME AND MD5 HASH OF PASSWORD ARE STORED IN COOKIE
The username and MD5 hash of the password are stored in a cookie like the
one below. When combining this knowledge with the previously found XSS
vulnerabilities, a remote attacker can trick an administrator into revealing
The password hash is recognized as FreeBSD, MD5 (probably the base OS of the
WEB FILTER LOG PARSES UNFILTERED SESSION DETAILS
After the web filter has been enabled, the administrator has the ability to
review the web filter logs via the web interface. The web filter logs
contain the URL that has been denied by the filter. Because of the fact that
unwanted characters are not stripped from the denied URL, a remote attacker
is able to gain the username and MD5 hash of the password, as soon as the
administrator reviews the logs.
Pages with the keyword "mp3-download" are denied by the web filter. The page
http://192.168.5.11/maarten.html contains such a keyword. A remote attacker
could poison the log files by retrieving
When altering the script a bit, the user credentials could easily be
forwarded to the attacker, who could then use these credentials to alter the
firewall if the administrator has not properly secured access to
1. A basic rule in firewall administration is to only allow connections to
the firewall-administration-options from specific IP addresses (or
preferably, specific IP addresses connecting from a management network to
the management interface of the firewall). When this best practise is
applyed, an attacker that manages to gain administration credentials as
described above, will not be able to abuse them too easily.
2. Manage your firewall from a dedicated workstation that has no connections
(directly OR through a proxy) to untrusted networks in order to avoid a
credential push as described above.
3. Upgrade FortiOS 2.50MR5, which (according to fortinet) does not contain