TCP 允许 3 向握手以匹配 Policy 允许应用" ICMP 和服务"的安全 ANY 性

TCP 允许 3 向握手以匹配 Policy 允许应用" ICMP 和服务"的安全 ANY 性

22789
Created On 03/21/19 23:01 PM - Last Modified 03/26/21 18:22 PM


Symptom


从会话浏览器上的流量日志和会话详细信息中 CLI ,观察到一些 TCP 三向握手连接与仅允许应用的安全规则相匹配 ICMP 。

测试-icmp 安全规则配置

例如,允许在端口 80 上 example.com 的电信网络会话通过此安全 policy 。
 
admin@PA> show session id 136043
Session          136043
 
       c2s flow:
                source:      192.168.243.55 [Trust-Zone]
                dst:         93.184.216.34
                proto:       6
                sport:       53792           dport:      80
                state:       ACTIVE          type:       FLOW
                src user:    unknown
                dst user:    unknown
 
 
        s2c flow:
                source:      93.184.216.34 [Untrust]
                dst:         10.129.82.243
                proto:       6
                sport:       80              dport:      28507
                state:       ACTIVE          type:       FLOW
                src user:    unknown
                dst user:    unknown
                qos node:    ethernet1/1, qos member N/A Qid 0
 
 
        start time                           : Fri Dec 28 17:44:52 2018
        timeout                              : 3600 sec
        time to live                         : 3569 sec
        total byte count(c2s)                : 264
        total byte count(s2c)                : 264
        layer7 packet count(c2s)             : 4
        layer7 packet count(s2c)             : 4
        vsys                                 : vsys1
        application                          : undecided   <<<< Application is still undecided
        rule                                 : test-icmp    <<<< Rule is the security policy allowing ICMP
        service timeout override(index)      : False
        application db                       : 0
        app.id                               : c2s node (0, 0)    s2s node (0, 0)
        session to be logged at end          : True
        session in session ager              : True
        session updated by HA peer           : False
        address/port translation             : source
        nat-rule                             : Outbound(vsys1)
        layer7 processing                    : enabled
        URL filtering enabled                : True
        URL category                         : any
        session via syn-cookies              : False
        session terminated on host           : False
        session traverses tunnel             : False
        captive portal session               : False
        ingress interface                    : ethernet1/1
        egress interface                     : ethernet1/2
        session QoS rule                     : N/A (class 4)
        end-reason                           : unknown


 


Environment


firewall具有非 TCP / UDP 应用程序(例如)的安全规则 ICMP ,服务设置 ANY 为""
TCP 握手是此规则允许的观察者,而不是进一步向下规则基础的更适当的规则。


Cause


当服务设置为 ANY "安全"时,就会发生此行为 policy 。

从安全性看 policy CLI ,您可能会看到以下信息:
admin@PA> show running security-policy

"test-icmp; index: 1" {
        from any;
        source any;
        source-region none;
        to any;
        destination any;
        destination-region none;
        user any;
        category any;
        application/service 0:icmp/any/any/any; <<<< Application is ICMP,  & Protocol IS ANY
        action allow; 
        icmp-unreachable: no
        terminal yes;


虽然 ICMP 是一个协议,但有一个专门用于申请的应用程序签名 ICMP 。 因此,只要申请会话尚未决定,流量将继续匹配允许 policy 应用程序 ICMP 和服务设置为"的安全 ANY "。
IP 协议由服务决定 PAN-OS ,而不是由应用程序决定。


 


Resolution


如果您只允许 ICMP 与特定流量匹配的流量 policy ,则将服务设置为"应用程序默认"。

用户添加的图像
 
"test-icmp; index: 1" {

        from any;
        source any;
        source-region none;
        to any;
        destination any;
        destination-region none;
        user any;
        category any;
        application/service 0:icmp/icmp/any/any;<<<< Application is ICMP & Protocol is ICMP
        action allow;
        icmp-unreachable: no
        terminal yes;


由于服务字段决定 IP 协议,当服务设置为应用程序默认时,该规则反映了协议 ICMP 。


Additional Information


TIP: A 良好的做法是始终设置应用程序默认值。

Actions
  • Print
  • Copy Link

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

Choose Language