Obfuscated Files or Information: Command Obfuscation T1027.010

Tactic: Stealth

Adversaries may obfuscate content during command execution to impede detection. Command-line obfuscation is a method of making strings and patterns within commands and scripts more difficult to signature and analyze. This type of obfuscation can be included within commands executed by delivered payloads (e.g., Phishing and Drive-by Compromise) or interactively via Command and Scripting Interpreter.

Events covered

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

Authoring guide

Patterns shared across the 39 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 (31 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
CommandLine16contains 9, regex_match 3, wildcard 3, eq 1, in 1, length_compare 1, match 1 -c, .decode, [Ѐ-ӿͰ-Ͽa-zA-Z0-9], b16decode,
Esql.script_block_pattern_count10ge 101, 2, 20, 5
Esql.script_block_length9gt 9500, 1000
OriginalFileName7eq 5, contains 1, in 1powershell.exe, pwsh.dll, powershell_ise.exe, bitsadmin.exe, certreq.exe
ScriptBlockText7contains 5, eq 2, in 2, match 1$env:comspec[4, $pshome[, $shellid[, +, -replace
event.type7eq 7start
Image6ends_with 3, contains 2, wildcard 1\powershell.exe, \pwsh.exe, /python, ?:\users\*\appdata\*\node.exe, \device\harddiskvolume*\users\*\appdata\*\node.exe
process_name6eq 4, in 2, starts_with 1, wildcard 1base16, base32, base64, powershell.exe, bitsadmin.exe
file.directory5is_null 5
EventType4eq 2, in 1, ne 1exec, ProcessRollup2, exec_event, fork
event.category4eq 4process
process.args4eq 3, starts_with 2, wildcard 2, contains 1, ends_with 1, in 1$*$*;set-alias, &{', *-*d*, *lua*, *perl*
Details3contains 3 , #,             , .aescryptoserviceprovider, .descryptoserviceprovider
Esql.script_block_ratio3gt 2, ge 10.35, 0.5, 0.75
EventID3eq 31, 4103, 4104, 4688

Top indicator values (456 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
7606
Esql.script_block_lengthgt
500
66
Esql.script_block_lengthgt
1000
33
Esql.script_block_pattern_countge
1
66
event.categoryeq
process
4128
OriginalFileNameeq
powershell.exe
3120
OriginalFileNameeq
pwsh.dll
3112
process_nameeq
powershell.exe
3104
CommandLinecontains
-c
25
CommandLinecontains
.decode
22
CommandLinecontains
b16decode
22
CommandLinecontains
b32decode
22
CommandLinecontains
b32hexdecode
22
CommandLinecontains
b64decode
24
CommandLinecontains
b85decode
22
CommandLinecontains
base64
211
CommandLinecontains
import
24
CommandLinecontains
z85decode
22
CommandLineregex_match
[Ѐ-ӿͰ-Ͽa-zA-Z0-9]
22
Detailscontains
22
Detailscontains
#
23
Detailscontains
            
22
Detailscontains
            
22
Detailscontains
            
22
Detailscontains
            
22
Detailscontains
            
22
Detailscontains
            
22
Detailscontains
            
22
Detailscontains
            
22
Detailscontains
            
22

Exclusions (56 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
& {$j = sajb {add-type -assemblyname
1
CommandLinecontains
use-icinga -minimal
1
CurrentDirectorywildcard
/opt/microsoft/omsagent/plugin
1
CurrentDirectorywildcard
/opt/rapid7/ir_agent/*
1
CurrentDirectorywildcard
/opt/zeek
1
CurrentDirectorywildcard
/proc/self/fd/*/usr/local/zeek
1
CurrentDirectorywildcard
/tmp/newroot/*
1
CurrentDirectorywildcard
/usr/local/zeek
1
CurrentDirectorywildcard
/usr/local/zeek_old_install
1
CurrentDirectorywildcard
/var/lib/docker/overlay2/*/opt/zeek
1
CurrentDirectorywildcard
/var/lib/docker/overlay2/*/usr/local/zeek
1
ParentCommandLinecontains
extendedglob
1
ParentImagein
/etc/cron.daily/opera-browser
1
ParentImagein
/etc/cron.daily/vivaldi
1
ParentImagein
/usr/share/ec2-instance-connect/eic_curl_authorized_keys
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 24 rules

Splunk 5 rules