Hello, my name is Stephan, and in this lecture we will learn how to scan random targets on the internet
and Nmap.
A powerful network scanning tool, offers a fascinating feature that allows researchers to conduct scans
against random targets on the Internet.
Although it's important to note that aggressive scanning without permission is not recommended and may
be illegal in certain countries, and generating a sample of random hosts can be valuable for research
purposes related to publicly accessible hosts.
So let's explore how to generate random hosts as targets for Nmap scans.
So to generate a list of n random target hosts, you can use this Nmap command Nmap lowercase e uppercase
L here.
So we will do 20 here and now.
Here we are generating 20 random hosts.
So here, let's actually wait.
And here.
And here, as you can see here, we scanned randomly and there is zero hosts up.
So now let's delve into the prevalence of ICMP Internet control message protocol on remote servers.
And we will launch a host discovery scan against three random targets.
So Nmap is n.
So this is a host discovery and lowercase E uppercase R and we will do three here and here.
The scan results will display information about a scan and host.
In this case there is a zero hosts up, so let's actually make it 50 so we will have more chance to
get the online hosts here and here you can use the arrow keys to see the.
A percentage of the process.
And here it's 9400.
And as you can see here, there's a three hosts up.
And here I can make a technologies.com and so on.
So the scan results will display information about the scanned host, such as their IP addresses, responsiveness,
their domain if they have any, and latency and this is the simple sample output that Nmap will give
it to you.
And let's actually learn how it works here, right?
So by using the Nmap, lowercase and uppercase R option followed by some number here and Nmap generates
a specified number of external IP addresses and utilizes them as a targets in the scan.
So this target assignment can be combined with any other scan options as needed.
So while this feature can be valuable for internet research, caution should be exercised when using
it, and Nmap has no control over the external IP addresses.
It generates meaning that the generated list may include critical machines under heavy surveillance.
So keep in mind, and to evade to avoid any unintended consequences, it's important to use this feature
responsibly and ethically.
And there's also more here.
So if you want to generate an unlimited number of IP addresses and run the scan indefinitely, you can
use Nmap, lowercase, E, uppercase R here and zero option.
For example, if you're interested here in this case, sorry, it's not zero, so zero option and here
we will scan it indefinitely until the IP addresses end or we have some error from program.
Right.
And here, for example, if you are interested in finding random online dnfs here network file system
shares, you could execute this command here Nmap.
First we will enter the port here.
So because NFS network file system uses 2049 for 2049 port and here we will use open and I error here.
So here we will scan open the online machines that uses this port.
And this port is open in that machine here.
So we will scan it on unlimited here and here.
As you can see here, we have like.
Here.
As you can see here, it's running all the way.
So here and this is also legal issues with port scanning here.
So it's essential to be aware of the legal implications surrounding port scanning.
Engaging in port scanning without proper authorization is generally unwelcome and even illegal in certain
jurisdictions.
And before conducting any scanning activities, it's crucial to research and understand the laws and
regulations in your local jurisdiction.
So Nmap provides comprehensive documentation on the legal issues associated with port scanning, which
can be found on their websites here.
Let's actually go there so we will go nmap.org here.
Book and legal issues dot HTML.
So here I highly recommend that anyone considering internet wide scanning takes the time to read and
understand these resources here.
There is also, as you can see here, security list, security tools here.
So there might be some error legal issues here.
So they might be changed this link here.
So but here you can see we also can Google it here.
We can also DuckDuckGo it here and here.
Nmap legal uses and here we will go to Nmap official website here and that's it.
So yes, we need to use this here.
So that's it.
And as you can see here, when used properly, Nmap helps protect your network from invaders and but
when you use improperly, Nmap can in rare cases of course get you sued, fired, expelled, jailed
or banned by your Internet service providers.
So reduce your risk by reading this legal guide before launching Nmap here.
So there's a here as you can see, there's a port scanning is not crime and the strong opinions on a
port scanning legality and morality.
And here, as you can see here, I love BMW they're nice car here M3, I think.
Yes.
And here you have you can read all of this chapter to understand the legal uses that comes with scanning
ports here.
So I'm waiting you in next lecture.