CVE-2018-8795
📋 TL;DR
CVE-2018-8795 is a critical integer overflow vulnerability in rdesktop RDP client that leads to heap-based buffer overflow and remote code execution. Attackers can exploit this by sending specially crafted RDP packets to compromise vulnerable clients. All systems running rdesktop versions up to v1.8.3 are affected.
💻 Affected Systems
- rdesktop
📦 What is this software?
Leap by Opensuse
Rdesktop by Rdesktop
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise via remote code execution, allowing attacker to execute arbitrary code with user privileges, install malware, or pivot to other systems.
Likely Case
Remote code execution leading to credential theft, lateral movement, or ransomware deployment on affected systems.
If Mitigated
Limited impact if network segmentation prevents RDP traffic from untrusted sources and systems are patched.
🎯 Exploit Status
Check Point Research published detailed exploitation techniques and proof-of-concept. Exploitation requires client to connect to malicious RDP server.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: rdesktop v1.8.4 and later
Vendor Advisory: https://github.com/rdesktop/rdesktop/commit/4dca546d04321a610c1835010b5dad85163b65e1
Restart Required: No
Instructions:
1. Update rdesktop to version 1.8.4 or later using your package manager. 2. For Debian/Ubuntu: sudo apt update && sudo apt upgrade rdesktop. 3. For source installation: download latest release from GitHub and compile.
🔧 Temporary Workarounds
Network Segmentation
allRestrict RDP connections to trusted networks only
Use Alternative RDP Client
linuxReplace rdesktop with FreeRDP or other patched RDP clients
sudo apt install freerdp2-x11
🧯 If You Can't Patch
- Block all RDP traffic (TCP port 3389) from untrusted networks using firewall rules
- Implement network monitoring for anomalous RDP connections and packet patterns
🔍 How to Verify
Check if Vulnerable:
Run 'rdesktop --version' and check if version is 1.8.3 or earlier
Check Version:
rdesktop --version
Verify Fix Applied:
Confirm rdesktop version is 1.8.4 or later with 'rdesktop --version'
📡 Detection & Monitoring
Log Indicators:
- Failed RDP connections from unknown sources
- Unusual process creation after RDP sessions
Network Indicators:
- Malformed RDP packets
- Connection attempts with abnormal bitmap update sizes
SIEM Query:
source_port=3389 AND (packet_size>threshold OR protocol_anomaly=true)
🔗 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