Penetration Testing Series Exploiting Port 6000 x11
The X11 service on port 6000 was exposed and accepted remote connections, and the author used SSH X11 forwarding with default credentials to log in. An attacker could gain remote access to the target machine and run commands as the logged-in user.
Published on systemweakness.com
💡The X Window System, often called X11 or Xorg, is a prevalent display server protocol that facilitates user interaction with graphical interfaces on a remote computer. 🖥️ This system is specifically designed for bitmap displays, which are common on UNIX-based operating systems. By utilizing X11, users can execute…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the X11 service was reachable from untrusted networks and the system used default credentials, allowing remote login.
What the attacker needed
Network access to port 6000; default credentials msfadmin/msfadmin; SSH service enabled
The fix
Access to X11 should be restricted to authorised users only, with proper security configurations and firewall rules.
How it was found
- Scan the target with Nmap to find open ports and services.
- Connect to the target over SSH with X11 forwarding enabled using the username msfadmin.
- Enter the password msfadmin to log in.
- Run commands such as whoami, ls and ip a on the remote host.
- List hidden files and observe the .Xauthority file.
- Switch to the root user with sudo su.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
X11 is the system that draws windows and handles input on Linux and similar systems. When its port is open to the internet, anyone who can reach it may connect and interact with the graphical session. Here the author also used a known default username and password to log in over SSH with X11 forwarding turned on.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.