Building Security Into Cloud Applications
Building Security Into Cloud Applications
INNOVATION
Securing Applications
IN THE CLOUD
Table of Contents
OVERVIEW 3
Securing Applications
IN THE CLOUD
Overview
I
t’s clear when you read the latest statistics on cloud computing that what
started out as a trend has become a transformative influence on today’s
business. The cloud offers the promise of improved scalability, availability,
cost-savings, and other benefits – all which help organizations focus more
on business excellence and less on operational efficiency.
Cloud providers take care of Although CSPs offer security measures for protecting
security and regulatory compliance. customer data, the owners of the data (you) are
ultimately responsible for breaches and compliance.
Application attack surfaces need to be reduced as
much as possible.
Cloud computing services are Just because the infrastructure on which your
always available. application resides has high availability, that doesn’t
mean your application is scalable. Redundancy and
resilience must be built into the cloud application
itself to ensure availability.
Cloud computing data is Data in the cloud must be backed up just as it would
always available. with any other deployment model. You also have
the same encryption challenges with respect to the
data you own and how your application processes it.
Backup and encryption are as critical in the cloud
as with any other deployment model.
A
pplication threats vary for each platform, and the cloud is no
different. Cloud applications ultimately are vulnerable to the full
range of application threats as defined by the Open Web Application
Security Project (OWASP) and Common Weakness Enumeration (CWE).
Application programming interfaces (APIs) from Insider threats are dangerous because these
cloud service providers may not be secure. attackers often know how the system is configured
When these code modules are included in your and its weaknesses. An external attacker has
application, significant vulnerabilities may be to breach external perimeter controls, such as
introduced including easily exploited API keys firewalls, to gain access to systems and data while
employed by web and cloud services to identify an internal attacker typically already has access to
third-party applications using the services. these systems and data.
Anonymous access, reusable tokens/passwords,
clear-text authentication, open transmission To secure against malicious insiders, you should:
of content, and rigid access controls that can’t • Ensure that the CSP conducts detailed human
be customized easily also can expose your resource assessments of all participants and
applications to risks. audit contracts
• Confirm that if a breach does occur, the CSP
To protect against API attacks, consider has a notification process to allow the other
implementing managed APIs that provide several participants to audit and respond appropriately
protections, such as those that help control access • Have a strong service level agreement (SLA) in
to resources, optimize delivery of API workloads, place that specifies what can/cannot be accessed
and provide insights around API usage and quality by CSP personnel
of service. Additional considerations include: • Use TLS to ensure that supplier and third-party
• Audit managed API log files on a regular basis connections and data exchange are encrypted
• Enforce strict access control mechanisms (based • Implement mutual authentication for supplier
on least-privilege and need-to-know) and third-party connections to application data
• Segregate duties and responsibilities • Ensure that audit policies are in place and
• Implement lockouts for repeated incorrect followed strictly for auditing system logs
password entry
In the cloud’s multi-tenant environment, you Most large organizations go to great lengths to
share network, server, and other system ensure the security of data in their enterprises. By
components with other customers. Hackers moving data to public cloud storage, organizations
constantly seek ways to penetrate and exploit forfeit a great deal of control over data loss
systems within the unique cloud framework, prevention. Remember, legally you are responsible
so vulnerabilities in another tenant’s application for protecting the sensitive data you collect,
or services potentially may affect your process, and store, so it’s important that your CSP’s
applications and data. data handling practices meet your organization’s
and regulatory data protection requirements.
Mitigation of these cloud-specific risks requires a This includes understanding where and how the
“defense-in-depth” approach to security. Multiple provider encrypts your data, and which personnel
steps include: have access to your data.
• Set the default configurations for your system
services (e.g., webservers, databases) and Consider the following best practices to ensure
applications to their most secure levels data security:
• Consider host-based firewalls and • Create policies that identify any sensitive data
virus protection that should not be stored in the cloud
• Opt for dedicated server environments • Ensure that your CSP uses strong data
if possible encryption for data at rest and data in transit
• Monitor the environment for attempts to gain • Encrypt data at rest using your own encryption
unauthorized access – including regular reviews keys, if possible
and secure management of log files • Ensure that your CSP has deployed appropriate
• Use strong authentication and practice the perimeter and internal defenses and that they
principle of least privilege – meaning that your are configured properly
users, applications, etc. are given access only to • Perform penetration testing on any application
those systems and/or information that or infrastructure that your company will be using
is necessary for them to perform their jobs • Implement data loss prevention and monitoring
or purpose tools backed by an SLA, and audit the monitoring
• Enforce SLAs for patching and vulnerability system logs regularly
remediation
• Use vulnerability scanners to detect intrusions
• Implement Security Information and Event
Management (SIEM) tools for monitoring
security events
Session and account hijacking often are the Even if you and your organization are well-aware
result of phishing attacks, malware, and fraud. of the features and functionality offered by your
These come in many forms and combinations: CSP, it’s important to consider other risk-related
• Phishing attacks might try to induce users into questions, such as:
providing credentials, using cross-site request • What are the details of the CSP’s internal security
forgery (CSRF) attacks or by installing malware policies and procedures, OS hardening, patching,
• Malware, once installed, may try to harvest auditing, and logging?
stored credentials or abuse active sessions • Who audits compliance with the CSP’s security
• Cross-site scripting (XSS) and CSRF policies and procedures – and are you able to
vulnerabilities in web applications may be used obtain this report?
by attackers to exploit users • How are data and related logs stored, and who
has access to them?
In a common scenario, attackers steal the • What information will the vendor disclose in the
session ID of a user, allowing the attackers to event of a security incident?
impersonate the identity of the victim. While this
attack may have occurred outside the cloud, once These questions often are overlooked or not clearly
attackers gain access to a compromised account, answered, leaving customers with an unknown risk
they have all the privileges of the real account profile that may include serious threats. To mitigate
holder. In a cloud environment that relies on overall risk, be sure to enable OS/server-level
shared resources via trusted users, an attacker firewalls for handling sensitive data and insist on
can cause significant damage through privilege annual third-party security assessments.
escalation, XSS, and CSRF.
T
he Cloud Security Alliance’s Top Ten Big Data Security and
Privacy Challenges paper attempts to bring renewed focus on
fortifying Big Data infrastructures by highlighting the most critical
challenges that Big Data presents. These challenges are charted in
Diagram 1 and organized into four aspects of the Big Data ecosystem.1
1
[Source: Cloud Security Alliance]
6 1
SECURE DISTRIBUTED
of these challenges are of
particular importance to
application development teams:
SECURING NON-RELATIONAL
PROGRAMMING COMPUTATIONS DATA STORES
The speed and efficiency delivered by cloud As the name suggests, NoSQL databases are
applications are made possible by distributed not constrained by the traditional row-column-
programming frameworks, which support table relationship of SQL Relational Database
the separation and parallel processing of an Management Systems (RDBMSs). The largest
application’s procedural, logical, functional, and NoSQL database is Google’s Bigtable document
physical components. These frameworks make store. The dataset of a NoSQL database is
the processing and storage of large amounts of distributed over a multitude of storage devices and
data possible. is limited only by the amount of storage available.
One of the most popular frameworks used for Unfortunately, NoSQL databases are as vulnerable
creating cloud applications is Hadoop, an open- to code injection as SQL RDBMSs. Usually with
source project based on Google technology NoSQL, a JavaScript Object Notation (JSON) object
and maintained by Apache. A key component of gets passed to the server, which then needs to
Hadoop is MapReduce Framework. There are two be parsed. It is this parsing that can result in code
steps in the MapReduce Framework where the injection. Parameters also can be passed in a
data being computed is vulnerable to exploit – the request, received by a server, and then inserted
map step and the reduce step. Data is vulnerable into a NoSQL database, similar to a SQL attack.
because access is controlled at the client level, not
the file system level.
3 4
Your application’s input validation and filtering Contemporary PKI solutions for transport-
capabilities must be designed to avoid the risks layer protection are the optimal safeguard; for
associated with weak or non-existent input example, digital certificates that are distributed
validation. To accomplish this task, make via TLS. Attribute-Based Encryption (ABE) and
sure your team: homomorphic encryption technologies will help
• Properly validates and filters all input, rejects secure Big Data offerings in the future. None of
incorrect values, and ensures input validation these technologies, however, is mature enough
routines are coded correctly for production deployment. Developers, therefore,
• Conducts thorough static code analysis using must rely on proven, legacy cryptographic
popular Static Analysis Security Test (SAST) tools, algorithms. For now, PKI X.509 certificates can be
followed by manual code reviews to ensure that populated with metadata to specify their usage.
no input validation vulnerabilities were missed by
the tools
• Remediates all input validation vulnerabilities
before deployment
• Defines data type classifications (e.g., input
can be only integers; or, define a “white list”
of accepted input)
• Uses white listing where possible
• Reviews filtering algorithms since these can
introduce vulnerabilities
• Uses data validation frameworks available
with a specific programing language
M
ajor cloud infrastructure providers such as Amazon and Microsoft
use a combination of intrusion detection systems (IDS), firewalls,
intrusion prevention systems (IPS), and application-level controls
to provide layers of defense.
CORE SECURITY
Maintenance
Architecture and Design Design Guidelines Design Guidelines for Security Threat Modeling
Architecture and Design Review Architecture and Design Review for Security
Planning
2
[Source: Microsoft Patterns & Practices]
The loss of control of the data when moving applications to the cloud
typically is the biggest threat. To mitigate this, organizations have to
think about data flow and how the design of the cloud infrastructure
can work for, or against, data protection. Software applications must be
designed with new threats in mind:
Typically, applications are not any more or less secure in the cloud, so
migrating them “as-is,” especially older applications, often makes sense
to avoid the effort of a large re-architecting exercise. Newer applications
potentially can be modified to take advantage of authentication,
“secrets” (e.g., encryption keys), storage and management, autonomous
monitoring, as well as other cloud services.
To achieve full security utility from today’s CSPs, most applications will
need to be re-architected and/or rewritten. This task most likely will be
reserved for mission-critical applications. One of the biggest benefits
of an application rewrite is the availability of many built-in sub-services
such as logging and monitoring, which actually are quite easy to leverage
for enhanced security and scalability.
Security gaps can occur in any application, on any platform. The cloud is
no exception, and as you make the shift to Software as a Service (SaaS)
and cloud applications, the awareness of security “holes” and their many
types is your key to defending against them.
A CSP’s service typically comes with SLAs and A lack of good systems management and
other specifications that define uptime, service, monitoring can mean that your application gets
and even security. The problem, though, is that deployed on the wrong virtual image, in the wrong
sometimes, a CSP’s infrastructure does not carry place, or without the right configuration. A lack of
through with these specifications with respect to security priority, process, and information at the
security, and even may change after you contract management level can lead to groups not having
with them. Even with a service agreement, a “no security goals, or have poor coordination and
SaaS holes” rule if you will, a CSP’s liability often is execution on those goals.
limited to what you paid for the service. The cost
of a breach, though, can be far more.
RESOURCES
1
Cloud Security Alliance. Top Ten Big Data Security and Privacy Challenges.
2
Microsoft Patterns & Practices.
Since 2002, Security Innovation has been the trusted partner for cybersecurity risk
analysis and mitigation for the world’s leading companies, including Microsoft,
Sony, GM, Disney, Google, and Dell. Recognized as a Leader in the Gartner Magic
Quadrant for Security Awareness Computer-Based Training for the third year in a
row, Security Innovation is dedicated to securing and protecting sensitive data in the
most challenging environments – automobiles, desktops, web applications, mobile
devices, and in the cloud. Security Innovation is privately held and headquartered in
Wilmington, MA USA. For more information, visit us at www.securityinnovation.com.