Remote Services: SSH T1021.004

Tactic: Lateral Movement

Adversaries may use Valid Accounts to log into remote machines using Secure Shell (SSH). The adversary may then perform actions as the logged-on user.

Events covered

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

Authoring guide

Patterns shared across the 41 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 (47 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
EventType18eq 12, in 6exec, ssh_login, ProcessRollup2, creation, IntrusionEvent
host.os.type15eq 15
process_name11in 6, eq 4, is_not_null 1, wildcard 1ftp, plink.exe, scp, ssh, *.elf
event.type10eq 7, in 3start, change, creation, process_started
CommandLine8contains 3, eq 3, in 2sshd, -r , *-D *, *-L *, *-N *
event.category8eq 8file, authentication, process
Image6ends_with 4, eq 1, starts_with 1./, /boot/, /dev/shm/, /rsync, /scp
event.outcome6eq 6success, failure
process.args5eq 3, ends_with 1, in 1, starts_with 1-L, -R, -X, -Y, -c
sourcetype4eq 3, in 1cisco:sfw:estreamer, cisco:ios, vmw-syslog, vmware:esxlog*
EventData3contains 3-encodedcommand, add-windowscapability, name, openssh.server, powershell.exe
ParentImage3ends_with 1, eq 1, is_not_null 1/usr/sbin/sshd, \itsmservice.exe
TargetFilename3in 1, starts_with 1, wildcard 1/dev/shm/, /etc/ssh/*, /home/*/.ssh/*, /root/.ssh/*, /tmp
file.name3in 2, eq 1authorized_keys, authorized_keys2, libkeyutils.so
parent_process_name3eq 2, in 1sshd, ash, bash, csh

Top indicator values (256 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
6606
event.outcomeeq
success
5251
EventTypeeq
exec
4171
EventTypeeq
ssh_login
33
EventTypeeq
IntrusionEvent
218
EventTypeeq
creation
225
event.categoryeq
file
431
event.categoryeq
authentication
331
EventTypein
ProcessRollup2
3117
EventTypein
exec
3171
EventTypein
exec_event
2139
EventTypein
start
2134
CommandLineeq
sshd
22
esf.event_typeeq
9
215
event.typein
change
216
event.typein
creation
215
file.namein
authorized_keys
23
file.namein
authorized_keys2
23
parent_process_nameeq
sshd
22
process_namein
ftp
25
process_namein
scp
26
process_namein
sftp
26
process_namein
sftp-server
23
process_namein
ssh
26
process_namein
sshd
25
process_namein
vsftpd
23
sourcetypeeq
cisco:sfw:estreamer
232
CommandLinecontains
-r
110
CommandLinecontains
--pty
1
CommandLinecontains
-encodedcommand
13

Exclusions (155 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
TargetFilenamestarts_with
/var/tmp/ansible-tmp-
2
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
EventDatacontains
gc_service.exe
1
EventDatacontains
gc_worker.exe
1
Imageeq
/home/sa-ansible
1
Imageeq
/library/developer/commandlinetools/usr/bin/git
1
Imageeq
/opt/jc/bin/jumpcloud-agent
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 10 rules

Elastic 19 rules

Splunk 9 rules

Kusto 1 rule

Panther 2 rules