Skip to content

Commit 1a65763

Browse files
committed
Formatting
1 parent 5422265 commit 1a65763

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

rules/linux/execution_file_transfer_or_listener_established_via_netcat.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,18 @@ tags = [
125125
type = "eql"
126126
query = '''
127127
sequence by process.entity_id with maxspan=1m
128-
[process where host.os.type == "linux" and event.type == "start"
129-
process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional") and (
130-
/* bind shell to specific port or listener */
131-
or process.args:("-*l*","-*p*")
132-
/* reverse shell to command-line interpreter used for command execution */
133-
or (process.args:("-e") and process.args:("/bin/bash","/bin/sh"))
134-
/* file transfer via stdout */
135-
or process.args:(">","<")
136-
/* file transfer via pipe */
137-
or (process.args:("|") and process.args:("nc","ncat"))
138-
) and
139-
not process.command_line like~ ("*127.0.0.1*", "*localhost*")]
128+
[process where host.os.type == "linux" and event.type == "start" and
129+
process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional") and
130+
(
131+
/* bind shell to specific port or listener */
132+
process.args:("-*l*","-*p*") or
133+
/* reverse shell to command-line interpreter used for command execution */
134+
(process.args:("-e") and process.args:("/bin/bash","/bin/sh")) or
135+
/* file transfer via stdout */
136+
process.args:(">","<") or
137+
/* file transfer via pipe */
138+
(process.args:("|") and process.args:("nc","ncat"))
139+
) and not process.command_line like~ ("*127.0.0.1*", "*localhost*")]
140140
[network where host.os.type == "linux" and process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional")]
141141
'''
142142

0 commit comments

Comments
 (0)