Detection rules › Splunk

TOR Traffic

Status
production
Severity
medium
Group by
All_Traffic.action, All_Traffic.app, All_Traffic.bytes, All_Traffic.bytes_in, All_Traffic.bytes_out, All_Traffic.dest, All_Traffic.dvc, All_Traffic.protocol, All_Traffic.protocol_version, All_Traffic.rule, All_Traffic.src, All_Traffic.src_port, All_Traffic.transport, All_Traffic.user, All_Traffic.vendor_product, dest_ip, destination_port, src_ip
Author
David Dorsey, Bhavin Patel, Splunk
Source
github.com/splunk/security_content

The following analytic identifies allowed network traffic to The Onion Router (TOR), an anonymity network often exploited for malicious activities. It leverages data from Next Generation Firewalls, using the Network_Traffic data model to detect traffic where the application is TOR and the action is allowed. This activity is significant as TOR can be used to bypass conventional monitoring, facilitating hacking, data breaches, and illicit content dissemination. If confirmed malicious, this could lead to unauthorized access, data exfiltration, and severe compliance violations, compromising the integrity and security of the network.

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1090.003 Proxy: Multi-hop Proxy

Rule body splunk

name: TOR Traffic
id: ea688274-9c06-4473-b951-e4cb7a5d7a45
version: 17
creation_date: '2019-10-16'
modification_date: '2026-05-13'
author: David Dorsey, Bhavin Patel, Splunk
status: production
type: TTP
description: |
    The following analytic identifies allowed network traffic to The Onion Router (TOR), an anonymity network often exploited for malicious activities.
    It leverages data from Next Generation Firewalls, using the Network_Traffic data model to detect traffic where the application is TOR and the action is allowed.
    This activity is significant as TOR can be used to bypass conventional monitoring, facilitating hacking, data breaches, and illicit content dissemination.
    If confirmed malicious, this could lead to unauthorized access, data exfiltration, and severe compliance violations, compromising the integrity and security of the network.
data_source:
    - Palo Alto Network Traffic
    - Cisco Secure Firewall Threat Defense Connection Event
search: |-
    | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Network_Traffic WHERE
    All_Traffic.app=tor
    All_Traffic.action IN ("allowed", "allow")
    BY All_Traffic.action All_Traffic.app All_Traffic.bytes
       All_Traffic.bytes_in All_Traffic.bytes_out All_Traffic.dest
       All_Traffic.dest_ip All_Traffic.dest_port All_Traffic.dvc
       All_Traffic.protocol All_Traffic.protocol_version All_Traffic.src
       All_Traffic.src_ip All_Traffic.src_port All_Traffic.transport
       All_Traffic.user All_Traffic.vendor_product All_Traffic.rule
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `drop_dm_object_name("All_Traffic")`
    | `tor_traffic_filter`
how_to_implement: |
    In order to properly run this search, Splunk needs to ingest data from Next Generation Firewalls like, Cisco Secure Firewall Threat Defense, Palo Alto Networks Firewalls or other network control devices that mediate the traffic allowed into an environment. This is necessary so that the search can identify an 'action' taken on the traffic of interest. The search requires the Network_Traffic data model to be populated.
known_false_positives: |
    No false positives have been identified at this time.
references:
    - https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA10g000000ClRtCAK
    - https://unit42.paloaltonetworks.com/tor-traffic-enterprise-networks/#:~:text=For%20enterprises%20concerned%20about%20the,the%20most%20important%20security%20risks.
drilldown_searches:
    - name: View the detection results for - "$src_ip$"
      search: '%original_detection_search% | search  src_ip = "$src_ip$"'
      earliest_offset: $info_min_time$
      latest_offset: $info_max_time$
    - name: View risk events for the last 7 days for - "$src_ip$"
      search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$src_ip$") | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
      earliest_offset: 7d
      latest_offset: "0"
finding:
    title: Suspicious network traffic allowed using TOR has been detected from $src_ip$ to $dest_ip$
    entity:
        field: src_ip
        type: system
        score: 50
analytic_story:
    - Prohibited Traffic Allowed or Protocol Mismatch
    - Ransomware
    - NOBELIUM Group
    - Command And Control
    - Cisco Secure Firewall Threat Defense Analytics
    - Interlock Ransomware
asset_type: Endpoint
mitre_attack_id:
    - T1090.003
product:
    - Splunk Enterprise
    - Splunk Enterprise Security
    - Splunk Cloud
category: network
security_domain: network
tests:
    - name: Palo Alto True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1090.003/pan_tor_allowed/pan_tor_allowed.log
          source: not_applicable
          sourcetype: pan:traffic
      test_type: unit
    - name: Cisco Secure Firewall True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/cisco_secure_firewall_threat_defense/connection_event/connection_events.log
          source: not_applicable
          sourcetype: cisco:sfw:estreamer
      test_type: unit

Stages and Predicates

Stage 1: tstats

| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime FROM datamodel=Network_Traffic WHERE
All_Traffic.app=tor
All_Traffic.action IN ("allowed", "allow")
BY All_Traffic.action All_Traffic.app All_Traffic.bytes
   All_Traffic.bytes_in All_Traffic.bytes_out All_Traffic.dest
   All_Traffic.dest_ip All_Traffic.dest_port All_Traffic.dvc
   All_Traffic.protocol All_Traffic.protocol_version All_Traffic.src
   All_Traffic.src_ip All_Traffic.src_port All_Traffic.transport
   All_Traffic.user All_Traffic.vendor_product All_Traffic.rule

Stage 2: search

| `security_content_ctime(firstTime)`

Stage 3: search

| `security_content_ctime(lastTime)`

Stage 4: search

| `drop_dm_object_name("All_Traffic")`

Stage 5: search

| `tor_traffic_filter`

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
All_Traffic.actionin
  • "allow"
  • "allowed"
All_Traffic.appeq
  • tor