Practical Web Penetration Testing
上QQ阅读APP看书,第一时间看更新

Configuring network services in Kali

I'm doing my best to show you the necessary commands in each section. You don't need to know all of the commands for managing network services in Kali, but you are surely going to use some of them. In this section, I will show you my favorite commands related to the network services in Kali Linux.

To operate Kali properly, you need to ensure that it has connectivity to either a wired or a wireless network. You may need to obtain an IP address through Dynamic Host Configuration Protocol (DHCP), or assign one statically.

The first important command is ifconfig, which you will use to check the IP address on your Kali machine:

You can see my Kali IP address, 10.0.0.197, after executing this command (in the preceding screenshot). Also, you need to pay attention to the network interface names—eth0 represents the Ethernet cable, and the OS gives it a number (which is 0, in this case). If you had another Ethernet cable connected to your Kali, you would probably see another interface, called eth1. If you connected a wireless adapter (or if you had it built in), Kali would show another interface, called wlan0.

In the preceding example, we received a dynamic IP address from the DHCP server. If, for any reason, you want to refresh the IP address, you can execute the following commands:

dhclient [interface name]
#Example
dhclient eth0