To successfully penetrate a secured environment you must have a good understanding of what you are facing. The enumeration data gathered will assist in determining target prioritization. By the end of this chapter, you should be able to choose which targets are ideal candidates for your initial attacks. Certain attack types make more "noise" than others, thus a targeted attack will be less likely to be noticed. Thanks to the hard work of the open source community, we have a large selection of tools available to help us enumerate networks. In this chapter, we will discuss the following:
Let's start both of our virtual machines, then configure and test the network connectivity.
In Kali, open up a terminal and type the following:
# ifconfig eth1 192.168.50.10 netmask 255.255.255.0 broadcast 192.168.50.255 promisc
We set eth1
, which is on our virtual lab segment, to the IP address of 192.168.50.10
, the network mask to 255.255.255.0
, and the broadcast
address to 192.168.50.255
. As an added bonus, we also set the device into the promiscuous mode.
Open up a terminal in Ubuntu_TestMachine_1
using the top menu bar and navigating through Applications | Accessories | Terminal. Type sudo ifconfig
to check your current configuration. If everything is configured correctly, you should not have an IP address assigned to eth0
. We will rectify that situation by repeating the steps used for our Kali machine. This time, we will use eth0
rather than eth1
, and we will not place this network adapter in the promiscuous mode.
# sudo ifconfig eth0 192.168.50.20 netmask 255.255.255.0 broadcast 192.168.50.255
We will attempt to ping the machines to verify connectivity. On Kali, type the following:
# ping 192.168.50.20 -c 3
On the Ubuntu_TestMachine_1
, type the following:
# ping 192.168.50.10 -c 3
If everything is configured correctly, you should see something along the lines of the following screenshot:
If you would like to have the network information statically assigned without having to manually enter this information each time, you can edit the /etc/network/interfaces
file for the appropriate Ethernet device.
Here is an example of what you would need to change in that file for the Kali guest machine:
auto eth1 iface eth1 inet static address 192.168.50.10 netmask 255.255.255.0 network 192.168.50.0 broadcast 192.168.50.255
Be sure to restart the network service after modifying this file (/etc/init.d/networking restart
).
Ubuntu users can use uncomplicated firewall (ufw) to manage the host-based iptables firewall. The examples in this chapter that mention the use of a host-based firewall are taking advantage of this fact. More information about ufw can be found at https://help.ubuntu.com/lts/serverguide/firewall.html.