Linux r-command Services Disabled Vulnerability

漏洞信息

漏洞名称: Linux r-command Services Disabled Vulnerability

漏洞类型: 配置问题

漏洞等级: 高危

漏洞描述: 受影响的产​​品:Linux操作系统中的r-command服务(包括rlogin、rsh、rexec)是早期的远程登录和执行命令的工具,虽然在现代系统中已经较少使用,但在一些旧系统或特定场景下可能仍然启用。这些服务由于设计上的安全性不足,容易成为攻击者的目标。

漏洞说明:此漏洞属于配置问题,具体表现为r-command服务(rlogin、rsh、rexec)被错误地启用。这些服务如果未正确禁用,可能允许未经授权的用户通过开放的端口访问系统,提取敏感信息或进行系统破坏。漏洞的技术根源在于这些服务缺乏足够的安全验证机制,如强认证和加密通信,使得攻击者可以利用这些缺陷进行未授权访问。

影响分析:此漏洞的安全风险较高,攻击者可以利用启用的r-command服务进行未授权访问,可能导致敏感信息泄露、系统破坏或其他恶意活动。由于这些服务通常不需要复杂的认证过程,攻击者可以相对容易地利用此漏洞。此外,由于这些服务在现代系统中已不推荐使用,管理员可能忽略了对它们的安全配置,增加了被利用的风险。因此,建议除非明确需要,否则应禁用这些服务以防止潜在的安全威胁。

产品名称: Linux r-command services (rlogin, rsh, rexec)

来源: https://github.com/projectdiscovery/nuclei-templates/blob/1dc5e4c5a7e3689548a72d7cb2a00b803fccc824/misconfiguration%2Flinux%2Flinux-r-command-services-disabled.yaml

类型: projectdiscovery/nuclei-templates:github issues

POC详情

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

id: linux-r-command-services-disabled

info:
name: r-command Services Disabled (rlogin, rsh, rexec)
author: songyaeji
severity: high
description: >
If r-command services (rlogin, rsh, rexec) are enabled, unauthorized users may access or extract sensitive information,
or disrupt the system through open ports. These legacy services should be disabled unless explicitly required.
reference:
- https://isms.kisa.or.kr
- Cloud Vulnerability Assessment Guide(2024) by KISA
tags: linux,misconfiguration,rlogin,rsh,rexec,xinetd
metadata:
verified: true
os: linux
category: configuration
max-request: 1
classification:
cvss-metrics: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 7.8
cwe-id: CWE-284

self-contained: true

code:
- engine:
- bash
source: |
rlogin_check=$(grep -i 'disable[[:space:]]*=[[:space:]]*no' /etc/xinetd.d/rlogin 2>/dev/null)
rsh_check=$(grep -i 'disable[[:space:]]*=[[:space:]]*no' /etc/xinetd.d/rsh 2>/dev/null)
rexec_check=$(grep -i 'disable[[:space:]]*=[[:space:]]*no' /etc/xinetd.d/rexec 2>/dev/null)

if [ -n "$rlogin_check" ]; then
echo "[VULNERABLE] rlogin service is enabled"
fi
if [ -n "$rsh_check" ]; then
echo "[VULNERABLE] rsh service is enabled"
fi
if [ -n "$rexec_check" ]; then
echo "[VULNERABLE] rexec service is enabled"
fi

if [ -z "$rlogin_check" ] && [ -z "$rsh_check" ] && [ -z "$rexec_check" ]; then
echo "[SAFE] All r-command services are properly disabled"
fi
matchers:
- type: word
part: code_1_response
words:
- "[VULNERABLE]"


Linux r-command Services Disabled Vulnerability
http://example.com/2025/07/29/github_137046594/
作者
lianccc
发布于
2025年7月29日
许可协议