Netcat Listener Established via rlwrap

edit

Monitors for the execution of a netcat listener via rlwrap. rlwrap is a readline wrapper, a small utility that uses the GNU Readline library to allow the editing of keyboard input for any command. This utility can be used in conjunction with netcat to gain a more stable reverse shell.

Rule type: eql

Rule indices:

  • logs-endpoint.events.*

Severity: low

Risk score: 21

Runs every: 5m

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References: None

Tags:

  • Domain: Endpoint
  • OS: Linux
  • Use Case: Threat Detection
  • Tactic: Execution
  • Data Source: Elastic Defend

Version: 1

Rule authors:

  • Elastic

Rule license: Elastic License v2

Rule query

edit
process where host.os.type == "linux" and event.action == "exec" and event.type == "start" and
process.name == "rlwrap" and process.args in (
  "nc", "ncat", "netcat", "nc.openbsd", "socat"
) and process.args : "*l*" and process.args_count >= 4

Framework: MITRE ATT&CKTM