Let's now learn to perform port scanning with Sparta:
- Sparta uses Nmap to perform its port-scanning operations. We can see this by right-clicking on a host and navigating to the Portscan submenu. A number of Nmap scanning options are available to us; these options are also configurable in the sparta.conf file:
- If we want to add other options with different tools, we can do that as well. Let's begin by adding an option to conduct a stealth scan using hping3. Close the Sparta application and open a terminal window. From here, let's edit the Sparta configuration file using the following command:
vi /usr/share/sparta/sparta.conf
- Now let's add a new host action, defined as hping3=hping3 (stealth scan), hping3 [IP] --scan 0-65535. You should see something similar to the following screenshot:
- We can now save our changes and reopen Sparta. Now if we right-click on a host, we see our new host action, hping3 (stealth scan):
- Clicking on this option runs our stealth scan against the designated host. A new tab is opened, displaying the results of the scan:
- Let's add one more port-scanning option. Once again, we close Sparta and will edit the /usr/share/sparta/sparta.conf file. This time, we will add a host action option to conduct a connect scan via dmitry. We configure our host action as follows: dmitry-connect=dmitry (connect scan), dmitry -p [IP]. Then, we save the file:
- Let's now relaunch Sparta and load our hosts. We once again, see a new host action:
- Select dimitry (connect scan) from our host actions menu, and the scan is fired off. A new tab is opened, displaying the results of our connect scan: