Connection to Internal Network via Telnet

Telnet provides a command line interface for communication with a remote device or server. This rule identifies Telnet network connections to non-publicly routable IP addresses.

Elastic rule (View on GitHub)

  2creation_date = "2020/04/23"
  3integration = ["endpoint"]
  4maturity = "production"
  5updated_date = "2024/05/21"
  8author = ["Elastic"]
  9description = """
 10Telnet provides a command line interface for communication with a remote device or server. This rule identifies Telnet
 11network connections to non-publicly routable IP addresses.
 13false_positives = [
 14    """
 15    Telnet can be used for both benign or malicious purposes. Telnet is included by default in some Linux distributions,
 16    so its presence is not inherently suspicious. The use of Telnet to manage devices remotely has declined in recent
 17    years in favor of more secure protocols such as SSH. Telnet usage by non-automated tools or frameworks may be
 18    suspicious.
 19    """,
 21from = "now-9m"
 22index = ["*"]
 23language = "eql"
 24license = "Elastic License v2"
 25name = "Connection to Internal Network via Telnet"
 26references = [""]
 27risk_score = 47
 28rule_id = "1b21abcc-4d9f-4b08-a7f5-316f5f94b973"
 29setup = """## Setup
 31This rule requires data coming in from one of the following integrations:
 32- Elastic Defend
 33- Auditbeat
 35### Elastic Defend Integration Setup
 36Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
 38#### Prerequisite Requirements:
 39- Fleet is required for Elastic Defend.
 40- To configure Fleet Server refer to the [documentation](
 42#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
 43- Go to the Kibana home page and click "Add integrations".
 44- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 45- Click "Add Elastic Defend".
 46- Configure the integration name and optionally add a description.
 47- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
 48- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](
 49- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 50- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
 51For more details on Elastic Agent configuration settings, refer to the [helper guide](
 52- Click "Save and Continue".
 53- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
 54For more details on Elastic Defend refer to the [helper guide](
 56### Auditbeat Setup
 57Auditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.
 59#### The following steps should be executed in order to add the Auditbeat on a Linux System:
 60- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
 61- To install the APT and YUM repositories follow the setup instructions in this [helper guide](
 62- To run Auditbeat on Docker follow the setup instructions in the [helper guide](
 63- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](
 64- For complete “Setup and Run Auditbeat” information refer to the [helper guide](
 66severity = "medium"
 67tags = [
 68    "Domain: Endpoint",
 69    "OS: Linux",
 70    "Use Case: Threat Detection",
 71    "Tactic: Lateral Movement",
 72    "Data Source: Elastic Defend",
 74type = "eql"
 76query = '''
 77sequence by process.entity_id
 78  [process where host.os.type == "linux" and == "telnet" and event.type == "start"]
 79  [network where host.os.type == "linux" and == "telnet" and cidrmatch(
 80     destination.ip, "", "", "", "", "", "",
 81     "", "", "", "", "", "",
 82     "", "", "", "", "", "",
 83     "", "", "", "", "", "::1", "FE80::/10",
 84     "FF00::/8"
 85    )
 86  ]
 91framework = "MITRE ATT&CK"
 93id = "T1021"
 94name = "Remote Services"
 95reference = ""
 99id = "TA0008"
100name = "Lateral Movement"
101reference = ""


Related rules