Cloudanix VulnDB

CVE-2019-7282

Medium · 5.9

CVSS

5.9

EPSS

2.1%

Published

Jan 31, 2019

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

An outdated file-copy program can let a malicious server quietly change permissions on folders on a user's computer during a transfer.

Exploit Available
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
High
Impact
Data Tampering
Component
Application
Class
Authorization Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The rcp client accepts filenames of '.' or the empty string from a remote rsh server and performs a chmod operation on the target directory, bypassing the intended restriction that only explicitly named files may have their permissions changed.

Why it matters to the business

Attackers who control an rsh server can silently alter directory permissions on client systems that still invoke the legacy rcp command, potentially enabling unauthorized access or disruption of file operations on systems that have not removed or replaced NetKit utilities.

How an attack unfolds

An attacker hosts a malicious rsh server that responds to an rcp request with a crafted filename of '.' or the empty string; when the client performs the requested permission change, the target directory on the client has its mode altered without the user's knowledge or consent.

How to fix it

Remove or replace the NetKit rcp client with a modern, maintained implementation such as OpenSSH scp or rsync; where removal is not feasible, restrict use of rcp to trusted servers only and monitor for invocations of the legacy binary.

How to confirm the fix worked

Confirm that the rcp binary is no longer present or is replaced by a non-vulnerable implementation; test by attempting an rcp transfer against a controlled server that returns '.' and verify that no chmod occurs on the target directory.

Typical attack path

  1. Attacker positions a controlled rsh server reachable by the victim client
  2. Victim initiates an rcp transfer that contacts the attacker's server
  3. Server returns a filename of '.' or the empty string in the protocol response
  4. Client performs chmod on the resulting target directory
  5. Directory permissions are modified, enabling subsequent unauthorized access

How to detect it

Search process execution logs and command-line audit trails for invocations of the rcp binary; inspect file-system permission change events on directories that coincide with rcp activity; review network connections to non-standard rsh ports around the time of permission modifications.

  • rcp
  • /usr/bin/rcp
  • rsh.*rcp
  • chmod.*\.$

What your security team should do

  • Inventory all systems still shipping or using NetKit utilities and schedule their decommissioning or replacement
  • Block or heavily restrict outbound rsh/rcp traffic at network boundaries
  • Add rcp execution to EDR and SIEM alerting rules for legacy binary usage
  • Prefer modern SSH-based file transfer tools in all new deployments and scripts

The record

In NetKit through 0.17, rcp.c in the rcp client allows remote rsh servers to bypass intended access restrictions via the filename of . or an empty filename. The impact is modifying the permissions of the target directory on the client side. This is similar to CVE-2018-20685.

Affected packages

Ecosystem Package Introduced Fixed
Debian:11 netkit-rsh 0 0.17-20
Debian:12 netkit-rsh 0 0.17-20
Debian:9 netkit-rsh 0 0.17-17+deb9u1
Mageia:8 rsh 0 0.17-36.1.mga8
Ubuntu:16.04:LTS netkit-rsh 0 No fix
Ubuntu:18.04:LTS netkit-rsh 0 0.17-17ubuntu0.1
Ubuntu:20.04:LTS netkit-rsh 0 0.17-21
Ubuntu:Pro:16.04:LTS netkit-rsh 0 No fix

Related vulnerabilities