The presence of a Remote Administration Toolkit (RAT) leveraging Telnet indicates potential adversary use of an unencrypted protocol for command and control, which may facilitate covert communication. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential long-term persistence and data exfiltration risks.
YARA Rule
rule rat_telnet {
meta:
author = "x0r"
description = "Remote Administration toolkit enable Telnet"
version = "0.1"
strings:
$r1 = "software\\microsoft\\telnetserver" nocase
condition:
any of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Scenario: System Administrator Enables Telnet for Remote Management
Description: A system administrator configures a server to use Telnet for remote management purposes.
Filter/Exclusion: Check if the process is initiated by a known admin account (e.g., Administrator, root, or svc_tomcat) and if the command includes telnet with a valid IP and port (e.g., telnet 192.168.1.10 23).
Suggested Filter: process.parent_process.user == "Administrator" && process.command_line contains "telnet" && process.command_line contains "192.168.1.10"
Scenario: Scheduled Job Uses Telnet for Monitoring
Description: A scheduled job runs a script that uses Telnet to check the status of a remote service.
Filter/Exclusion: Verify if the process is part of a known monitoring tool (e.g., Nagios, Zabbix, or Check_MK) and if the command includes a predefined IP and port.
Suggested Filter: process.name == "check_mk" || process.name == "nagios" && process.command_line contains "telnet" && process.command_line contains "10.0.0.50"
Scenario: Telnet Used for Legacy Application Connectivity
Description: An older application (e.g., FTP server, Legacy ERP system) relies on Telnet for communication with other systems.
Filter/Exclusion: Confirm if the process is associated with a known legacy application (e.g., vsftpd, ProFTPD, or IBM iSeries) and if the IP/port matches internal network ranges.
Suggested Filter: `process.name == “vsftpd” || process.name == ”