Hello everyone in this video. We are
going to see how you can modify the source
Port while us scanning any particular Target.
So the syntax of doing this particular scan is nmap.
The target IP address followed by
a flag, which is hyphen hyphen Source hyphen Port
through which you can give or specify any
port number that you like.
The target server will see this particular Port from
where the request is coming from.
So you can use any custom port to scan the
victims IP address.
You can always add hyphen V to see the output in
verbose mode.
Here at the bottom. The example is given
that how you can perform this particular scan.
And it is the Practical time. Let's see how you
can do this particular scan. You can see on
the screen The nmap Source port scan command
as being
here you can see it is written nmap the target IP address followed
by
Hyphen, hyphen Source hyphen port and the random port
number that we want to give so we have chosen a port
number. That is 7 8 9 0 followed by
hyphen V to see the output in verbose mode
and we are going to scan two particular ports
of the target server which are Port 22
and to a port 25.
So let us copy this and go to the terminal.
before going to the terminal
let's
create the filter into the wire shock.
So you can see I have created a filter to capture the
request.
as you can see I am going to scan my target machine and
the target machine IP address is 102 and the
nmap Machine IP addresses 1 0 3
you can see I have just started the scan with
the port number 7 8 9 0 I'm going
to again run the scan with hyphen p and this
time.
let us go in Wireshark and
you can see we have identified the 422 is
filtered.
Let's see the output.
Over here for Port 22, but here
you should notice that the source Port
should be 7 8 9 0
that we have decided.
Perfect as you can see over here in this particular request.
You can see the source Port is given
as 7 8 9 0 over
here. Also, if you see over here the port
which is Target Port which
is scanned is Port 22 from The Source sport 7890
from the machine 103 and
map machine to the Target machine 1 0 2
perfect. This port was again used to
retransmit a request that way that's why
it showed.
Port reused again
As you can see TCP port number used to
send again the request.
So here we are able to send a
particular request onto the target server
through a custom Port that we decided
and the port was 7 8 9 0
this particular scan is very useful when
the target server is blocking
request from some of the specific ports in
that case. You can just specify a
random Port that you want and you can successfully
scan the target machine.
So I hope you guys understood how you can perform this
type of scan. Thank you.