Protocol or Port Mismatch

Original Source: [splunk source]
Name:Protocol or Port Mismatch
id:54dc1265-2f74-4b6d-b30d-49eb506a31b3
version:4
date:2024-10-17
author:Rico Valdez, Splunk
status:experimental
type:Anomaly
Description:The following analytic identifies network traffic where the higher layer protocol does not match the expected port, such as non-HTTP traffic on TCP port 80. It leverages data from network traffic inspection technologies like Bro or Palo Alto Networks firewalls. This activity is significant because it may indicate attempts to bypass firewall restrictions or conceal malicious communications. If confirmed malicious, this behavior could allow attackers to evade detection, maintain persistence, or exfiltrate data through commonly allowed ports, posing a significant threat to network security.
Data_source:
search:| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Network_Traffic where (All_Traffic.app=dns NOT All_Traffic.dest_port=53) OR ((All_Traffic.app=web-browsing OR All_Traffic.app=http) NOT (All_Traffic.dest_port=80 OR All_Traffic.dest_port=8080 OR All_Traffic.dest_port=8000)) OR (All_Traffic.app=ssl NOT (All_Traffic.dest_port=443 OR All_Traffic.dest_port=8443)) OR (All_Traffic.app=smtp NOT All_Traffic.dest_port=25) by All_Traffic.src_ip, All_Traffic.dest_ip, All_Traffic.app, All_Traffic.dest_port |`security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `drop_dm_object_name("All_Traffic")`
| `protocol_or_port_mismatch_filter`


how_to_implement:Running this search properly requires a technology that can inspect network traffic and identify common protocols. Technologies such as Bro and Palo Alto Networks firewalls are two examples that will identify protocols via inspection, and not just assume a specific protocol based on the transport protocol and ports.
known_false_positives:None identified
References:
drilldown_searches:
  :
tags:
  analytic_story:
    - 'Prohibited Traffic Allowed or Protocol Mismatch'
    - 'Command And Control'
  asset_type:Endpoint
  confidence:50
  impact:50
  message:tbd
  mitre_attack_id:
    - 'T1048.003'
    - 'T1048'
  observable:
    name:'dest'
    type:'Hostname'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'All_Traffic.app'
    - 'All_Traffic.dest_port'
    - 'All_Traffic.src_ip'
    - 'All_Traffic.dest_ip'
  risk_score:25
  security_domain:network

tests:
  :
manual_test:None