I'm practicing penetration testing and I'm in front of a basic routing exercise.
The context is the following: I'm using a virtual machine with Kali Linux from which I connect in VPN to the network that provides hosts for the exercises.
Before connecting, typing the
route command I get the following output:
root@kali:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default _gateway 0.0.0.0 UG 100 0 0 eth0 10.0.2.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
after the connection instead, this one:
root@kali:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default _gateway 0.0.0.0 UG 100 0 0 eth0 10.0.2.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0 192.168.193.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
and this is the output of the
ip route command:
root@kali:~# ip route show table main default via 10.0.2.2 dev eth0 proto dhcp metric 100 10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 metric 100 192.168.193.0/24 dev tap0 proto kernel scope link src 192.168.193.70
192.168.193.0/24 is the internal network; from this one, it is possible to reach other networks. One of the task is to find wich ones and add a route to reach them.
To find the network, I have a wireshark file that show as from the
192.168.193.0/24 network's hosts, we can reach 2 web server, with these ip address:
So, what I have to do is to add a route from my internal network to this 2 others. The problem is that I have NOT the gateway of this network, cause "How many routers there are in the network" is one of the proposed question. So, If i want execute these command:
ip route add -net 10.86.74.0/24 gateway_address dev tap0 ip route add -net 10.85.174.0/24 gateway_address dev tap0
what I miss is the
I tried to execute the command without this parameter, or:
ip route add -net 10.86.74.0/24 dev tap0
but, of course, I got the
Destination Host Unreachable error when I try to ping one of the host.
So, my question is: how can I find the gateway address? May be the use of the wireshark file? And if yes, what I must search inside it?