Protocol Tunneling T1572

Tactic: Command & Control

Adversaries may tunnel network communications to and from a victim system within a separate protocol to avoid detection/network filtering and/or enable access to otherwise unreachable systems. Tunneling involves explicitly encapsulating a protocol within another. This behavior may conceal malicious traffic by blending in with existing traffic and/or provide an outer layer of encryption (similar to a VPN). Tunneling could also enable routing of network packets that would otherwise not reach their intended destination, such as SMB, RDP, or other traffic that would be filtered by network appliances or not routed over the Internet.

Events covered

22 catalog events are tagged with this technique by at least one rule.

Authoring guide

These 99 rules share fields, values, and exclusions.

Fields filtered most (68 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
CommandLine35contains 20, regex_match 11, in 6, wildcard 1(?i)(\-\-dns)?((\s+)|(\=))?((server\=)|(host\=))?((\d{1,3..., (?i)(tcp\s+(139|445|3389|5985|5986))|(\.exe\s+|(authtoken..., (?i)\-(L|R|N|D|C)|IdentitiesOnly=yes|StrictHostKeyChecking=no|ssh, *connect=*, *http*
process_basename27eq 21, in 8, starts_with 5, ne 13proxy, chisel*, proxychains, bash, csh
event.type26eq 26start, change
EventType23eq 12, in 10, is_null 1exec, ProcessRollup2, exec_event, start,
process.args23eq 17, in 7, starts_with 7, contains 6, wildcard 5, regex_match 4, ends_with 1*--outbound-http-proxy-listen*, *--socks5-server*, *:*, --listen, --preproxy
EventID18eq 17, in 11, 4688, 4104, 17, 18
Image11ends_with 9, eq 1, is_not_null 1\plink.exe, \ssh.exe, \svchost.exe, , ?:\Windows\System32\OpenSSH\ssh.exe
DestinationHostname9ends_with 7, contains 2.localto.net, .localtonet.com, tunnel.ap.ngrok.com, tunnel.au.ngrok.com, tunnel.eu.ngrok.com
Initiated9eq 9true
QueryName6ends_with 2, is_not_null 2, contains 1, in 1, regex_match 1, *.ngrok.com, *.ngrok.io, .devtunnels.ms, .v2.argotunnel.com
parent_process_basename6in 5, eq 1, starts_with 1, wildcard 1bash, csh, ash, .*, *.sh
OriginalFileName5eq 5Plink, cloudflared.exe, curl.exe, plink.exe, vpnbridge*.exe
process.args_count5ge 54, 3, 6
process_name5regex_match 5(?i)ngrok\.exe, (?i)^ssh\.exe
ParentImage4starts_with 2, is_not_null 1, wildcard 1/dev/shm/*, /boot/*, /home/*, , ./*

Top indicator values (582 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
251036
EventTypeeq
exec
9547
EventTypein
ProcessRollup2
9119
EventTypein
exec
9180
EventTypein
exec_event
9135
EventTypein
start
9157
EventTypein
executed
585
EventTypein
process_started
577
Initiatedeq
true
950
EventIDeq
1
6226
EventIDeq
4688
5284
EventIDeq
4104
4269
parent_process_basenamein
bash
560
parent_process_basenamein
csh
537
parent_process_basenamein
dash
538
parent_process_basenamein
fish
538
parent_process_basenamein
ksh
538
parent_process_basenamein
sh
560
parent_process_basenamein
tcsh
538
parent_process_basenamein
zsh
560
CommandLinecontains
*connect=*
44
CommandLinecontains
*restrict=off*
44
CommandLinecontains
*:3389*
34
CommandLinecontains
*Tunnel*
36
process.argsstarts_with
-R*
46
process.args_countge
4
48
CommandLinein
*http*
33
CommandLineregex_match
(?i)(\-\-dns)?((\s+)|(\=))?((server\=)|(host\=))?((\d{1,3}\.\d{1,3}\.\d{1,3}\...
33
CommandLineregex_match
(?i)(tcp\s+(139|445|3389|5985|5986))|(\.exe\s+|(authtoken\s|start\s+--all))|(...
33
CommandLineregex_match
(?i)\-(L|R|N|D|C)|IdentitiesOnly=yes|StrictHostKeyChecking=no|ssh
33

Exclusions (257 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
Imagein
/usr/bin/podman
2
ParentCommandLineeq
runc init
2
ParentImagewildcard
/home/linuxbrew/.linuxbrew/Caskroom/codex/*/codex-x86_64-unknown-linux-musl
2
dest_ipcidr_match
10.0.0.0/8
2
dest_ipcidr_match
127.0.0.0/8
2
dest_ipcidr_match
169.254.0.0/16
2
dest_ipcidr_match
172.16.0.0/12
2
dest_ipcidr_match
192.168.0.0/16
2
CommandLinecontains
-blockdev
1
CommandLinecontains
-cdrom
1
CommandLinecontains
type=virt
1
CommandLinecontains
*ansible*
1
CommandLinestarts_with
/usr/bin/python3 /usr/bin/gssh-agent /usr/bin/ssh -N -o BatchMode=yes *
1
CommandLinestarts_with
ssh -C -o ControlMaster=auto -o ControlPersist=60s *
1
CurrentDirectorycontains
*ansible*
1

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Sigma 27 rules

Elastic 34 rules

Splunk 28 rules

Kusto 10 rules