CVE-2018-8793
📋 TL;DR
CVE-2018-8793 is a critical heap-based buffer overflow vulnerability in rdesktop RDP client that allows remote attackers to execute arbitrary code on vulnerable systems. Attackers can exploit this by tricking users into connecting to a malicious RDP server. All users running vulnerable versions of rdesktop are affected.
💻 Affected Systems
- rdesktop
📦 What is this software?
Leap by Opensuse
Rdesktop by Rdesktop
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with SYSTEM/root privileges leading to complete system compromise, data theft, and persistent backdoor installation.
Likely Case
Remote code execution with user privileges, allowing attackers to steal credentials, install malware, and pivot to other systems.
If Mitigated
Denial of service or application crash if exploit fails, but successful exploitation typically leads to code execution.
🎯 Exploit Status
Check Point Research published detailed exploitation techniques and proof-of-concept. The vulnerability is in the client-side authentication handling, requiring user interaction to connect to malicious server.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: rdesktop v1.8.4 and later
Vendor Advisory: https://github.com/rdesktop/rdesktop/commit/4dca546d04321a610c1835010b5dad85163b65e1
Restart Required: Yes
Instructions:
1. Update rdesktop to version 1.8.4 or later using your distribution's package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt upgrade rdesktop. 3. For RHEL/CentOS: sudo yum update rdesktop. 4. Restart any active rdesktop sessions.
🔧 Temporary Workarounds
Disable NLA Authentication
linuxDisable Network Level Authentication to prevent exploitation through the vulnerable code path
rdesktop -u username -p password -x l target_ip
Use Alternative RDP Client
linuxReplace rdesktop with alternative RDP clients like FreeRDP or Remmina
sudo apt install freerdp2-x11
sudo apt install remmina
🧯 If You Can't Patch
- Network segmentation: Isolate systems running vulnerable rdesktop versions from untrusted networks
- User awareness training: Educate users about risks of connecting to unknown RDP servers
🔍 How to Verify
Check if Vulnerable:
Check rdesktop version: rdesktop --version | grep -o '[0-9]\.[0-9]\.[0-9]'
Check Version:
rdesktop --version
Verify Fix Applied:
Verify version is 1.8.4 or higher: rdesktop --version
📡 Detection & Monitoring
Log Indicators:
- Failed RDP connections from suspicious IPs
- rdesktop process crashes with memory corruption errors
- Unusual process execution following RDP connections
Network Indicators:
- RDP connections to unknown or suspicious servers
- Unusual RDP traffic patterns
- Connection attempts from internal clients to external RDP servers
SIEM Query:
source="rdesktop" AND (event="crash" OR event="segmentation fault") OR dest_port=3389 AND src_ip NOT IN (trusted_networks)
🔗 References
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00040.html
- http://www.securityfocus.com/bid/106938
- https://github.com/rdesktop/rdesktop/commit/4dca546d04321a610c1835010b5dad85163b65e1
- https://lists.debian.org/debian-lts-announce/2019/02/msg00030.html
- https://research.checkpoint.com/reverse-rdp-attack-code-execution-on-rdp-clients/
- https://security.gentoo.org/glsa/201903-06
- https://www.debian.org/security/2019/dsa-4394
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00040.html
- http://www.securityfocus.com/bid/106938
- https://github.com/rdesktop/rdesktop/commit/4dca546d04321a610c1835010b5dad85163b65e1
- https://lists.debian.org/debian-lts-announce/2019/02/msg00030.html
- https://research.checkpoint.com/reverse-rdp-attack-code-execution-on-rdp-clients/
- https://security.gentoo.org/glsa/201903-06
- https://www.debian.org/security/2019/dsa-4394