1

00:00:00,788  -->  00:00:02,800
We previously talked about using

2

00:00:02,891  -->  00:00:05,691
Virtual Machines
or VMs for testing.

3

00:00:05,874  -->  00:00:07,805
Now we’re going to go
through using VMs

4

00:00:07,885  -->  00:00:10,754
for creating separate
security domains

5

00:00:10,960  -->  00:00:12,468
and forcing isolation

6

00:00:12,480  -->  00:00:14,331
and compartmentalization
with them.

7

00:00:14,685  -->  00:00:17,062
VMs are a kindof sandbox

8

00:00:17,200  -->  00:00:19,280
and are an excellent tool

9

00:00:19,371  -->  00:00:21,382
for implementing isolation

10

00:00:21,405  -->  00:00:22,811
and compartmentalization

11

00:00:23,040  -->  00:00:24,125
to reduce risk,

12

00:00:24,571  -->  00:00:27,120
impact and to control
an attacker.

13

00:00:27,954  -->  00:00:30,720
They’re also a great tool
for establishing isolation

14

00:00:30,754  -->  00:00:33,542
and compartmentalization
for aliases,

15

00:00:33,680  -->  00:00:36,342
as discussed in the section
on Op Sec.

16

00:00:36,685  -->  00:00:39,165
You must have some
sort of isolation

17

00:00:39,200  -->  00:00:41,600
and compartmentalization
for aliases,

18

00:00:41,862  -->  00:00:44,754
whether that be virtual
for a virtual machine

19

00:00:44,948  -->  00:00:45,948
or physical.

20

00:00:46,274  -->  00:00:48,297
Virtualization provides security

21

00:00:48,308  -->  00:00:50,674
because it reduces
the interfaces

22

00:00:50,800  -->  00:00:52,720
between the security domains

23

00:00:52,971  -->  00:00:54,971
while allowing security domains

24

00:00:55,062  -->  00:00:56,982
to exist and communicate

25

00:00:57,040  -->  00:00:58,731
through those interfaces.

26

00:00:59,120  -->  00:01:02,285
Security domains that
just exist in isolation

27

00:01:02,708  -->  00:01:03,908
have limited use

28

00:01:04,228  -->  00:01:06,708
as they have nothing that they
can communicate with.

29

00:01:07,040  -->  00:01:08,594
They do have their purpose,

30

00:01:08,971  -->  00:01:10,605
but it’s a limited use case.

31

00:01:11,497  -->  00:01:13,565
So we use virtualization

32

00:01:14,068  -->  00:01:15,531
because it reduces those

33

00:01:15,622  -->  00:01:17,885
interfaces between the
security domains

34

00:01:18,011  -->  00:01:20,285
while still allowing
the domains to exist

35

00:01:20,480  -->  00:01:22,731
and communicate through
those interfaces.

36

00:01:23,691  -->  00:01:26,160
Hopefully, you set up
the test environment,

37

00:01:26,205  -->  00:01:28,125
have been going through
the course and

38

00:01:28,445  -->  00:01:30,079
testing various things out.

39

00:01:30,080  -->  00:01:32,331
So you should now be
familiar with VMware

40

00:01:32,571  -->  00:01:34,125
and/or VirtualBox,

41

00:01:34,434  -->  00:01:37,417
these are the Type 2,
hosted hypervisors.

42

00:01:37,782  -->  00:01:40,011
The hypervisor is installed

43

00:01:40,068  -->  00:01:42,182
on the operating system
that you have.

44

00:01:43,074  -->  00:01:45,680
The main Type 2 hosted
hypervisors are

45

00:01:45,771  -->  00:01:47,451
VirtualBox, as we’ve mentioned.

46

00:01:47,645  -->  00:01:50,525
There’s a VMware player
and the workstation.

47

00:01:50,594  -->  00:01:54,045
VMware also has something
called VMware Fusion,

48

00:01:54,194  -->  00:01:55,462
which is for Mac.

49

00:01:55,622  -->  00:01:57,680
There’s something called
Parallels desktop

50

00:01:57,737  -->  00:01:58,737
which is for Mac.

51

00:01:58,822  -->  00:02:01,451
There’s also Vagrant, VPC,

52

00:02:01,611  -->  00:02:03,691
and Citrix desktop player,

53

00:02:03,760  -->  00:02:05,417
which is for Windows and Mac.

54

00:02:06,080  -->  00:02:08,800
I recommend VirtualBox
for security,

55

00:02:08,891  -->  00:02:11,737
privacy and anonymity,
as it’s free.

56

00:02:12,011  -->  00:02:13,908
So there is no money trail

57

00:02:14,011  -->  00:02:16,582
if non-attribution
is important to you.

58

00:02:16,765  -->  00:02:19,131
Also, VirtualBox has snapshots.

59

00:02:19,245  -->  00:02:21,851
VMware doesn’t have snapshots

60

00:02:21,897  -->  00:02:23,120
on the free version.

61

00:02:23,177  -->  00:02:26,080
Snapshots are a useful
security feature

62

00:02:26,297  -->  00:02:29,120
to return back to
a known good state.

63

00:02:29,188  -->  00:02:32,594
Snapshots enable you to make
a permanent backup

64

00:02:32,685  -->  00:02:34,571
of the entire virtual machine

65

00:02:34,662  -->  00:02:37,051
and then restore back
to that virtual machine.

66

00:02:37,188  -->  00:02:39,428
So it’s a useful feature
for security

67

00:02:39,531  -->  00:02:42,491
to return back to a known
good state, as I said.

68

00:02:43,508  -->  00:02:45,885
So that’s the Type 2 hypervisors

69

00:02:45,920  -->  00:02:48,605
which you should be reasonably
familiar with,

70

00:02:48,765  -->  00:02:51,188
with your use of VirtualBox
or VMware.

71

00:02:51,360  -->  00:02:54,605
Now there’s the Type 1
native hypervisors,

72

00:02:54,651  -->  00:02:57,417
also called bare
metal hypervisors.

73

00:02:57,474  -->  00:02:59,920
There is no host
operating system.

74

00:03:00,045  -->  00:03:02,560
In fact, the hypervisor
is really

75

00:03:02,697  -->  00:03:04,434
the host operating system.

76

00:03:04,937  -->  00:03:08,217
Common Type 1 native bare
metal hypervisors

77

00:03:08,285  -->  00:03:11,908
include VMware, ESX and ESXi.

78

00:03:12,011  -->  00:03:14,205
There’s also Oracle VM Server,

79

00:03:14,331  -->  00:03:16,685
Microsoft’s got its
HyperV product,

80

00:03:16,891  -->  00:03:20,137
and there’s also the free and
open sources XenServer.

81

00:03:20,274  -->  00:03:24,000
Type 1 hypervisors have
the advantage of being faster

82

00:03:24,068  -->  00:03:25,870
and probably more secure,

83

00:03:25,942  -->  00:03:27,954
as there is a reduced
attack surface.

84

00:03:28,034  -->  00:03:30,685
There’s no operating system
that their sat on

85

00:03:30,731  -->  00:03:31,760
that can be attacked.

86

00:03:32,037  -->  00:03:33,104
You might set up a

87

00:03:33,291  -->  00:03:36,182
Type 1 hypervisor on a server
on your network,

88

00:03:36,434  -->  00:03:39,360
or remotely in the cloud
to escape

89

00:03:39,428  -->  00:03:41,222
an adversary’s sphere
of influence

90

00:03:41,268  -->  00:03:43,360
that host virtual
machines for you.

91

00:03:43,760  -->  00:03:46,274
I like using XenServer
which is free.

92

00:03:46,480  -->  00:03:48,422
I have a XenServer on
my local network

93

00:03:48,457  -->  00:03:50,754
which hosts many of
my virtual machines,

94

00:03:51,291  -->  00:03:52,640
and you can install XenServer

95

00:03:52,662  -->  00:03:54,937
just like any other
operating system.

96

00:03:54,994  -->  00:03:56,880
You can even install XenServer

97

00:03:56,980  -->  00:03:58,960
in a VirtualBox if you want to

98

00:03:59,051  -->  00:04:01,090
play around with it and
see how it works.

99

00:04:01,977  -->  00:04:03,880
Simply download the ISO

100

00:04:03,908  -->  00:04:06,640
and install it like any other
operating system.

101

00:04:07,965  -->  00:04:09,565
And that’s what the interface
looks like.

102

00:04:09,851  -->  00:04:12,148
It’s very similar to VirtualBox
and VMware.

103

00:04:12,217  -->  00:04:14,845
It’s just dedicated
on its own server.

104

00:04:16,502  -->  00:04:18,822
Other than Type 1 and Ty pe 2,

105

00:04:18,834  -->  00:04:20,345
there’re also hybrid

106

00:04:20,674  -->  00:04:22,480
hypervisors that effectively

107

00:04:22,571  -->  00:04:26,925
convert the host operating system
to a Type 1 hypervisor.

108

00:04:27,085  -->  00:04:28,948
That might also be
of interest to you

109

00:04:29,005  -->  00:04:30,651
because you can
use it for security,

110

00:04:30,708  -->  00:04:31,405
for isolation

111

00:04:31,451  -->  00:04:32,948
and compartmentalization.

112

00:04:33,108  -->  00:04:36,011
First is KVM or Kernel
Virtual Machine.

113

00:04:36,114  -->  00:04:38,205
It’s an open source, fast,

114

00:04:38,274  -->  00:04:40,274
GPL-licensed hypervisor that

115

00:04:40,400  -->  00:04:42,685
comes with GNU Linux OS.

116

00:04:42,982  -->  00:04:44,868
And other than
VirtualBox and Xen,

117

00:04:44,937  -->  00:04:46,194
I can also recommend this

118

00:04:46,240  -->  00:04:48,514
as a virtual machine for Linux.

119

00:04:49,325  -->  00:04:50,868
But do make sure you use it

120

00:04:50,982  -->  00:04:52,868
with Virtual Machine Manager,

121

00:04:53,142  -->  00:04:56,377
which is a front-end
GUI for KVM,

122

00:04:56,388  -->  00:04:58,708
making it simpler
and easier to use.

123

00:05:00,262  -->  00:05:02,262
And that looks like this
and as you can see, it’s

124

00:05:02,331  -->  00:05:05,451
pretty similar to VMware
and VirtualBox.

125

00:05:05,588  -->  00:05:08,268
And then when you want to see
the settings for the virtual machines,

126

00:05:08,708  -->  00:05:12,045
again it’s pretty similar to
VMware and VirtualBox.

127

00:05:12,274  -->  00:05:14,262
You can see all your
various options

128

00:05:14,331  -->  00:05:15,942
for setting up the virtual
machine.

129

00:05:17,222  -->  00:05:18,925
If you’re considering using KVM,

130

00:05:19,074  -->  00:05:21,074
here’s a guide for
Debian Jessie,

131

00:05:21,737  -->  00:05:23,680
you can see it’s not
too difficult.

132

00:05:23,794  -->  00:05:26,102
The packages are available
in the repository.

133

00:05:26,228  -->  00:05:28,651
Simply install them
and give it a try.

134

00:05:29,520  -->  00:05:31,508
It works with Whonix,

135

00:05:31,600  -->  00:05:34,148
which is a security-based
operating system

136

00:05:34,182  -->  00:05:37,874
we’re going to talk about shortly.
So if you want to use Whonix,

137

00:05:38,205  -->  00:05:40,285
you might well be
using it with KVM

138

00:05:40,445  -->  00:05:42,628
if you’re using Linux.
But as I said,

139

00:05:42,685  -->  00:05:44,251
we’ll discuss that shortly.

140

00:05:44,960  -->  00:05:47,280
There are quite a few Linux VMs.

141

00:05:47,371  -->  00:05:49,817
KVM probably is the main one

142

00:05:50,011  -->  00:05:52,445
as it does come with
GNU Linux OS,

143

00:05:52,537  -->  00:05:54,377
but a couple of others
worth a mention

144

00:05:54,422  -->  00:05:58,342
is OpenVZ which is a container
based virtualization,

145

00:05:59,748  -->  00:06:01,782
and also Linux Containers

146

00:06:01,908  -->  00:06:04,754
which, as the name suggests,
is another container-based

147

00:06:04,777  -->  00:06:06,822
virtualization application.

148

00:06:08,594  -->  00:06:11,908
FreeBSD uses a mechanism
they call jails,

149

00:06:12,125  -->  00:06:14,640
which are independent
environments

150

00:06:14,708  -->  00:06:18,902
implemented via operating
system-level virtualization,

151

00:06:19,074  -->  00:06:23,325
wherein each jail is a virtual
environment with its own files,

152

00:06:23,417  -->  00:06:25,714
processors, and user accounts

153

00:06:25,874  -->  00:06:28,342
and bound to a different
IP address.

154

00:06:28,537  -->  00:06:31,920
And each jail is completely
sealed off from the other.

155

00:06:32,171  -->  00:06:36,228
If you use FreeBSD, you will be
aware of it already, I’m sure.

156

00:06:36,548  -->  00:06:42,320
This works very effectively as an isolation
and compartmentalization security control.

157

00:06:43,234  -->  00:06:47,451
Anyone familiar with Oracle Solaris will
know that there’s a similar concept

158

00:06:47,554  -->  00:06:49,508
which they refer to as Zones.

159

00:06:49,702  -->  00:06:51,760
I’ve worked with those
at some banks,

160

00:06:51,840  -->  00:06:55,005
but Solaris is not a very used
operating system at the moment.

161

00:06:56,617  -->  00:07:00,731
Finally, there is Docker which is quite
the buzzword at the moment.

162

00:07:00,940  -->  00:07:03,611
To explain what Docker is,
let me show you this diagram.

163

00:07:04,240  -->  00:07:07,805
If you think about VM hypervisors
such as HyperV,

164

00:07:07,908  -->  00:07:09,440
KVM and Xen,

165

00:07:09,542  -->  00:07:12,640
they’re all based on emulating
virtual hardware.

166

00:07:12,811  -->  00:07:15,314
That means they’re heavy,
relatively,

167

00:07:15,417  -->  00:07:17,291
in terms of system resources.

168

00:07:17,805  -->  00:07:21,931
Docker containers, however,
use shared operating systems.

169

00:07:22,490  -->  00:07:24,377
That means they are
much more efficient

170

00:07:24,610  -->  00:07:27,154
than hypervisors in system
resourced terms.

171

00:07:27,428  -->  00:07:30,720
Instead of virtualizing hardware,
containers rest on top

172

00:07:30,754  -->  00:07:32,742
of a single Linux instance,

173

00:07:32,971  -->  00:07:36,411
meaning you have a small capsule
containing your applications.

174

00:07:37,142  -->  00:07:40,754
Docker’s becoming very popular
for businesses because of this.

175

00:07:41,154  -->  00:07:44,560
It enables virtualization with
lower system requirements.

176

00:07:44,971  -->  00:07:50,354
So Docker’s another option for isolation,
but it is mostly implemented server side.

177

00:07:50,674  -->  00:07:53,531
Solaris’ Zones works
very similar to this.

178

00:07:54,697  -->  00:07:57,942
You can also get what is called
a Virtual Appliance.

179

00:07:58,251  -->  00:08:01,348
Here are examples
from TurnKey Linux,

180

00:08:01,531  -->  00:08:04,285
a service I use and
highly recommend.

181

00:08:04,422  -->  00:08:08,274
They integrate with Amazon web
services and you can deploy

182

00:08:08,502  -->  00:08:11,325
virtual servers in,
literally, seconds.

183

00:08:11,485  -->  00:08:12,960
So let me give you an example.

184

00:08:13,560  -->  00:08:18,091
Maybe you want to run a VPN server,
an open VPN server in the cloud

185

00:08:18,228  -->  00:08:20,091
via Amazon web services.

186

00:08:20,228  -->  00:08:22,937
With a pre-configured
virtual application,

187

00:08:23,005  -->  00:08:26,308
the time and skill to do it
is vastly reduced.

188

00:08:26,651  -->  00:08:29,462
You’re able to select the virtual
appliancethat you want to use,

189

00:08:29,588  -->  00:08:31,257
in this case OpenVPN,

190

00:08:31,360  -->  00:08:35,177
and quickly and easily deploy
a full virtual server

191

00:08:35,222  -->  00:08:38,102
with operating system
and OpenVPN

192

00:08:38,205  -->  00:08:42,114
within minutes based on this
virtual appliances configuration.

193

00:08:42,582  -->  00:08:47,680
Or maybe you want a domain controller
to authenticate local network users.

194

00:08:47,828  -->  00:08:52,354
You can take this and install it on
VirtualBox or a dedicated XenServer

195

00:08:52,422  -->  00:08:56,171
you’ve got a local domain controller
that’s already set up and configured.

196

00:08:56,285  -->  00:08:59,200
You’ll obviously need to configure
it a little bit for your environment,

197

00:08:59,280  -->  00:09:00,754
but it’s there, pre-made.

198

00:09:01,268  -->  00:09:02,788
You do of course have to trust

199

00:09:02,857  -->  00:09:05,428
TurnKey that they’re not backdoored
it in some way,

200

00:09:05,600  -->  00:09:08,891
but in the same light, we have
to trust all operating systems

201

00:09:08,937  -->  00:09:11,782
and applications, as well
as virtual appliances.

202

00:09:12,148  -->  00:09:15,542
We’ll talk more on TurnKey Linux
later in other sections.

203

00:09:16,251  -->  00:09:20,925
This is Wikipedia’s page comparing all
the platform virtualization software

204

00:09:21,074  -->  00:09:22,662
and there is loads of them,

205

00:09:24,194  -->  00:09:25,222
as you can see here.

206

00:09:28,000  -->  00:09:30,011
So that’s a useful link
to see what’s out there.

207

00:09:30,205  -->  00:09:32,251
What I’ve covered is what
I see as the best,

208

00:09:32,342  -->  00:09:34,548
but there are many,
many alternatives.

209

00:09:35,897  -->  00:09:38,994
Moving away from dedicated
virtual machines,

210

00:09:39,097  -->  00:09:43,954
it’s inevitable that operating systems
will move to using virtualization

211

00:09:44,091  -->  00:09:46,400
as part of its core security.

212

00:09:46,502  -->  00:09:48,971
Windows 10 has made
that move already.

213

00:09:49,070  -->  00:09:53,588
Windows 10 Device Guard uses hardware
technology and virtualization

214

00:09:53,897  -->  00:09:56,639
to isolate the decision-making
functions

215

00:09:56,640  -->  00:09:58,502
from the rest of the operating
system,

216

00:09:58,628  -->  00:10:01,508
which helps provide protection
from attackers

217

00:10:01,531  -->  00:10:04,548
or malware that have managed
to gain admin rights.

218

00:10:04,914  -->  00:10:08,320
Type 1 hypervisor technology that
is used to run virtual machines

219

00:10:08,400  -->  00:10:11,748
in Microsoft HyperV
is used to isolate

220

00:10:11,817  -->  00:10:15,211
core Windows services into
a virtualization-based

221

00:10:15,257  -->  00:10:16,697
protected container.

222

00:10:16,960  -->  00:10:21,634
These hardware-protected containers
are guarded by the IOMMU

223

00:10:21,657  -->  00:10:24,411
and other mechanisms
within the CPU.

224

00:10:24,754  -->  00:10:26,422
So you can see that Windows 10

225

00:10:26,548  -->  00:10:29,680
has taken quite a leap into
security through isolation

226

00:10:29,737  -->  00:10:32,148
compartmentalization
by implementing

227

00:10:32,182  -->  00:10:34,525
this Windows 10 Device Guard.

228

00:10:34,845  -->  00:10:37,280
This will make Windows 10
harder to compromise.

229

00:10:37,634  -->  00:10:40,914
And I talk more on Device Guard
in its own section,

230

00:10:41,017  -->  00:10:44,514
but it’s obviously worth mentioning
in this section on virtual machines

231

00:10:44,605  -->  00:10:48,251
as that is where operating systems
core security functionality,

232

00:10:48,365  -->  00:10:50,754
I believe, is moving towards.
