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
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]"