Welcome back, fellow network explorers.
My name is Stefan, and in this lecture, we will delve into the fascinating world of Nmap port scanning.
We will delve into advanced techniques that will help you uncover valuable information about target
systems and services.
So grab your virtual magnifying glass as we embark on this journey together.
So Nmap offers a variety of port scanning techniques that cater to different scenarios.
Understanding these techniques will empower you to choose the most appropriate method for your scanning
needs.
So by default, the privileged users enjoy the benefits of a scan stealth attack synchronizing stealth
a cat.
So this technique utilizes raw packets to detect port states using a technique known as half open.
So on the other hand, unprivileged users who lack the ability to create any direct packets rely on
the TCP scan technique.
So TCP connect scan technique actually.
So this method completes each TCP connection, fully making it slower compared to scan and synchronizing
stealth scans.
So fine tuning our Nmap scans to focus on specific port ranges is a valuable skill.
It allows us to narrow down our search and optimize performance, especially when dealing with multiple
targets.
So you can specify port ranges in various ways using Nmap p option here.
So for example, you can use comma separated lists to scan multiple ports like 80 and 443 like this
here Nmap P here and 8443 and here we will enter the code silly.com and here.
We are now scanning port 80 and port 443.
And as you can see here, they are open at service port, 80 users on the servers called Http.
And here for port 443 uses Https and they both open.
Alternatively, you can define range uses using hyphens here.
So for example such as the you can write like P here and one 200.
And here we are telling Nmap to scan ports from 1 to 100 on console.com.
And as you can see here, the Nmap show us the open ports on the specific domain address.
Nmap also provides the flexibility to target specific ports by protocol.
For instance, you can scan TCP port 2425 and UDP port 53 on a target using this command here again
p here and without space.
After P we enter the T here 25 and u here 53 and here you will enter the target domain or IP address.
In this case it's domain code telecom.
And here let's press enter.
And as you can see here, your port specifications are illegal.
Example of proper port here.
So we did something wrong here and here.
After that of.
Sorry, we need to add few dots here.
Yes, that's it.
And here your paws include you, but you don't have specified UDP scan with you here.
So you can also scan with this.
But in this case, we just scan the TCP here and here.
And as you can see, it's filtered and it's a Smtp here.
Smtp server is actually used for emails and email communication.
So here additionally, you can focus on ports associated with specific services using service names
such as Nmap, P here, and after p it actually let me clear that.
So nmap p here nmap p and after p you can enter with with space here.
So nmap p smtp here and you will enter a domain name or IP address here, code.com.
And now we have a segmentation fault here.
Let's actually use with sudo here.
Enter password.
And as you can see here, we got segmentation fault again.
This fault is actually a bug on the Nmap.
This version here.
So I think they will fix that in next versions.
But here you can also fix that by uninstalling the purging and then installing Nmap again, which we
will do in next lectures.
How to fix that fault here.
So here now Nmap here also provides the flexibility to.
Active use the active network interface in order to.
However, there may be instances when it fails to do so or when you need to select a specific interface
for network testing purposes.
So to ensure app scans using the desired network interface, for example, lets you see what is our
network interface.
In this case it's the Eth0.
So here to ensure Nmap scans using the desired network interface, you can use the E argument followed
by the interface name.
For example.
In order to do that you will enter the Nmap here e here argument and after that you will enter the eth0
in my case and here.
And after that you will enter the target name and here in this case our Nmap.
This code here forces the nmap to use the eth0 for the scan.
And here, as you can see here, you can.
I'm sorry.
So you can also use the press to debugging or you can use the arrow keys to show the process here.
And here, as you can see here, it's still.
Using that.
So it might take some time here.
I know it's actually halfway down here, etcetera.
59% here.
And here our scan is complete with this preferred interface here.
So.
And as you can see here, we we ensure that we are now using the Eth0 for Nmap interface for the scanning
here.
And congratulations, you learned some advanced techniques for port scanning with Nmap by understanding
the differences between a privileged and unprivileged scans and scanning specific port ranges and selecting
the ideal network interface interface at the end and you are now equipped to conduct precise and efficient
network reconnaissance.
So remember, responsible scanning is essential.
Always ensure you have a proper authorizations and adhere to ethical guidelines when performing security
assessments.
And so go forth, explore the depths of your network and uncover the hidden treasures that await with
Nmap.
And I'm waiting you in the next lecture.