What is XDMCP
X Display Manager Control Protocol (XDMCP) is a remote desktop protocol using X11 environments for managing remote graphical login sessions in Linux and Unix systems. Specifically, it allows X display managers to interface with X terminals or other X server-based systems, by facilitating the remote display management process.
It operates by sending a query packet from a client to a server, signaling the request to start a session. Once accepted, the session is managed over a UDP port (usually port 177), which handles communication between the client and server.
Essentially, it allows one computer to let other computers connect to its graphical user interface (GUI) remotely over a network. This was widely used in thin client setups, where multiple terminals would connect to a central server to access GUI sessions.
Why Ensure XDMCP Is Not Enabled?
Leaving XDMCP enabled has several significant security concerns. This is due to it being a relatively old protocol, therefore lacking many modern security controls. The most significant vulnerability is that it is not a ciphered protocol. Any traffic is not encrypted, anyone monitoring the network can intercept sensitive information such as any credentials, session data, or other transmitted information.
Additionally, XDMCP lacks robust authentication and access controls, making it easier for unauthorized users to initiate remote sessions.
Along with man-in-the-middle attack, XDMCP is also open to attacks such as snigging, sessions hijacking and brute force attacks. Notable CVE's include: denial-of-service attacks (DoS), unauthorized access, and issues stemming from protocol weaknesses.
How to disable XDMCP
Edit the file /etc/gdm/custom.conf and remove the line:
Enable=true
How to enable XDMCP
To enable XDMCP follow these instructions.
Note: Instructions may vary depending on the version of the systems installed.
Default value
false (This is denoted by no Enabled= entry in the file /etc/gdm/custom.conf in the [xdmcp] section)
MITRE ATT&CK Mappings
Techniques / Subtechniques – T1040, T1040.000, T1056,
T1056.001, T1557,
T1557.000
Tactics – TA0002
Mitigations – M1050
Server hardening
In modern networked environments XDMCP is largely considered insecure. Keeping it disabled is a crucial step in server hardening, as it reduces the risk of unauthorized access and data interception.
Server hardening is essential for a business because it reduces the attack surface, protecting sensitive data and systems from unauthorized access and cyber threats. By implementing security measures like disabling vulnerable services and enforcing strict access controls, system administration can safeguard their infrastructure and maintain operational integrity.