OpenStack Cloud Security - Sample Chapter
OpenStack Cloud Security - Sample Chapter
ee
P U B L I S H I N G
pl
C o m m u n i t y
E x p e r i e n c e
D i s t i l l e d
$ 34.99 US
22.99 UK
Sa
m
expertise are Linux, networking, security, data centers, and OpenStack. With more
than 10 years of working experience in this field, he has experienced different IT
roles, technologies, and languages. Fabio has worked for many different companies,
starting from a one-man company to huge companies such as Tech Data and
Samsung. This has allowed him to consider various technologies from different
points of view, helping him develop critical thinking and understand whether a
particular technology is the correct one in a very short span of time.
Since he is always looking for better technologies, he also tries new technologies
to see their advantages over the old ones. Two of the most important things Fabio
evaluates in a technology are its internal security and the possibility of additional
security through configuration or interaction with the other technologies. For
virtualization, he often uses OpenStack due to its power and simplicity, ever since
he first tried it in 2011. Fabio has used OpenStack for the public-facing cloud, as well
as the internal clouds.
Preface
As our society moves from an analog world to a digital world, it is easier for
ill-intentioned people to attack privates, companies, banks, and government for
their advantage or for the other party's damage. Since the beginning of information
technologies, we have seen a shift to digitalize our world, and this process has been
accelerating ever since. The virtualization has concentrated more data on even less
systems, making these systems very nice targets for attacks. Making the clouds secure
will be one of the biggest security challenges for the next 10 years, from my point of
view. The goal of this book is to prepare cloud administrators for this challenge.
The structure of this book is designed to give you a wide perspective on security.
This has multiple reasons. First of all, programs change, but a secure mindset is often
more important than knowing how to secure a very specific software, also because
very often people specialize in a particular part of the IT sector and kind of lose track
of what there is around the technology they master. This often leads to huge security
problems in between the areas of expertise of the various people of the team.
OpenStack allows very powerful infrastructures, but tends to be pretty complex,
being a solution to many different situations, making it, often, very interesting from
a business point of view, but very hard to manage safely.
Preface
Chapter 3, Securing OpenStack Networking, shows you how the OSI networking
model works from a security perspective and a lot of possible network attacks
for each OSI level. In the second part of the chapter, you can see how to harden
OpenStack and a few utilities OpenStack networking can provide to make your
workflow more secure.
Chapter 4, Securing OpenStack Communications and Its API, explains how the encryption
works in our world, and, therefore, what its strengths and weaknesses are. You'll also
learn how to enable encryption for the OpenStack APIs.
Chapter 5, Securing the OpenStack Identification and Authentication System and Its
Dashboard, shows you how the identification, authentication, and authorization
systems work, as well as how OpenStack can be configured to meet your needs
from this point of view.
Chapter 6, Securing OpenStack Storage, explains how the different kinds of storage
work from a security standpoint and the options you have to implement them in
OpenStack. Also, you will see some configuration to make the storage more resilient
to attacks.
Chapter 7, Securing the Hypervisor, lists all the hypervisors that can be used with
OpenStack. You'll find a lot of insight on how to choose the right hypervisor for
you and how to secure it.
OpenStack Security
Challenges
As we have seen in the first chapter, each level of your infrastructure can be an object
of the unwanted attention for an attacker. Software is no exception to this. There are
a lot of attacks that aim to find bugs or misconfigurations in software and exploit
them to gain access to the machines that run the software, or to data. OpenStack,
with all its parts and all the software it relies on, can be a very effective attack vehicle
if not safely configured, due to its very trustful policy that allows nodes to access all
data if the node requires it. So, an attacker can quickly compromise and obtain your
data if he or she is able to compromise a single node.
Before looking at OpenStack directly, I would like to deal with a critical aspect:
security in cloud environments; that is, the ownership of machines.
In this chapter, we will to cover:
The differences between the private and the public cloud with a focus on the
security aspects
[ 27 ]
This is a necessary disclaimer because when speaking of security, private and public
clouds have completely different issues, but let's start from the beginning.
[ 28 ]
Chapter 2
From a security perspective, the public cloud is more complex to analyze. Since
cloud providers usually provide to millions of machines at any given moment, they
can invest way more than the average company for security. Thus, their cloud is
very secure. The drawback is that you have to trust the Cloud Service Provider
(CSP) completely with your data. If the CSP would like to see your data and
everything you run on their machines, they can. If they are interested in selling your
data to your competitor, there are very limited things you can do. Also, we have to
remember that public clouds can be attacked from inside, since an attacker can lease
a virtual machine directly into the cloud for a few dollars and without any questions
asked.
Since all users of a public cloud are not in the company
network of the cloud service provider, public clouds have to
be accessible from the Web, increasing the attack surface of
public clouds.
Public cloud
Private cloud
Economical
Pay as you go
Pay upfront
Bandwidth
Limited
Scalability
Virtually unlimited
Limited
Security
Limited to your
budget
Data confidentiality
Yourself
As we can see, public clouds and private clouds are very different and there isn't
a choice that is always right and one that is always wrong. It depends on the
specific software you have to deploy. If you integrate a private cloud with a public
cloud, you'll have an hybrid cloud. Usually, the public part of a hybrid cloud has
the same characteristics as that of a public cloud, as the private part has the same
characteristics of a private cloud.
[ 29 ]
Possible attackers
Let's start by identifying the possible attackers we can face. They can be divided
in different ways based on their goals; in this case, we will distinguish them as
the following:
Organized hackers: These are groups of hackers who are usually highly
capable. These groups are financially driven and able to fund in-house
to exploit development and target research. Multiple groups fall in this
category, from the Russian Business Network to the various organized
groups that undertake industrial espionage.
Denial of Service
0-day
[ 30 ]
Chapter 2
Brute force
ISP intercept
Social engineering
Hypervisor Breakout
Denial of Service
A Denial of Service (DoS) attack is an attack that aims to make some service
unavailable. In the last few years, usually we speak about DDoS, since those are
very effective and cheap and for those reasons have become the most used DoS
attack. DDoS attacks consist in multiple machines trying to overload a server or
its connection to make the services that are running on that server unavailable.
The good part about DoS attacks is that in majority of the cases, as soon as they end
it, all is back to normal. When this is not true, small actions have to be executed by
system administrators, such as restarting a service or rebooting a machine.
There is no way to completely protect a server from a
DoS attack.
Even if you cannot protect your company completely from such attacks, you can
mitigate them in two ways:
Having a lot of spare resources such as CPU, RAM, and bandwidth makes
harder to knockdown the service
There are companies that provide clean pipes that are connected with only good
traffic since have already been filtered by the ISP using IPSes and DDSes.
Usually, DDoSes are used by automated attacks/script kiddies, motivated
individuals, and highly capable groups. It could so happen that organized hackers
too use DDoS attacks, but, in this case, it's usually an Advanced Persistent DoS
(APDoS), where the attack lasts for long periods (the longest APDoS registered was
38 days), moves from server to server to be harder to detect, and involves a huge
amount of traffic (usually more than 50Pb in total).
[ 31 ]
In the history of DoS attacks, the following methods have been heavily used:
Buffer overflow attacks: In this kind of attack, the attacker looks for buffers
that are filled with input from the user without prior validation. Since buffers
have a fixed length, we can't put only a certain amount of data that can fit
in the buffer; the rest of the data will be written in other parts of RAM and
could be executed by the program.
SYN Flood attacks: As we will see more deeply in the next chapter, the
computers expect certain handshakes at the beginning of a communication.
This attack violates this convention forcing the server to open more
connections than needed. At a certain point, the server will not be able to
open a new connection, making the service unavailable.
Smurf attacks: In this kind of attack, the attacker uses badly configured
machines in the network to amplify the attack. Usually, the attacker sends a
forged package (that is, ICMP ECHO package) that seems to arrive from the
victim to a broadcast address. All the machines in the broadcast domain that
are tricked by this package, will respond to the victim. So, if in the network
there are 100 machines with poor configuration, an attacker could be able to
create an amount of traffic that is 100 times its maximum amount of traffic.
0-day
A 0-day attack is an attack that exploits a vulnerability that was not known
(or thought not to be exploitable) until that day. In these cases, there is no patch
available when the attack is used the first time.
In a 0-day case, no specific measurement can protect a company, but all general
security measurements we already talked about in the previous chapter will help
mitigate this risk.
0-day attacks can only be done by highly capable groups, organized hackers, and
intelligence agencies/services because those are the only players that have the
resources needed to do such an attack.
[ 32 ]
Chapter 2
Brute force
Since many attackers cannot afford to invest to research 0-day attacks, they use
Brute force. Brute force is very noisy and the majority of system administrators,
and IDSes will recognize and block them.
To prevent these kinds of attacks, you should have an IDS and good policies
for passwords.
These attacks are so noisy that only automated attacks/script kiddies and motivated
individuals will use them.
[ 33 ]
[ 34 ]
Chapter 2
Social engineering
As we have already seen in the previous chapter, social engineering could be a good
option for an attacker who would like to attack an organization.
All kinds of attackers can perform social engineering attacks, but the most effective
will be the ones perpetrated by the most skilled groups.
[ 35 ]
[ 36 ]
Chapter 2
[ 37 ]
[ 38 ]
Chapter 2
[ 39 ]
Future components
Since the OpenStack community is increasing its size very quickly, the OpenStack
Technical Committee has created a procedure to accept new components as part
of OpenStack.
To grant maximum safety and code-continuity, it has been decided that the new
components have to pass a given time in incubation. In this period, the component
has to show a few releases as if they were already parts of OpenStack before they
can be promoted to official components. This makes the incubation process pretty
long but you can be assured that only high quality components are allowed to be
officially part of OpenStack.
[ 40 ]
Chapter 2
Due to this long process, we already know that some components that will soon
become part of OpenStack. The following components are being considered to
be part of the next release (Kilo) and some of them will very likely be integrated.
These components are explained next.
Designate DNS
Designate is a DNS-as-a-service provider. It is able to manage multiple DNS
instances for redundancy reasons and to keep them all synchronized properly.
Multiple backends can be used such as PowerDNS, NSD4, FreeIPA, DynECT,
and BIND9.
Designate can be compared to Amazon's Amazon Route 53.
[ 41 ]
Symmetric keys that can be used to encrypt Swift containers and Cinder
block storages
Summary
In this chapter, we have seen the differences between private and public cloud with a
specific focus on security, the different kind of attackers, and attacks with a focus on
cloud computing, as well as the components of OpenStack.
In the next chapter, we will focus on networking security for OpenStack.
[ 42 ]
www.PacktPub.com
Stay Connected: