HTTP-Sicherheitsheader – HTTP Strict Transport Security (HSTS) fehlt auf dem HTTPS-Server (RFC 6797)
9272
Created On 03/17/23 14:18 PM - Last Modified 02/02/24 06:02 AM
Symptom
- Während des Pentest-Scans von PAN-OS 10.2.x wird der HTTP-Sicherheitsheader als fehlend gemeldet.
- Dies kann mit dem Befehl curl überprüft werden.
test-host-> curl -I -k https://w.x.y.z
HTTP/1.1 302 Found
Date: Fri, 17 Mar 2023 13:53:28 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Set-Cookie: PHPSESSID=d90l0umcr2s5b74jkvc12l0orr; path=/; secure; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Location: /php/login.php?
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONS
- Die obige Header-Ausgabe zeigt nicht "Strict-Transport-Security", sondern leitet die Seite auch an /php /login.php mit HTTP 302 Found weiter.
- Bei der Überprüfung der Header auf der umgeleiteten Seite / php/loginphp wird der Sicherheitsheader "Strict-Transport-Security: max-age=31536000" angezeigt, wie unten gezeigt.
test-host-> curl -I -k https://w.x.y.z/php/login.php
HTTP/1.1 200 OK
Date: Fri, 17 Mar 2023 13:53:54 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Cache-Control: no-store, no-cache, must-revalidate
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-ancestors 'self'
Strict-Transport-Security: max-age=31536000 <<<<-----
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Set-Cookie: PHPSESSID=6jp2219a8dfev8djdulc4eqats; path=/; secure; HttpOnly; SameSite=strict
Set-Cookie: PHPSESSID=6jp2219a8dfev8djdulc4eqats; path=/; secure; HttpOnly; SameSite=strict
Allow: GET, HEAD, POST, PUT, DELETE, OPTIONSEnvironment
- Palo Alto Firewalls
- PanOS 10.2.x
- Management-Schnittstelle
- HTTPS
Cause
In der Stamm-URL der Verwaltungsschnittstelle fehlt der folgende Sicherheitsheader aus der Basis-URL.
Strict-Transport-Security: max-age=31536000Resolution
- Die Stamm-URL leitet 302 auf die Anmeldeseite um, die den Header "Strict-Transport-Security" hat.
- Es gibt keine Schwachstelle oder Risiko, da die umgeleitete Seite die "Strict-Transport-Security" hat.
- Das Problem wurde in der Version PAN-OS 10.2.4 /11.0.0 und höher behoben.
Additional Information
In Version 8.0.18, 8.1.9, 9.0.4 und 9.1.5 in Version 10.1 ist dies kein Problem.