Accepted Default Telnet Port Connection
This rule detects network events that may indicate the use of Telnet traffic. Telnet is commonly used by system administrators to remotely control older or embedded systems using the command line shell. It should almost never be directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or backdoor vector. As a plain-text protocol, it may also expose usernames and passwords to anyone capable of observing the traffic.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/02/18"
3integration = ["network_traffic", "panw", "fortinet_fortigate", "sonicwall_firewall", "suricata"]
4maturity = "production"
5updated_date = "2026/01/26"
6
7[rule]
8author = ["Elastic"]
9description = """
10This rule detects network events that may indicate the use of Telnet traffic. Telnet is commonly used by system
11administrators to remotely control older or embedded systems using the command line shell. It should almost never be
12directly exposed to the Internet, as it is frequently targeted and exploited by threat actors as an initial access or
13backdoor vector. As a plain-text protocol, it may also expose usernames and passwords to anyone capable of observing the
14traffic.
15"""
16false_positives = [
17 """
18 IoT (Internet of Things) devices and networks may use telnet and can be excluded if desired. Some business
19 work-flows may use Telnet for administration of older devices. These often have a predictable behavior. Telnet
20 activity involving an unusual source or destination may be more suspicious. Telnet activity involving a production
21 server that has no known associated Telnet work-flow or business requirement is often suspicious.
22 """,
23]
24from = "now-9m"
25index = [
26 "packetbeat-*",
27 "auditbeat-*",
28 "filebeat-*",
29 "logs-network_traffic.*",
30 "logs-panw.panos*",
31 "logs-fortinet_fortigate.log-*",
32 "logs-sonicwall_firewall.log-*",
33 "logs-suricata.*",
34]
35language = "kuery"
36license = "Elastic License v2"
37name = "Accepted Default Telnet Port Connection"
38note = """## Triage and analysis
39
40> **Disclaimer**:
41> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
42
43### Investigating Accepted Default Telnet Port Connection
44
45Telnet, a protocol for remote command-line access, is often used in legacy systems. Its lack of encryption makes it vulnerable, allowing attackers to intercept credentials or use it as a backdoor. The detection rule identifies unencrypted Telnet traffic on port 23, flagging connections that bypass typical security measures, thus highlighting potential unauthorized access attempts.
46
47### Possible investigation steps
48
49- Review the network traffic logs to identify the source IP address associated with the Telnet connection on port 23. Determine if the source IP is internal or external to the organization.
50- Check the destination IP address to ascertain if it belongs to a critical system or a legacy device that might still use Telnet for management purposes.
51- Investigate the timeline of the connection event to see if there are any patterns or repeated attempts, which could indicate a persistent threat or automated attack.
52- Analyze any associated user accounts or credentials used during the Telnet session to verify if they are legitimate and authorized for remote access.
53- Correlate the Telnet connection event with other security alerts or logs to identify any related suspicious activities, such as failed login attempts or unusual data transfers.
54- Assess the network segment where the Telnet traffic was detected to determine if it is appropriately segmented and secured against unauthorized access.
55- Consider implementing network security measures, such as disabling Telnet on devices or replacing it with secure alternatives like SSH, to prevent future unauthorized access attempts.
56
57### False positive analysis
58
59- Legacy systems or devices that require Telnet for management may trigger alerts. To manage this, create exceptions for specific IP addresses or subnets known to host these systems.
60- Internal network monitoring tools that use Telnet for legitimate purposes might be flagged. Identify these tools and exclude their traffic from the rule to prevent unnecessary alerts.
61- Lab environments or test networks where Telnet is used for educational or testing purposes can cause false positives. Implement network segmentation and apply exceptions to these environments to reduce noise.
62- Automated scripts or maintenance tasks that utilize Telnet for routine operations may be mistakenly identified. Document these tasks and whitelist their associated traffic patterns to avoid false alerts.
63
64### Response and remediation
65
66- Immediately isolate the affected system from the network to prevent further unauthorized access or data exfiltration.
67- Terminate any active Telnet sessions on the affected system to disrupt potential attacker activities.
68- Conduct a thorough review of system logs and network traffic to identify any unauthorized access or data manipulation that may have occurred.
69- Change all credentials that may have been exposed through Telnet traffic, prioritizing those with administrative privileges.
70- Implement network segmentation to restrict Telnet access to only necessary internal systems, ensuring it is not exposed to the internet.
71- Deploy encryption protocols such as SSH to replace Telnet for remote command-line access, enhancing security for remote management.
72- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to assess the need for additional security measures."""
73risk_score = 47
74rule_id = "34fde489-94b0-4500-a76f-b8a157cf9269"
75severity = "medium"
76tags = [
77 "Domain: Endpoint",
78 "Use Case: Threat Detection",
79 "Tactic: Command and Control",
80 "Tactic: Lateral Movement",
81 "Tactic: Initial Access",
82 "Data Source: PAN-OS",
83 "Data Source: Fortinet",
84 "Data Source: SonicWall",
85 "Data Source: Suricata",
86 "Resources: Investigation Guide",
87]
88timeline_id = "300afc76-072d-4261-864d-4149714bf3f1"
89timeline_title = "Comprehensive Network Timeline"
90timestamp_override = "event.ingested"
91type = "query"
92
93query = '''
94(event.dataset:(fortinet_fortigate.log or network_traffic.flow
95 or sonicwall_firewall.log or suricata.eve or panw.panos)
96 or event.category:(network or network_traffic))
97 and event.type:connection and not event.action:(
98 flow_dropped or flow_denied or denied or deny or
99 flow_terminated or timeout or Reject or network_flow)
100 and destination.port:23
101'''
102
103
104[[rule.threat]]
105framework = "MITRE ATT&CK"
106
107[rule.threat.tactic]
108id = "TA0011"
109name = "Command and Control"
110reference = "https://attack.mitre.org/tactics/TA0011/"
111[[rule.threat]]
112framework = "MITRE ATT&CK"
113[[rule.threat.technique]]
114id = "T1021"
115name = "Remote Services"
116reference = "https://attack.mitre.org/techniques/T1021/"
117
118
119[rule.threat.tactic]
120id = "TA0008"
121name = "Lateral Movement"
122reference = "https://attack.mitre.org/tactics/TA0008/"
123[[rule.threat]]
124framework = "MITRE ATT&CK"
125[[rule.threat.technique]]
126id = "T1190"
127name = "Exploit Public-Facing Application"
128reference = "https://attack.mitre.org/techniques/T1190/"
129
130
131[rule.threat.tactic]
132id = "TA0001"
133name = "Initial Access"
134reference = "https://attack.mitre.org/tactics/TA0001/"
Triage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating Accepted Default Telnet Port Connection
Telnet, a protocol for remote command-line access, is often used in legacy systems. Its lack of encryption makes it vulnerable, allowing attackers to intercept credentials or use it as a backdoor. The detection rule identifies unencrypted Telnet traffic on port 23, flagging connections that bypass typical security measures, thus highlighting potential unauthorized access attempts.
Possible investigation steps
- Review the network traffic logs to identify the source IP address associated with the Telnet connection on port 23. Determine if the source IP is internal or external to the organization.
- Check the destination IP address to ascertain if it belongs to a critical system or a legacy device that might still use Telnet for management purposes.
- Investigate the timeline of the connection event to see if there are any patterns or repeated attempts, which could indicate a persistent threat or automated attack.
- Analyze any associated user accounts or credentials used during the Telnet session to verify if they are legitimate and authorized for remote access.
- Correlate the Telnet connection event with other security alerts or logs to identify any related suspicious activities, such as failed login attempts or unusual data transfers.
- Assess the network segment where the Telnet traffic was detected to determine if it is appropriately segmented and secured against unauthorized access.
- Consider implementing network security measures, such as disabling Telnet on devices or replacing it with secure alternatives like SSH, to prevent future unauthorized access attempts.
False positive analysis
- Legacy systems or devices that require Telnet for management may trigger alerts. To manage this, create exceptions for specific IP addresses or subnets known to host these systems.
- Internal network monitoring tools that use Telnet for legitimate purposes might be flagged. Identify these tools and exclude their traffic from the rule to prevent unnecessary alerts.
- Lab environments or test networks where Telnet is used for educational or testing purposes can cause false positives. Implement network segmentation and apply exceptions to these environments to reduce noise.
- Automated scripts or maintenance tasks that utilize Telnet for routine operations may be mistakenly identified. Document these tasks and whitelist their associated traffic patterns to avoid false alerts.
Response and remediation
- Immediately isolate the affected system from the network to prevent further unauthorized access or data exfiltration.
- Terminate any active Telnet sessions on the affected system to disrupt potential attacker activities.
- Conduct a thorough review of system logs and network traffic to identify any unauthorized access or data manipulation that may have occurred.
- Change all credentials that may have been exposed through Telnet traffic, prioritizing those with administrative privileges.
- Implement network segmentation to restrict Telnet access to only necessary internal systems, ensuring it is not exposed to the internet.
- Deploy encryption protocols such as SSH to replace Telnet for remote command-line access, enhancing security for remote management.
- Escalate the incident to the security operations center (SOC) or incident response team for further investigation and to assess the need for additional security measures.
Related rules
- React2Shell Network Security Alert
- Potential Telnet Authentication Bypass (CVE-2026-24061)
- Telnet Authentication Bypass via User Environment Variable
- Suricata and Elastic Defend Network Correlation
- PANW and Elastic Defend - Command and Control Correlation