HTTP 安全标头 - HTTPS 服务器中缺少 HTTP 严格传输安全 (HSTS) (RFC 6797)

HTTP 安全标头 - HTTPS 服务器中缺少 HTTP 严格传输安全 (HSTS) (RFC 6797)

9200
Created On 03/17/23 14:18 PM - Last Modified 02/02/24 06:02 AM


Symptom


  • 在 PAN-OS 10.2.x 的 Pentest 扫描期间,HTTP 安全标头报告为丢失。
  • 这可以通过 curl 命令进行检查。
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
  • 上面的标头输出不显示“Strict-Transport-Security”,但它也将页面重定向到 /php /login.php 并找到 HTTP 302。
  • 在检查重定向页面 /php/loginphp 中的标头时,它显示安全标头“Strict-Transport-Security: max-age=31536000”,如下所示。
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, OPTIONS


Environment


  • 帕洛阿尔托防火墙
  • PanOS 10.2.x
  • 管理界面
  • HTTPS


Cause


管理接口的根 URL 缺少基本 URL 中的以下安全标头。
Strict-Transport-Security: max-age=31536000


Resolution


  1. 根 URL 执行 302 重定向到具有“Strict-Transport-Security”标头的登录页面。
  2. 由于重定向的页面具有“Strict-Transport-Security”,因此不存在漏洞或风险。
  3. 此问题已在 PAN-OS 10.2.4 /11.0.0 版本及更高版本中得到解决。


Additional Information


在 10.1 的 8.0.18、8.1.9、9.0.4 和 9.1.5 中,这不是问题。

Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000sb6ECAQ&lang=zh_CN&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language