CVE-2020-14931
📋 TL;DR
CVE-2020-14931 is a critical stack-based buffer overflow vulnerability in DMitry (Deepmagic Information Gathering Tool) that allows remote WHOIS servers to execute arbitrary code by sending specially crafted long responses. This affects users running DMitry 1.3a who query WHOIS servers, potentially giving attackers full control of the affected system.
💻 Affected Systems
- DMitry (Deepmagic Information Gathering Tool)
📦 What is this software?
Dmitry by Dmitry Project
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with root/system privileges leading to complete system compromise, data theft, and persistent backdoor installation.
Likely Case
Remote code execution with user privileges, allowing attackers to run arbitrary commands, steal data, and pivot to other systems.
If Mitigated
Denial of service or application crash if exploit fails, but no code execution due to security controls like ASLR or DEP.
🎯 Exploit Status
Exploitation requires controlling or compromising a WHOIS server that DMitry queries, or intercepting/manipulating network traffic. The buffer overflow is straightforward to trigger.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Patched in source code repository, but no official release version. Debian provides patched packages.
Vendor Advisory: https://lists.debian.org/debian-lts-announce/2024/10/msg00024.html
Restart Required: No
Instructions:
1. Check if using DMitry 1.3a via 'dmitry --version'. 2. Remove vulnerable version: 'sudo apt remove dmitry' (Debian/Ubuntu). 3. Update package lists: 'sudo apt update'. 4. Install patched version if available: 'sudo apt install dmitry'. 5. For source installations, update from GitHub repository.
🔧 Temporary Workarounds
Disable WHOIS queries
allPrevent DMitry from making WHOIS queries by modifying usage or scripts.
Avoid using '-w' flag with dmitry
Replace 'dmitry -w target.com' with 'dmitry -n target.com' (no WHOIS)
Network filtering
linuxBlock outgoing WHOIS queries (port 43) at firewall to prevent DMitry from contacting WHOIS servers.
sudo iptables -A OUTPUT -p tcp --dport 43 -j DROP
sudo iptables -A OUTPUT -p udp --dport 43 -j DROP
🧯 If You Can't Patch
- Uninstall DMitry completely if not essential for operations
- Run DMitry in a restricted container or sandbox with no network access to limit damage if exploited
🔍 How to Verify
Check if Vulnerable:
Run 'dmitry --version' and check if output contains '1.3a'. If yes, system is vulnerable.
Check Version:
dmitry --version
Verify Fix Applied:
After update, run 'dmitry --version' and confirm version is not '1.3a'. Test with 'dmitry -w example.com' to ensure no crashes.
📡 Detection & Monitoring
Log Indicators:
- DMitry process crashes or abnormal termination
- Unusual network connections to/from port 43 (WHOIS)
Network Indicators:
- Large WHOIS responses (> typical 512 bytes) to DMitry client
- Unexpected outbound connections from DMitry to unknown WHOIS servers
SIEM Query:
process_name:"dmitry" AND (event_type:"process_crash" OR network_dest_port:43)