Command and Scripting Interpreter: Lua T1059.011

Tactic: Execution

Adversaries may abuse Lua commands and scripts for execution. Lua is a cross-platform scripting and programming language primarily designed for embedded use in applications. Lua can be executed on the command-line (through the stand-alone lua interpreter), via scripts (.lua), or from Lua-embedded programs (through the struct lua_State).

Events covered

1 catalog event is tagged with this technique by at least one rule.

ProviderEventTitle
ESFexecProcess Execution

Authoring guide

These 14 rules share fields, values, and exclusions.

Fields filtered most (25 distinct)

These fields appear most often in rule filters.

FieldRulesHowSample values
event.type12eq 12start
EventType11eq 7, in 4exec, ProcessRollup2, exec_event, executed, connected-to
process_name10starts_with 8, in 6, eq 5, wildcard 4, ends_with 1bash, awk, base16, base32, base64
process.args9eq 8, contains 5, wildcard 4, starts_with 3, in 2-c, */bin/*sh*, *import*pty*spawn*, *import*subprocess*call*, -e
CommandLine6contains 5, wildcard 5, length_compare 2, regex_match 1 --decode, -d, -e , *-*d*, *].pack("H*")*
host.os.type5eq 5
ParentImage3is_not_null 1, starts_with 1, wildcard 1/bin/lua*, /bin/node, /bin/perl*, /etc/update-motd.d/
Image2starts_with 2/bin/lua, /bin/perl, /bin/php, /usr/bin/lua, /usr/local/bin/lua
container.id2starts_with 2?
parent_process_name2eq 1, in 1bun, bun.exe, node, socat
process.args_count2eq 1, ge 1, le 11, 2, 3
CurrentDirectory1contains 1.next, .pnpm/next, bin/next
Esql.any_payload_keyword_max1eq 11
Esql.event_count1lt 15
Initiated1eq 1egress

Top indicator values (503 distinct)

These values appear most often in rule predicates.

FieldKindValueRules (here)Corpus reach
event.typeeq
start
121087
process_namestarts_with
python
871
process_namestarts_with
perl
636
process_namestarts_with
php
628
process_namestarts_with
ruby
636
process_namestarts_with
lua
530
process.argseq
-c
7107
process.argseq
-e
646
process.argseq
-r
319
EventTypeeq
exec
5579
process_namein
bash
5202
process_namein
dash
5170
process_namein
sh
5197
process_namein
zsh
5196
process_namein
csh
4159
process_namein
fish
4163
process_namein
ksh
4163
process_namein
tcsh
4156
process_namein
base16
312
process_namein
base32
314
process_namein
base64
320
process_namein
base64mime
310
EventTypein
exec
4206
EventTypein
start
3168
process_namewildcard
lua*
434
process_namewildcard
php*
441
process_namewildcard
python*
471
CommandLinecontains
b64decode
39
process.argscontains
base64
37
process.argscontains
socket
38

Exclusions (219 distinct)

These values appear most often in top-level exclusions.

FieldKindValueRules excluding
CurrentDirectorywildcard
/opt/zeek
2
CurrentDirectorywildcard
/proc/self/fd/*/usr/local/zeek
2
CurrentDirectorywildcard
/usr/local/zeek
2
CurrentDirectorywildcard
/usr/local/zeek_old_install
2
CurrentDirectorywildcard
/var/lib/docker/overlay2/*/opt/zeek
2
CurrentDirectorywildcard
/var/lib/docker/overlay2/*/usr/local/zeek
2
ParentCommandLinewildcard
*/home/*/.claude/shell-snapshots/snapshot-*
2
ParentImagewildcard
/usr/bin/bwrap
2
dest_ipcidr_match
127.0.0.0/8
2
dest_ipcidr_match
169.254.0.0/16
2
dest_ipcidr_match
224.0.0.0/4
2
dest_ipcidr_match
::1
2
process_namestarts_with
python
2
CommandLinecontains
127.0.0.1
1
CommandLinecontains
liblzma
1

Rules under this technique

These vendors publish rules tagged with this technique.

Platform (all)
Domain (all)

Elastic 14 rules