Remote control your BackTrack 5 box using VNC Server


2 min read

This article discribes how you can remotely connect to your backtrack box using VNC server.

Lets start with making sure your HackBox is up to date by running the command: apt-get update apt-get dist-upgrade

Now we can install the server: apt-get install vnc4server It now starts installing packages that are needed to run properly. After it completes we can start the server up and it it should be ready to connect. vncserver The first time you start vnc server you will be promped to create password to login remotely. (Note: It only accepts 8 Chars as a password. If your password normally is longer, only the first 8 will be used.)

You can now connect to your box using vnc viewer [yourIp]:5901

When I connected for the first time the only thing I saw was a grey background and couldn’t do anything… Here’s the sollution… open the file /root/.vnc/xstartup in your favorit editor (I use nano..) nano /root/.vnc/xstartup comment out every line in the file and add the following: xrdb $HOME/.Xresources xsetroot -solid grey x-terminal-emulator -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop” & gnome-session & Your file should look like this #!/bin/sh

Uncomment the following two lines for normal desktop:

unset SESSION_MANAGER

exec /etc/X11/xinit/xinitrc

#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup #[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources #xsetroot -solid grey #vncconfig -iconic & #x-terminal-emulator -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop” & #x-window-manager &

xrdb $HOME/.Xresources xsetroot -solid grey x-terminal-emulator -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop” & gnome-session &

Now reboot your box and run the vnc server again, It should work now..

Note: vnc sends your password in clear text over the network. If you use it to connect to a pc on the ‘internet’ make sure you tunnel your traffic over SSH !!

Have Fun… ;)