Remote Service Session Hijacking T1563

Tactic: Lateral Movement

Adversaries may take control of preexisting sessions with remote services to move laterally in an environment. Users may use valid credentials to log into a service specifically designed to accept remote connections, such as telnet, SSH, and RDP. When a user logs into a service, a session will be established that will allow them to maintain a continuous interaction with that service.

Events covered

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

Authoring guide

Patterns shared across the 18 rules above: which fields they filter on, what specific values they look for, and what they exclude. The catalog normalizes field names across vendors so Sigma's Image, Elastic's process.name, and Splunk's process_name collapse into one row. Each rule contributes at most once per row.

Fields filtered most (29 distinct)

The fields most rules look at when detecting this technique. The How column shows the operators authors use (eq, wildcard, regex_match, match) and how often each appears. Sample values are concrete examples to start from, not an exhaustive list.

FieldRulesHowSample values
event.type8eq 6, in 2start, change, creation
EventType7eq 4, in 3exec, ProcessRollup2, connection_attempted, creation, end
host.os.type7eq 7
process_name7eq 3, in 2, is_not_null 1, match 1, wildcard 1(?i)rdpclip.exe, (?i)tstheme.exe, *.elf, *.lua*, *.php*
CommandLine5contains 4, eq 1 /dest:rdp-tcp#, /dest:rdp-tcp, /usr/sbin/sshd -D -R, dest:rdp-, noconsentprompt
event.category4eq 4file, process, registry
Image3ends_with 1, eq 1, starts_with 1./, /boot/, /dev/shm/, /expect, /screen
file.name3in 2, eq 1authorized_keys, authorized_keys2, libkeyutils.so
parent_process_name3eq 3sshd, svchost.exe
process.args3starts_with 2, eq 1-c, /shadow:, http://nossl.segfault.net/, https://github.com/hackerschoice/, https://gsocket.io/
EventID2eq 21149, 4688, 4778, 4779
TargetFilename2in 1, wildcard 1/etc/ssh/*, /home/*/.ssh/*, /root/.ssh/*, /usr/bin/scp, /usr/bin/sftp
esf.event_type2eq 2135, 136, 9
Details1eq 10x00000001, 0x00000002, 0x00000003
ImagePath1contains 1/dest:rdp-, tscon

Top indicator values (134 distinct)

Specific (field, operator, value) combinations the rules check for, ranked by how many rules under this technique use each one. The Corpus reach column counts how many rules across the entire catalog (any technique) check the same combination. High numbers point to widely-used indicators that are likely noisy on their own; combine them with another condition for useful signal. Blank means the combination is specific to rules under this technique. Click a value to expand the rules under this technique that use it.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
5606
event.typeeq
change
277
EventTypeeq
exec
3171
EventTypein
ProcessRollup2
2117
EventTypein
exec
2171
event.categoryeq
file
231
event.categoryeq
process
2128
event.typein
change
216
event.typein
creation
215
file.namein
authorized_keys
23
file.namein
authorized_keys2
23
parent_process_nameeq
sshd
22
CommandLinecontains
/dest:rdp-tcp#
1
CommandLinecontains
/dest:rdp-tcp
1
CommandLinecontains
dest:rdp-
1
CommandLinecontains
noconsentprompt
1
CommandLinecontains
shadow:
1
CommandLinecontains
tscon
1
CommandLineeq
/usr/sbin/sshd -D -R
1
Detailseq
0x00000001
163
Detailseq
0x00000002
14
Detailseq
0x00000003
1
Detailseq
0x00000004
14
Detailseq
1
113
Detailseq
2
13
Detailseq
3
12
Detailseq
4
13
EventIDeq
1149
1
EventIDeq
4688
1313
EventIDeq
4778
12

Exclusions (121 distinct)

Field/operator/value combinations excluded by rules under this technique (top-level not() clauses), sorted by how many rules exclude each. These are the false-positive paths the community has learned to filter out. A new rule that ignores the high-count entries here will likely fire on the same noisy paths. Click a value to expand the rules under this technique that exclude it.

FieldKindValueRules excluding
CommandLinecontains
ansible
1
CommandLinecontains
become-success
1
CommandLinein
-bash
1
CommandLinein
-sh
1
CommandLinein
-zsh
1
CommandLinewildcard
*BECOME-SUCCESS*
1
CommandLinewildcard
*ansible*
1
CommandLinewildcard
sh -c -- /usr/bin/env -i PATH=*
1
CommandLinewildcard
sh -c /usr/bin/env -i PATH=*
1
Imageeq
/home/sa-ansible
1
Imageeq
/library/developer/commandlinetools/usr/bin/git
1
Imageeq
/opt/jc/bin/jumpcloud-agent
1
Imageeq
/opt/puppetlabs/puppet/bin/puppet
1
Imageeq
/usr/bin/bsdtar
1
Imageeq
/usr/bin/chef-client
1

Rules under this technique

Every rule in the catalog tagged with this technique, grouped by vendor. Click a rule title for its full predicates, exclusions, and indicators.

Platform (all)
Domain (all)

Sigma 6 rules

Elastic 9 rules

Splunk 3 rules