-
Notifications
You must be signed in to change notification settings - Fork 603
[Rule Tuning] File Transfer or Listener Established via Netcat #5223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Rule: Tuning - GuidelinesThese guidelines serve as a reminder set of considerations when tuning an existing rule. Documentation and Context
Rule Metadata Checks
Testing and Validation
|
⛔️ Test failed Results
|
⛔️ Test failed Results
|
not process.command_line like~ ("*127.0.0.1*", "*localhost*")] | ||
[network where host.os.type == "linux" and (process.name == "nc" or process.name == "ncat" or process.name == "netcat" or | ||
process.name == "netcat.openbsd" or process.name == "netcat.traditional")] | ||
[network where host.os.type == "linux" and process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the network event is really necessary here ? (the 1st event of the seq should be enough to triage and less performance req)
process where host.os.type == "linux" and event.type == "start" and
process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional") and (
/* bind shell to specific port or listener */
process.args:("-*l*","-*p*")
/* reverse shell to command-line interpreter used for command execution */
or (process.args: "-e" and process.args:("/bin/bash","/bin/sh"))
/* file transfer via stdout */
or process.args:(">","<")
/* file transfer via pipe */
or (process.args:("|") and process.args:("nc","ncat"))
) and
not process.command_line like~ ("*127.0.0.1*", "*localhost*")
sequence by process.entity_id with maxspan=1m | ||
[process where host.os.type == "linux" and event.type == "start" | ||
process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional") and ( | ||
/* bind shell to specific port or listener */ | ||
or process.args:("-*l*","-*p*") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sequence by process.entity_id with maxspan=1m | |
[process where host.os.type == "linux" and event.type == "start" | |
process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional") and ( | |
/* bind shell to specific port or listener */ | |
or process.args:("-*l*","-*p*") | |
sequence by process.entity_id with maxspan=1m | |
[process where host.os.type == "linux" and event.type == "start" and | |
process.name in ("nc","ncat","netcat","netcat.openbsd","netcat.traditional") and ( | |
/* bind shell to specific port or listener */ | |
process.args:("-*l*","-*p*") |
Summary
Tuning this rule to ensure it is not bypassed through double command-line flag usage.