Pivoting

🔬 Pivoting

  • Target 1 IP: 10.2.30.252

  • Target 2 IP: 10.2.21.166

  • Pivoting technique with a network route to the internal network's subnet

ping 10.2.30.252
    PING 10.2.30.252 (10.2.30.252) 56(84) bytes of data.
    64 bytes from 10.2.30.252: icmp_seq=1 ttl=125 time=2.25 ms
    64 bytes from 10.2.30.252: icmp_seq=2 ttl=125 time=1.99 ms

ping 10.2.21.166
	PING 10.2.21.166 (10.2.21.166) 56(84) bytes of data.
# No response from target2
service postgresql start && msfconsole -q
db_status
workspace -a Pivoting
db_nmap -sV 10.2.30.252

#Exploitation

  • Target2 is on the same Target1 subnet - 10.2.16.0/20 (look at the Interface 12)

    • 10.2.16.0/20 = from 10.2.16.1 to 10.2.31.254

#Pivoting

  • From the attacker's machine, a route through "target1 10.2.30.0/20 machine" is needed, to run MSF modules against target2 machine

  • Now, subnet 10.2.30.0/20 can be accessed with MSFconsole

  • Scan for open ports on the target2 system - 10.2.21.166

  • 📌 The route is only applicable to MSFconsole, not outside of it

#Port Forwarding

  • To perform an nmap scan on target2, a port forwarding need to be set up.

    • e.g. forward the remote port 80 to an attacker machine local port, which will allow to perform a service version enumeration of the target2 service

http://localhost:1234/

Target2 exploited

Reveal Flag: 🚩

Last updated