VNC Pivoting through Meterpreter

In previous article we had describe VNC penetration testing and VNC tunneling through SSH but today we are going to demonstrate VNC pivoting.

From Offensive Security

Pivoting is technique to get inside an unreachable network with help of pivot (centre point). In simple words it is an attack through which attacker can exploit those system which belongs to different network. For this attack, the attacker needs to exploit the main server that helps the attacker to add himself inside its local network and then attacker will able to target the client system for attack.

Lab Setup requirement:

Attacker machine: Kali Linux

Pivot Machine:  Ubuntu operating system with two network interface

Target Machine: Ubuntu (Allow VNC service)

Exploit pivot machine

Generate payload using msfvenom start multi/handler to hack the pivot machine (ubuntu) read complete article from here and bypass its UAC to achieve admin privileges.

 From given image you can confirm that I owned pivot machine ( meterpreter session.

Check network interface through following command:

From given image you can observe two networks interface in pivot’s system 1st for IP through which attacker is connected and 2nd for IP through which VNC server (targets) are connected.

Route Add

Since attacker belongs to interface and client belongs to interface therefore it is not possible to directly make attack on client network until unless the attacker acquires same network connection. In order to achieve network attacker need run the post exploitation “autoroute”.

ARP Sweep to identify Active host

This module will enumerate alive Hosts in local network using ARP requests. Take help from target network interface 3 as shown above for MAC address and other details.

Here we found a new host IP as shown in given image. Let’s perform TCP port scan for activated services on this machine.

TCP Port Scan post exploit

This module will enumerate open TCP port of target system.

From given you can observe port 5900 is open and we know that 5900 used for VNC services.

VNC brute force attack

In order to steal password for making unauthorized access in VNC machine apply Brute force attack using password dictionary in given below exploit.

Awesome!! From given below image you can observe the same password: 123456 have been found by metasploit.

VNC Port forwarding on Local port

Now Type following command for port forwarding on localhost.

-l: This is a local port to listen on.

-p: The remote port to connect on.

-r:  The remote host address to connect on.

Now open the terminal and type following command to connect target machine:

Wonderful!! We had successfully exploit VNC client by making unauthorized access.

Author: Sanjeet Kumar is a Information Security Analyst | Pentester | Researcher  Contact Here

Related Posts Plugin for WordPress, Blogger...

You Might Also Like

Leave a Reply