WEBVTT - This file was automatically generated by VIMEO

0
00:00:04.800 --> 00:00:07.600
Hello everyone. So in

1
00:00:07.600 --> 00:00:11.300
 this video we are going to see how does a UDP

2
00:00:11.300 --> 00:00:12.400
 scan type works.

3
00:00:13.200 --> 00:00:16.400
So the syntax of the UDP scan is

4
00:00:16.400 --> 00:00:19.700
 and map hyphen Su the

5
00:00:19.700 --> 00:00:22.500
 target IP address and the Target Port

6
00:00:22.500 --> 00:00:22.800
 number.

7
00:00:24.500 --> 00:00:27.500
So UDP scanning utilizes UDP

8
00:00:27.500 --> 00:00:30.400
 and icmp packets to discover the

9
00:00:30.400 --> 00:00:31.800
 status of any port.

10
00:00:32.800 --> 00:00:35.300
And map sends an empty UDP packet

11
00:00:35.300 --> 00:00:38.700
 and either receives no reply or

12
00:00:38.700 --> 00:00:42.000
 an icmp Port unreachable packet. We

13
00:00:41.100 --> 00:00:44.900
 are going to understand this into the packet breakdown in

14
00:00:44.900 --> 00:00:45.100
 depth.

15
00:00:46.200 --> 00:00:49.500
But due to udp's connection less nature the

16
00:00:49.500 --> 00:00:52.400
 output can be unreliable at many

17
00:00:52.400 --> 00:00:52.700
 times.

18
00:00:54.300 --> 00:00:57.200
So what actually happens in the UDP type

19
00:00:57.200 --> 00:00:57.500
 of scan?

20
00:00:58.300 --> 00:01:01.300
As you can see on the left hand side is the nmap machine

21
00:01:01.300 --> 00:01:04.700
 through which we are going to scan this particular server,

22
00:01:04.700 --> 00:01:06.100
 which is on the right hand side.

23
00:01:07.400 --> 00:01:10.300
So the first request that has been sent is a UDP

24
00:01:10.300 --> 00:01:11.000
 request.

25
00:01:11.900 --> 00:01:15.400
and if icmp is

26
00:01:15.400 --> 00:01:19.000
 received then we consider that

27
00:01:18.300 --> 00:01:21.600
 the port is open if we

28
00:01:21.600 --> 00:01:24.100
 do not receive any response then we

29
00:01:25.100 --> 00:01:27.300
See that the port is closed.

30
00:01:28.800 --> 00:01:28.900
so

31
00:01:29.900 --> 00:01:30.400
what happens?

32
00:01:31.400 --> 00:01:34.300
As you can see over here, this is the response and

33
00:01:34.300 --> 00:01:36.100
 this is the state of the port.

34
00:01:36.800 --> 00:01:39.200
If any UDP response we get from the Target

35
00:01:39.200 --> 00:01:42.700
 Port then the port is considered as

36
00:01:42.700 --> 00:01:44.000
 open by nmap.

37
00:01:44.600 --> 00:01:48.000
If no responses received even after retransmissions of

38
00:01:47.600 --> 00:01:50.500
 the packets, then the state is considered

39
00:01:50.500 --> 00:01:52.700
 as open or filtered.

40
00:01:53.800 --> 00:01:56.400
If icmp Port unreachable error comes

41
00:01:56.400 --> 00:01:57.700
 then the port.

42
00:01:58.400 --> 00:02:00.000
Is considered as closed?

43
00:02:01.600 --> 00:02:05.100
So, let's see the packet breakdown using Wireshark of

44
00:02:04.100 --> 00:02:06.800
 the UDP scan type.

45
00:02:07.600 --> 00:02:10.300
As you can see over here a UDP request

46
00:02:10.300 --> 00:02:13.100
 has been sent on the port number.

47
00:02:14.000 --> 00:02:14.200
this

48
00:02:15.300 --> 00:02:16.100
88

49
00:02:16.700 --> 00:02:18.000
and 89

50
00:02:18.800 --> 00:02:22.100
as you can see destination unreachable Port

51
00:02:21.100 --> 00:02:24.600
 unreachable has been received for this

52
00:02:24.600 --> 00:02:25.500
 particular packet.

53
00:02:27.400 --> 00:02:30.800
So it is not able to identify that what

54
00:02:30.800 --> 00:02:33.600
 is the port status in this case? The

55
00:02:33.600 --> 00:02:34.500
 port is closed.

56
00:02:35.700 --> 00:02:38.600
so interesting scenario Port status

57
00:02:39.700 --> 00:02:42.400
You will be able to see open or filtered instead

58
00:02:42.400 --> 00:02:43.800
 of open or close. Why?

59
00:02:44.800 --> 00:02:47.900
Yes why the answer is when nmap received

60
00:02:47.900 --> 00:02:50.400
 no reply from Port once scenario could

61
00:02:50.400 --> 00:02:53.400
 be that put 88 and 138 that

62
00:02:53.400 --> 00:02:56.400
 we are going to see into a practical scan is really

63
00:02:56.400 --> 00:02:56.700
 open.

64
00:02:57.800 --> 00:03:00.700
Is therefore not responding with any reply? However,

65
00:03:00.700 --> 00:03:03.100
 another possible scenario is that

66
00:03:03.100 --> 00:03:06.500
 the firewall is filtering out our traffic and thus

67
00:03:06.500 --> 00:03:09.400
 the UDP packet never reaches the Target and

68
00:03:09.400 --> 00:03:10.600
 we receive no reply.

69
00:03:11.300 --> 00:03:14.600
That's why we see the status as open or filtered.

70
00:03:15.300 --> 00:03:18.500
Either way, we won't know what is the difference which results

71
00:03:18.500 --> 00:03:21.100
 in nmap displaying open and filtered?

72
00:03:22.500 --> 00:03:24.800
So what are the advantages and disadvantages of?

73
00:03:26.400 --> 00:03:29.400
UDP scan the advantage is it allows the scanning

74
00:03:29.400 --> 00:03:30.600
 of the UDP ports?

75
00:03:31.200 --> 00:03:34.900
The disadvantage is it is unreliable at

76
00:03:34.900 --> 00:03:37.200
 many times because we cannot identify the

77
00:03:37.200 --> 00:03:39.000
 exact status of the port.

78
00:03:40.200 --> 00:03:43.300
So it is the Practical time and let's see UDP

79
00:03:43.300 --> 00:03:44.100
 scan in action.

80
00:03:44.900 --> 00:03:46.100
As you can see over here.

81
00:03:48.100 --> 00:03:51.600
On my terminal I'm going to type the command, which is nmap.

82
00:03:53.400 --> 00:03:54.900
and the target IP address

83
00:04:03.300 --> 00:04:03.500
now

84
00:04:04.400 --> 00:04:07.900
The UDP flag that is Su and hyphen

85
00:04:07.900 --> 00:04:10.300
 V to see the output in verbose mode.

86
00:04:11.200 --> 00:04:14.600
As you can see initiating UDP scan and

87
00:04:14.200 --> 00:04:17.000
 UDP scan has been successfully started.

88
00:04:27.200 --> 00:04:31.000
We have discovered two open ports. That is 1 3 7 and 5

89
00:04:30.400 --> 00:04:31.900
 3 5 3.

90
00:04:49.600 --> 00:04:52.700
As you can see the scan has been completed successfully and

91
00:04:52.700 --> 00:04:56.200
 we have identified that Port 137

92
00:04:55.200 --> 00:04:58.300
 is open and 5353 is open,

93
00:04:58.300 --> 00:05:01.700
 but we have not able to identify the exact status

94
00:05:01.700 --> 00:05:05.300
 of Port 88 and Port 138

95
00:05:04.300 --> 00:05:07.200
 as you can see the state is

96
00:05:07.200 --> 00:05:08.600
 open and filtered.

97
00:05:12.200 --> 00:05:15.600
So the host is up and we have identified two

98
00:05:15.600 --> 00:05:18.500
 open and two open and filter types

99
00:05:18.500 --> 00:05:22.000
 of Port. Let's see what happened into the background in

100
00:05:21.000 --> 00:05:23.100
 Wireshark.

101
00:05:25.500 --> 00:05:26.900
So I'm going to apply the filter.

102
00:05:33.200 --> 00:05:34.800
As you can see here.

103
00:05:35.900 --> 00:05:38.900
Icmp type of requests are beans

104
00:05:38.900 --> 00:05:41.700
 sent as you can see over here destination and

105
00:05:41.700 --> 00:05:43.600
 reachable, which means the port is closed.

106
00:05:47.800 --> 00:05:50.700
As you can see more requests are sent for ports. And

107
00:05:50.700 --> 00:05:54.400
 if we get a response that is destination unreachable,

108
00:05:53.400 --> 00:05:56.500
 then the port is considered as

109
00:05:56.500 --> 00:05:57.200
 closed.

110
00:05:59.800 --> 00:06:02.600
As you can see most of the ports are closed. We

111
00:06:02.600 --> 00:06:04.900
 only found two open ports.

112
00:06:06.100 --> 00:06:09.300
Let's see on the target side. What

113
00:06:09.300 --> 00:06:09.700
 happened?

114
00:06:10.600 --> 00:06:12.300
So this is that Target side.

115
00:06:13.600 --> 00:06:15.400
The packet capturing was happening.

116
00:06:18.700 --> 00:06:22.900
And you can see most of the packets are unreachable, which

117
00:06:22.900 --> 00:06:26.000
 means we are not able to identify that

118
00:06:25.400 --> 00:06:27.900
 the port is closed.

119
00:06:28.900 --> 00:06:30.300
or open

120
00:06:32.300 --> 00:06:33.400
I hope you guys understood.

121
00:06:34.200 --> 00:06:37.000
That how a UDP scan type works.

122
00:06:37.900 --> 00:06:38.200
Thank you.
