Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/exploit/unix/x11/x11_keyboard_exec.md
Views: 11789
Vulnerable Application
X11 (X Window System) is a graphical windowing system most common on unix/linux. The service can accept connections from any users when misconfigured which is done with the command xhost +
.
This exploit has been verified against:
Ubuntu 14.04
Ubuntu 16.04
Kali via Emulation method
This exploit does NOT work against:
Solaris 10 Java Desktop System (alt+F2 has no effect)
Emulation
This can be emulated (on kali) utilizing the following command: socat -d -d TCP-LISTEN:6000,fork UNIX-CONNECT:/tmp/.X11-unix/X0
Ubuntu 12.04, 14.04
sudo nano /etc/lightdm/lightdm.conf
Under the
[SeatDefaults]
area, add:logout or reboot
Verification:
sudo netstat -antp | grep 6000
Now, to verify you allow ANYONE to get on X11, type:
xhost +
Ubuntu 16.04
Use the Ubuntu 12.04 instructions, however change SeatDefaults
to Seat:*
Verification Steps
Install and configure X11
Start msfconsole
Do:
use exploit/unix/x11/x11_keyboard_exec
Do:
set rhost [IPs]
Do:
set payload [payload]
Do:
exploit