1
1

00:00:00,480  -->  00:00:02,810
<v ->Unneeded Services, in this lesson,</v>
2

2

00:00:02,810  -->  00:00:04,520
we're going to discuss the best practices
3

3

00:00:04,520  -->  00:00:07,090
of disabling unneeded services and switch ports
4

4

00:00:07,090  -->  00:00:10,030
on our network devices, servers and workstations.
5

5

00:00:10,030  -->  00:00:13,290
So, let's first talk about unneeded services.
6

6

00:00:13,290  -->  00:00:15,710
Now, before we talk too much about unneeded services,
7

7

00:00:15,710  -->  00:00:18,380
it's important to define exactly what a service is
8

8

00:00:18,380  -->  00:00:19,830
in case you're not aware.
9

9

00:00:19,830  -->  00:00:21,830
Now, a service is a type of application
10

10

00:00:21,830  -->  00:00:22,930
that runs in the background
11

11

00:00:22,930  -->  00:00:24,520
of the operating system or device
12

12

00:00:24,520  -->  00:00:26,360
to perform a specific function.
13

13

00:00:26,360  -->  00:00:28,370
For example, on your Windows server,
14

14

00:00:28,370  -->  00:00:30,070
if you have a shared printer in your network,
15

15

00:00:30,070  -->  00:00:33,190
you might be running a Print Spooler, and this is a service.
16

16

00:00:33,190  -->  00:00:36,010
Or you might be running a DHCP server on your network.
17

17

00:00:36,010  -->  00:00:37,670
And this allows you to automatically configure
18

18

00:00:37,670  -->  00:00:39,640
IP addresses for all your clients.
19

19

00:00:39,640  -->  00:00:42,580
This DHCP server is a type of service.
20

20

00:00:42,580  -->  00:00:44,870
To ensure the highest levels of security for our network
21

21

00:00:44,870  -->  00:00:47,140
and reduce the attack surface of our devices,
22

22

00:00:47,140  -->  00:00:49,200
it's important that we disable any services
23

23

00:00:49,200  -->  00:00:51,480
that are not needed for business operations.
24

24

00:00:51,480  -->  00:00:54,100
For example, if I'm going to be using static IP addresses
25

25

00:00:54,100  -->  00:00:55,620
for all my network devices,
26

26

00:00:55,620  -->  00:00:57,810
I don't need to have a DHCP server.
27

27

00:00:57,810  -->  00:01:00,157
So, I can shut down the DHCP server
28

28

00:01:00,157  -->  00:01:03,780
and the associated services on the network for DHCP.
29

29

00:01:03,780  -->  00:01:05,460
You see, each service that we're running
30

30

00:01:05,460  -->  00:01:07,880
has to be installed on some kind of a device.
31

31

00:01:07,880  -->  00:01:10,830
Then that device is now using a valuable disc space,
32

32

00:01:10,830  -->  00:01:13,750
and more importantly, it's introducing additional code
33

33

00:01:13,750  -->  00:01:15,510
that could contain vulnerabilities.
34

34

00:01:15,510  -->  00:01:17,010
So to combat this,
35

35

00:01:17,010  -->  00:01:19,170
administrators attempt to practice a concept
36

36

00:01:19,170  -->  00:01:20,990
known as least functionality.
37

37

00:01:20,990  -->  00:01:22,840
Now least functionality is the process
38

38

00:01:22,840  -->  00:01:25,540
of configuring a device, a server or a workstation
39

39

00:01:25,540  -->  00:01:27,450
to only provide essential services
40

40

00:01:27,450  -->  00:01:29,490
that are required by the user.
41

41

00:01:29,490  -->  00:01:31,920
Now, to create an environment of least functionality,
42

42

00:01:31,920  -->  00:01:34,420
administrators should disable unneeded services,
43

43

00:01:34,420  -->  00:01:36,690
ports and protocols on the network.
44

44

00:01:36,690  -->  00:01:38,830
When dealing with hardening of your network devices,
45

45

00:01:38,830  -->  00:01:41,480
you may also want to disable infrequently used services
46

46

00:01:41,480  -->  00:01:44,070
that could be used by an attacker for malicious purposes.
47

47

00:01:44,070  -->  00:01:46,450
Things like a denial of service attack, for instance.
48

48

00:01:46,450  -->  00:01:49,320
For example, the Echo service runs on port seven,
49

49

00:01:49,320  -->  00:01:51,060
Discard runs on port nine.
50

50

00:01:51,060  -->  00:01:52,950
Daytime runs on port 13.
51

51

00:01:52,950  -->  00:01:55,150
And Chargen runs on port 19.
52

52

00:01:55,150  -->  00:01:58,450
These are all examples of some smaller TCP and UDP services
53

53

00:01:58,450  -->  00:02:00,860
that we hardly ever use in modern networks.
54

54

00:02:00,860  -->  00:02:02,270
But, if they're enabled,
55

55

00:02:02,270  -->  00:02:03,890
you want to make sure they're disabled
56

56

00:02:03,890  -->  00:02:05,690
to better harden your devices.
57

57

00:02:05,690  -->  00:02:08,110
Now, even if you are running a service on your network,
58

58

00:02:08,110  -->  00:02:10,680
you may not need to run it on every single device.
59

59

00:02:10,680  -->  00:02:13,390
So, you need to figure out which devices you need it on,
60

60

00:02:13,390  -->  00:02:15,620
and disable it on all the other devices,
61

61

00:02:15,620  -->  00:02:18,040
because otherwise, it's just additional vulnerabilities
62

62

00:02:18,040  -->  00:02:19,090
you're accepting.
63

63

00:02:19,090  -->  00:02:21,470
For example, if you're running your DHCP server
64

64

00:02:21,470  -->  00:02:23,050
on your windows domain controller,
65

65

00:02:23,050  -->  00:02:24,900
then you can disable the DHCP server
66

66

00:02:24,900  -->  00:02:27,030
that's built into one of your network devices.
67

67

00:02:27,030  -->  00:02:30,410
Or, if you're using DHCP, but you never plan to use BOOTP,
68

68

00:02:30,410  -->  00:02:32,750
which is an older dynamic configuration protocol,
69

69

00:02:32,750  -->  00:02:35,130
you can disable that on all of your network devices,
70

70

00:02:35,130  -->  00:02:37,110
so BOOTP is now disabled.
71

71

00:02:37,110  -->  00:02:37,980
The key here is that
72

72

00:02:37,980  -->  00:02:39,870
if you're not using a particular service,
73

73

00:02:39,870  -->  00:02:41,380
you need to disable it.
74

74

00:02:41,380  -->  00:02:43,970
So to help you disable those unneeded services,
75

75

00:02:43,970  -->  00:02:46,540
Cisco Network Devices provide the auto secure
76

76

00:02:46,540  -->  00:02:48,170
command line interface command
77

77

00:02:48,170  -->  00:02:50,430
that will disable any unnecessary services
78

78

00:02:50,430  -->  00:02:52,360
while enabling necessary security services
79

79

00:02:52,360  -->  00:02:54,040
on your network devices.
80

80

00:02:54,040  -->  00:02:56,070
Finally, let's talk about the switch ports
81

81

00:02:56,070  -->  00:02:57,940
on your network devices themselves.
82

82

00:02:57,940  -->  00:02:59,090
As a best practice,
83

83

00:02:59,090  -->  00:03:01,120
if nothing is connected to a given switch port
84

84

00:03:01,120  -->  00:03:04,480
on a switch or router, that interface should be disabled.
85

85

00:03:04,480  -->  00:03:06,720
To disable a switch port on a router or switch,
86

86

00:03:06,720  -->  00:03:08,120
you're going to go into the configuration
87

87

00:03:08,120  -->  00:03:09,230
command line interface
88

88

00:03:09,230  -->  00:03:11,400
and enter the interface you want to disable
89

89

00:03:11,400  -->  00:03:14,660
such as interface FastEthernet 0/1.
90

90

00:03:14,660  -->  00:03:17,390
Then you're going to enter the command shutdown.
91

91

00:03:17,390  -->  00:03:19,530
At this point, even if somebody plugs a cable
92

92

00:03:19,530  -->  00:03:22,570
into FastEthernet 0/1 on that switch port,
93

93

00:03:22,570  -->  00:03:23,950
it's not going to do anything
94

94

00:03:23,950  -->  00:03:25,880
because that port has been electronically
95

95

00:03:25,880  -->  00:03:27,520
shutdown and disabled.
96

96

00:03:27,520  -->  00:03:29,450
Now, let's pretend that that switch port
97

97

00:03:29,450  -->  00:03:31,930
that goes with FastEthernet 0/1
98

98

00:03:31,930  -->  00:03:33,270
is connected to the patch panel.
99

99

00:03:33,270  -->  00:03:35,480
And that patch panel is connected to a wall jack
100

100

00:03:35,480  -->  00:03:37,000
inside an empty office.
101

101

00:03:37,000  -->  00:03:38,830
Your company just hires a new employee,
102

102

00:03:38,830  -->  00:03:41,510
and now they're going to put that employee in that office.
103

103

00:03:41,510  -->  00:03:42,540
What are you going to do?
104

104

00:03:42,540  -->  00:03:44,750
Well, you need to re enable that wall jack.
105

105

00:03:44,750  -->  00:03:46,860
So you're going to log back into the switch.
106

106

00:03:46,860  -->  00:03:47,693
You're going to go into the
107

107

00:03:47,693  -->  00:03:49,150
configuration command line interface,
108

108

00:03:49,150  -->  00:03:52,580
and you're going to enter interface FastEthernet 0/1
109

109

00:03:52,580  -->  00:03:56,060
and then you're going to enter, no shutdown, that's it.
110

110

00:03:56,060  -->  00:03:58,160
The switch port will immediately turn itself back on
111

111

00:03:58,160  -->  00:04:00,440
and it's ready to send and receive traffic again.
112

112

00:04:00,440  -->  00:04:02,530
So it really doesn't take a lot of effort to turn off
113

113

00:04:02,530  -->  00:04:04,140
or turn on when they switch ports.
114

114

00:04:04,140  -->  00:04:06,540
That's why it's a best practice to always disable them
115

115

00:04:06,540  -->  00:04:07,970
when they're not in use.
116

116

00:04:07,970  -->  00:04:09,830
Now, each network device manufacturer
117

117

00:04:09,830  -->  00:04:11,450
is going to use their own commands.
118

118

00:04:11,450  -->  00:04:13,970
The one I just covered were for Cisco devices,
119

119

00:04:13,970  -->  00:04:15,280
because they're most commonly used
120

120

00:04:15,280  -->  00:04:16,900
in large business networks.
121

121

00:04:16,900  -->  00:04:19,210
If you're going to be using a different brand or manufacturer,
122

122

00:04:19,210  -->  00:04:21,100
simply check your manual or Google,
123

123

00:04:21,100  -->  00:04:24,290
how to shut down and enable switch ports on those devices.
124

124

00:04:24,290  -->  00:04:26,010
After all, even if there's no cables
125

125

00:04:26,010  -->  00:04:27,320
connected to a switch port,
126

126

00:04:27,320  -->  00:04:30,490
an open switch port is going to represent a vulnerability.
127

127

00:04:30,490  -->  00:04:31,630
Think about it this way.
128

128

00:04:31,630  -->  00:04:32,870
What would happen if an attacker
129

129

00:04:32,870  -->  00:04:34,520
made their way past your security
130

130

00:04:34,520  -->  00:04:36,440
and were able to get to where the switch is.
131

131

00:04:36,440  -->  00:04:37,710
They could just plug into it
132

132

00:04:37,710  -->  00:04:39,530
and immediately have access to the network.
133

133

00:04:39,530  -->  00:04:40,930
That would be a really bad thing
134

134

00:04:40,930  -->  00:04:43,430
because all the switch ports are enabled by default.
135

135

00:04:43,430  -->  00:04:44,980
So we want to make sure we disable
136

136

00:04:44,980  -->  00:04:46,500
any of them that we're not using.
137

137

00:04:46,500  -->  00:04:48,750
Remember just like an unneeded service,
138

138

00:04:48,750  -->  00:04:50,290
if there's an unneeded switch port,
139

139

00:04:50,290  -->  00:04:51,530
you should always disable it
140

140

00:04:51,530  -->  00:04:52,850
to reduce your attack surface
141

141

00:04:52,850  -->  00:04:55,000
and increase the security of your networks.
