ID | Technique | Tactic |
---|---|---|
T1048.003 | Exfiltration Over Unencrypted Non-C2 Protocol | Exfiltration |
Detection: Protocol or Port Mismatch
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.
Search
1
2| 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 All_Traffic.transport All_Traffic.action All_Traffic.rule
3|`security_content_ctime(firstTime)`
4| `security_content_ctime(lastTime)`
5| `drop_dm_object_name("All_Traffic")`
6| `protocol_or_port_mismatch_filter`
Data Source
Name | Platform | Sourcetype | Source |
---|---|---|---|
Cisco Secure Firewall Threat Defense Connection Event | N/A | 'cisco:sfw:estreamer' |
'not_applicable' |
Macros Used
Name | Value |
---|---|
security_content_ctime | convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$) |
protocol_or_port_mismatch_filter | search * |
protocol_or_port_mismatch_filter
is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
Setting | Value |
---|---|
Disabled | true |
Cron Schedule | 0 * * * * |
Earliest Time | -70m@m |
Latest Time | -10m@m |
Schedule Window | auto |
Creates Risk Event | True |
Implementation
Running this search properly requires a technology that can inspect network traffic and identify common protocols. Technologies such as Zeek, Cisco Secure Firewall or Palo Alto Networks firewalls are examples that will identify protocols via inspection, and not just assume a specific protocol based on the transport protocol and ports.
Known False Positives
Some false positive could occur with some applications that change their default communication port for an added layer of obscurity.
Associated Analytic Story
Risk Based Analytics (RBA)
Risk Message:
Port or Protocol Traffic Mismatch
Risk Object | Risk Object Type | Risk Score | Threat Objects |
---|---|---|---|
src_ip | system | 25 | dest_ip |
Detection Testing
Test Type | Status | Dataset | Source | Sourcetype |
---|---|---|---|---|
Validation | ✅ Passing | N/A | N/A | N/A |
Unit | ✅ Passing | Dataset | not_applicable |
cisco:sfw:estreamer |
Integration | ✅ Passing | Dataset | not_applicable |
cisco:sfw:estreamer |
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub | Version: 8