@@ -124,20 +124,19 @@ tags = [
124124]
125125type = " eql"
126126query = '''
127- sequence by process.entity_id with maxspan=1m
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*")]
140- [network where host.os.type == "linux" and process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional")]
127+ process where host.os.type == "linux" and event.type == "start" and
128+ process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional") and
129+ (
130+ /* bind shell to specific port or listener */
131+ process.args:("-*l*","-*p*") or
132+ /* reverse shell to command-line interpreter used for command execution */
133+ (process.args:("-*e*")) or
134+ /* file transfer via stdout */
135+ process.args:(">","<") or
136+ /* file transfer via pipe */
137+ (process.args:"|")
138+ ) and
139+ not process.command_line like~ ("*127.0.0.1*", "*localhost*")
141140'''
142141
143142[[rule .threat ]]
0 commit comments