Hello everyone. So in
this video we are going to see how we can scan
a Target and ignore discovery.
So
the Syntax for doing this scan is nmap the target
IP address and hyphen p and attribute
or flag.
So you can scan a Target by simply giving a Target IP
address you want to scan with hyphen p and
flag and nmap will start scanning for the default top 1000
ports.
Hyphen, PN is used.
to in order to bypass firewalls which blocks the
plane
you can obviously add a hyphen V
for the verbose output that you want to see.
so
what happens in this scan? So the syntax is
nmap - p n and you can see the nmap.
On the left hand side, which is the anmap machine
our machine. It sends icmp request
to do a host Discovery whenever you
scan a Target, so whenever you scan a
server.
And if there is a firewall enabled on that server, then it
will send a reset for your icmp ping
that you have been sending and and
map will not be able to identify that the host
is up or down.
So in this case, how can we identify
if the server is really up when
it is blocking our request?
So for that we use the hyphen p and flag
to identify this.
So it's the Practical time and let's see this in
action as you can see over here. I want
to have Windows machine where first I'm going to
set up a firewall and in that firewall. I'm going to
write rule to block the icmp request
and then I'm going to show you the scan using and
map.
And then we are going to bypass it. So as you can see the Windows
machine IP address by the IP config
command and you can see the IP address. Is this IP
address?
192.168 43 dot 217
now, let me just quickly set up the firewall.
After going into firewall, I'm going to go to the properties.
And you can see let me first John generate and
turn on the properties for the
firewall. So I'm going to say allow
the inbound connection.
Allow all the inbound connections for private profile
public profile in your computer. It must
be blocked by default. You just have to turn it on to allow.
so after setting up this
now on the left hand side.
For this machine this IP address. Okay. So first let's
do a ping request and see if we are
able to reach that machine. Perfect. As you
can see I am able to reach that machine which means
I am able to Ping and I'm getting a reply
from that machine which which means the host is up and
I'm able to do a host Discovery and
I'm able to connect to that host.
Now over here, I'm going to make a rule.
I'm going to write an inbound rule into this machine inbound
rule.
stands for
writing a rule for all the incoming connections into
this Windows machine.
So just go and click on new rule.
And then you have to select what type of rule you would
like to create. So I want to create a custom rule.
I will hit next.
Does this rule apply to all the programs? Yes all the
programs?
To which port and protocol does this rule apply this rule
applies to icmb version 4
because I want to just block the Ping over here.
You can choose any that you want. I'm blocking the pink
specifically for now.
I'm going to hit next which local IP address.
Does this rule apply to you can
type the IP addresses
Basically, you can whitelist them. Okay?
I want to apply the setting for all the IP addresses and
I'm going to choose block the connection.
For all this type of profiles that is
domain private and public.
Perfect. Let me just give a name to this rule.
So let's say we call this Anonymous machine.
Because this machine will not stop.
Connecting to anyone who sends up being request to identify
if the machine is up or down.
So let me type the description this inbound rule blockspring.
And let's finish this as you can see there is a inbound rule
which have been created. Perfect. So let's test for
this rule. So this is the IP address of this machine. Let
me go back here and let me again ping this
machine and let's see if I can ping now or not.
As you can see the request is getting timeout and
I am not able to connect to that
machine. I'm not able to send a ping request. So in
this case.
If there is a device into your network.
which is blocking the Ping request whenever you perform a
host Discovery, then at that time, you
may not find out that device is connected
to your network because it is blocking your ping requests
as we can see over here now how
to identify this Anonymous machine that
it is still connected to the network for this
in map comes to help and there
is a flag that we are going to see that is no host
Discovery - p n
so I'm going to type the command and map.
And the target IP address and this flag that
is - p n and I want to see the output in verbose mode
as you can see. I have come to know the name
of the desktop machine also desktop 60e2f0m
and the IP
address and also I'm able to find out the
open ports over here. If you see at the
bottom, I have come to know that the host is up and
it is not down perfect. So this way
I came to know even if the host was Anonymous
and blocking my icmp request.
I will be able to find out using hyphen p
and flag which is no host discovery.
I hope you guys understood this.
Thank you.