WEBVTT - This file was automatically generated by VIMEO

0
00:00:04.800 --> 00:00:07.100
Hello everyone. So in this

1
00:00:07.100 --> 00:00:10.500
 video we are going to see the TCP synth type

2
00:00:10.500 --> 00:00:14.200
 of scam which is also known as stealthcan or

3
00:00:13.200 --> 00:00:15.500
 half open scan.

4
00:00:16.600 --> 00:00:20.500
The syntax of doing the scan is nmap hyphen

5
00:00:19.500 --> 00:00:22.500
 SS the target IP

6
00:00:22.500 --> 00:00:25.400
 address that you want to scan and hyphen P the port number.

7
00:00:26.400 --> 00:00:29.500
This can type is also known as half open

8
00:00:29.500 --> 00:00:33.600
 scanning because it actually never sends or

9
00:00:32.600 --> 00:00:35.600
 opens a full TCP connection.

10
00:00:36.500 --> 00:00:39.400
The port scanner generates a syn packet

11
00:00:39.400 --> 00:00:42.400
 if the target port is open, it will respond with

12
00:00:42.400 --> 00:00:45.700
 a synac packet the scanner then responds with

13
00:00:45.700 --> 00:00:47.900
 the rst reset packet.

14
00:00:48.600 --> 00:00:51.700
Closing the connection before actually the handshake

15
00:00:51.700 --> 00:00:52.600
 is completed.

16
00:00:54.200 --> 00:00:58.200
That is only two steps or Arden of the TCP

17
00:00:57.200 --> 00:00:59.100
 3 Way handshake.

18
00:01:01.400 --> 00:01:04.800
If there is a port which is closed, but unfiltered the

19
00:01:04.800 --> 00:01:07.500
 target will instantly respond with the reset

20
00:01:07.500 --> 00:01:09.900
 packet and tell us the port is closed.

21
00:01:12.300 --> 00:01:15.300
So what actually happens in the

22
00:01:15.300 --> 00:01:15.700
 background?

23
00:01:16.900 --> 00:01:19.900
When we are going to perform a stealth

24
00:01:19.900 --> 00:01:20.100
 scan.

25
00:01:21.400 --> 00:01:25.300
As you can see on the left hand side is the unmapped machine

26
00:01:24.300 --> 00:01:27.500
 through which you're going to perform the

27
00:01:27.500 --> 00:01:30.700
 scan on the right hand side is the server which

28
00:01:30.700 --> 00:01:31.400
 is your target.

29
00:01:33.100 --> 00:01:36.700
So the first request that nmap sends is the sin type

30
00:01:36.700 --> 00:01:37.200
 of packet.

31
00:01:38.500 --> 00:01:40.900
the server responds with the synac

32
00:01:42.200 --> 00:01:45.400
but there is no act like the full

33
00:01:45.400 --> 00:01:48.300
 TCP connect scan that we saw so there is

34
00:01:48.300 --> 00:01:52.100
 no acknowledgment packet that has been sent that's

35
00:01:51.100 --> 00:01:54.700
 why this is known as TCP half

36
00:01:54.700 --> 00:01:55.600
 connect scan.

37
00:01:58.100 --> 00:02:01.800
So, let's see the Wireshark packet break down to understand

38
00:02:01.800 --> 00:02:04.200
 better what actually is happening.

39
00:02:05.200 --> 00:02:08.400
As you can see in the figure the first request has

40
00:02:08.400 --> 00:02:10.500
 been sent to Port 23.

41
00:02:11.200 --> 00:02:13.100
and put 22

42
00:02:14.400 --> 00:02:18.200
Port 23, the reply is reset, which

43
00:02:17.200 --> 00:02:20.400
 means this port is closed.

44
00:02:21.300 --> 00:02:25.000
But for Port 22 a synac has been received which

45
00:02:24.100 --> 00:02:27.600
 indicates that this port

46
00:02:27.600 --> 00:02:28.200
 is open.

47
00:02:29.300 --> 00:02:32.600
You can notice there is no third step of

48
00:02:32.600 --> 00:02:35.900
 tcp3 way handshake that is act which

49
00:02:35.900 --> 00:02:37.100
 is happening over here.

50
00:02:39.900 --> 00:02:43.000
So what are the advantages and disadvantages

51
00:02:42.300 --> 00:02:44.400
 of this type of scan?

52
00:02:45.400 --> 00:02:48.300
The advantage is it is quicker because it

53
00:02:48.300 --> 00:02:50.200
 sends less number of packets.

54
00:02:51.200 --> 00:02:54.600
What is the disadvantage with the admired advancements in

55
00:02:54.600 --> 00:02:57.700
 firewall and server defenses technology? It

56
00:02:57.700 --> 00:02:59.700
 is not very stealthy anymore.

57
00:03:01.700 --> 00:03:04.100
So it is the Practical time and let's see

58
00:03:04.100 --> 00:03:06.100
 this type of scan in action.

59
00:03:08.400 --> 00:03:11.800
As you can see over here. I'm going to type the

60
00:03:11.800 --> 00:03:12.900
 command and map.

61
00:03:13.700 --> 00:03:16.200
And my target IP address that I want

62
00:03:16.200 --> 00:03:16.600
 to scan.

63
00:03:18.600 --> 00:03:21.400
I will add the flag hyphen V to see

64
00:03:21.400 --> 00:03:23.200
 the output in verbose mode.

65
00:03:24.500 --> 00:03:27.500
Now I will add hyphen SS which stands

66
00:03:27.500 --> 00:03:28.700
 for a stealth scan.

67
00:03:31.300 --> 00:03:34.500
I have also started Wireshark in the background and

68
00:03:34.500 --> 00:03:35.500
 I will hit enter.

69
00:03:36.500 --> 00:03:40.100
As you can see the nmap has successfully initiated

70
00:03:39.100 --> 00:03:41.900
 a sin still scan.

71
00:03:45.300 --> 00:03:47.000
The Wireshark is running in the background.

72
00:03:48.900 --> 00:03:51.900
As you can see and map has identified three

73
00:03:51.900 --> 00:03:55.500
 ports, which is open put 88.445 and

74
00:03:55.500 --> 00:03:58.100
 Port 7070 and the host is up.

75
00:03:59.800 --> 00:04:02.100
Now, let's go to Wireshark and into the

76
00:04:02.100 --> 00:04:05.700
 filter. Let's type ip.edr equals

77
00:04:05.700 --> 00:04:08.200
 equals the target IP address that we

78
00:04:08.200 --> 00:04:08.800
 scan for.

79
00:04:10.100 --> 00:04:13.600
Now, let's see the packets in which we will observe the

80
00:04:13.600 --> 00:04:15.800
 sin and the synac that happened.

81
00:04:18.300 --> 00:04:22.600
Remember in this type of scan there will be no third step

82
00:04:21.600 --> 00:04:24.100
 that will happen. That is

83
00:04:24.100 --> 00:04:25.300
 the act packet.

84
00:04:41.700 --> 00:04:45.400
So, let's see in the packets if we can see perfect as

85
00:04:44.400 --> 00:04:46.500
 you can see over here.

86
00:04:48.400 --> 00:04:51.300
The sin has been sent and synac has

87
00:04:51.300 --> 00:04:54.500
 been received for this specific port number.

88
00:04:55.900 --> 00:04:58.200
Which is 445 as you

89
00:04:58.200 --> 00:05:02.000
 can see over here a sin was sent and synac

90
00:05:01.200 --> 00:05:03.400
 has been received over here.

91
00:05:08.200 --> 00:05:09.700
As you can see here.

92
00:05:10.700 --> 00:05:13.400
This is the target side. I was running the

93
00:05:13.400 --> 00:05:17.100
 Wireshark and on the target side. Also, the sport

94
00:05:16.100 --> 00:05:19.700
 was opened and 445 has been

95
00:05:19.700 --> 00:05:22.400
 successfully sended a sin act

96
00:05:22.400 --> 00:05:25.700
 packet which indicate that this port number

97
00:05:25.700 --> 00:05:26.300
 is open.

98
00:05:27.200 --> 00:05:30.400
If you notice for all other ports, the reset has been

99
00:05:30.400 --> 00:05:34.300
 successfully sent which indicates that this port

100
00:05:33.300 --> 00:05:35.100
 number is closed.

101
00:05:42.300 --> 00:05:45.300
As you can see all the other ports are

102
00:05:45.300 --> 00:05:48.500
 closed and hence reset packets have

103
00:05:48.500 --> 00:05:50.900
 been sent for all other different ports.

104
00:05:59.600 --> 00:06:02.800
So I hope you guys understood that TCP

105
00:06:02.800 --> 00:06:05.800
 half connect scan or the stealth scan.

106
00:06:05.800 --> 00:06:06.700
 Thank you.
