Sample Security Assessment Report
Sample Security Assessment Report
Sample Security Assessment Report
JOB17034
By Taran Dhillon
Hivint conducted a security assessment of the CleverCloud PCI DSS environment. The purpose of
the security test was to assess the robustness of the PCI DSS environment against the disclosure of
sensitive information to external attackers.
Key Weaknesses
CleverCloud Weakness Profile
• Possible for unauthenticated users to
Application Insufficient
determine the password policy and Authentication
Misconfiguration
username naming convention
• Exposed source code files that could
assist attackers in enumerating
application functionality Weak
• Weak permissions set for machine Password
Policies
configuration compliance reports Directory
Indexing
• Absence of multi-factor authentication
which may allow attackers to gain
access if credentials are intercepted
CleverCloud Risk Profile
Key Recommendation
• Ensure username/password policies and
valid usernames are not disclosed
• Remove or restrict access to sensitive
Risk Level
files
• Modify permissions to only permit
authenticated users to view sensitive
data
• Enable multi-factor authentication on 0 2 4 6 8 10
all accounts
Extreme High Medium Low Very Low
Very Low EXT-7 Application Misconfiguration: Web Server with Default Page Enabled
Vulnerable page:
• https://hcp.securecapture.cloud/
Likelihood Rare: An attacker would still have to bypass the web application’s lock-out
mechanism so exploitation via brute-force would be rare.
Risk Medium
Remediation Open Web Application Security Project (OWASP) recommends a password length
of ten (10) characters or greater. This greatly decreases the success rate of
password guessing brute force attacks being performed against the application.
Reference(s) https://www.owasp.org/index.php/Authentication_Cheat_Sheet#Password_Lengt
h
Affected URLs:
• https://api.securecapture.cloud/.git/config
• https://api.securecapture.cloud/.git/description
• https://api.securecapture.cloud/.git/HEAD
• https://api.securecapture.cloud/.git/index
• https://api.securecapture.cloud/.git/packed-refs
• https://api.securecapture.cloud/.git/logs/HEAD
• https://api.securecapture.cloud/.git/objects/7a/eb556772497a98fb0b1f
3567019d8df1b84023
• https://api.securecapture.cloud/.git/objects/c2/25e21ec333d6aad43242
4196a0fd753dae090d
• https://hcp.securecapture.cloud/.git/config
• https://hcp.securecapture.cloud/.git/description
• https://hcp.securecapture.cloud/.git/HEAD
• https://hcp.securecapture.cloud/.git/index
• https://hcp.securecapture.cloud/.git/packed-refs
• https://hcp.securecapture.cloud/.git/logs/HEAD
• https://hcp.securecapture.cloud/.git/objects/2b/0c2dc6ac8fefad2c2002
baab276813b438467c
• https://hcp.securecapture.cloud/.git/objects/01/a7561fc6e4ec65d7b9df
068b0db9b4f67b1b1a
• https://hcp.securecapture.cloud/.git/objects/67/883539f1057bd5323ef4
63fb9d564fe66567df
• https://hcp.securecapture.cloud/.git/objects/37/6df3204db6d927c5e59
b397122262ef44e60ac
• https://hcp.securecapture.cloud/.git/objects/ba/3b71f569a9a2857e321f
47f74d9b5f814e7b51
• https://hcp.securecapture.cloud/.git/objects/e1/c63694a5e914ec3d2afd
525bca97934c78d26e
• https://hcp.securecapture.cloud/.git/refs/heads/master
• https://hcp.securecapture.cloud/.git/objects/a6/cdc2b6cb574c3fd231f6
b7aa2d51f428a2b5fa
• https://tokenserver.securecapture.cloud/.gitignore
Consequence Moderate: The contents disclosed in default application files could assist
attackers in crafting targeted attacks against web-applications and users. But due
to time constraints a thorough analysis was not possible.
Likelihood Possible: Attackers often use automated scripts and tools to discover default
application files so enumeration of these URLs is trivial.
Risk Medium
Remediation Disable access to the files or remove the files if they are not required.
Description During testing, Hivint discovered directory indexing to be enabled on the HCP
and API web-servers. Directory indexing may provide an attacker with
information that could be used to launch attacks against web-applications,
application users or other systems operated by CleverCloud. Although the files
identified included only image files and icons, it is strongly recommended to
disable directory listing for all applications.
Vulnerable paths:
• https://hcp.securecapture.cloud/icons/
• https://api.securecapture.cloud/icons/
Consequence Minor: Disclosure of these icons and image files may assist attackers in crafting
attacks against the API and HCP web-servers as the files indicate the web-server
is running an instance of Apache web-software, however, vulnerabilities in the
software would need to be found prior to an attacker being to exploit these
systems.
Risk Low
Reference(s) http://httpd.apache.org/docs/trunk/mod/mod_dir.html#directoryindex
2. Observe the lack of framing policies in the application response, e.g. 'X-Frame-
Options' (screenshot below):
The screenshot below demonstrates the application framed within a third party
untrusted domain:
• https://hcp.securecapture.cloud
Consequence Minor: A lack of framing policies enables 'click-jacking' attacks where an attacker
may cause a user to unwittingly perform actions within the application, on behalf
of the attacker. This is often caused by the vulnerable application being loaded in
an invisible ‘iframe’ and may result in unauthorised access to the application and
other sensitive information.
Likelihood Unlikely: An attacker would need to trick a user with valid credentials to login
from a third-party domain where the site has been framed.
Risk Low
Reference(s) https://www.owasp.org/index.php?title=Clickjacking_Defense_Cheat_Sheet
https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
Consequence Minor: The disclosure of usernames does not lead to a direct compromise of the
application but may assist attackers in performing targeted attacks against
application users such as password guessing attacks and social engineering
attacks. Successful password guesses and phishing attacks may allow an attacker
to gain unauthorised access to the application and CleverCloud systems.
Likelihood Possible: Tools and browser-plugins are publicly available to aid in enumerating
valid accounts in a short amount of time, therefore it is possible for this type of
attack to occur.
Risk Low
Reference(s) N/A
Affected page(s):
• https://api.securecapture.cloud/icons/README
• https://hcp.securecapture.cloud/icons/README
Remediation Disable the default web server pages. Additionally, uninstall all default sample
pages.
Reference(s) N/A
Description During testing, it was found that the permissions for two Amazon S3 instances
permitted read/write access to unauthenticated users and read access to
everyone. It is recommended to review these instances to ensure these
permissions have been configured correctly and adjust where necessary.
• clevercloud-scap-report
• clevercloud-doc
Likelihood Possible: Since the information is publicly accessible it is possible for an attacker to
access these reports.
Risk Medium
Remediation Modify the permissions to only permit access to users that require this data.
Review permissions for all S3 instances and ensure no sensitive information is
disclosed.
Reference(s) https://d0.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf
Description During testing, Hivint identified that multi-factor authentication is not enabled in
the AWS configuration / identity access and management settings. Multi-factor
authentication increases the security of the user authentication process by
confirming multiple forms of information and not relying on only usernames and
passwords for authentication. An example of a multi-factor mechanism is a
hardware device with a code that changes at a pre-defined interval.
Proof of 1. Login to AWS and navigate to the “Identity Access & Management” (link -
Concept https://711199061232.signin.aws.amazon.com/console)
2. Observe the activate MFA warning message as shown in the following
screenshot:
Consequence Moderate: If an attacker were to phish or intercept valid AWS user credentials
they may be able to login and modify machine configuration, and/or access
sensitive company and user data.
Risk Medium
Remediation Activate and enforce multi-factor authentication on the “Identity and Access
Management” settings page.
Reference(s) https://d0.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf
Description CleverCloud’s Amazon Web Services (AWS) Identity and Access Management
(IAM) user account password policies are defined by the organisation and should
specify complexity requirements and mandatory rotation periods.
The assessed infrastructure does not have a defined policy for IAM user
passwords.
Proof of 1. Login to AWS and navigate to the “Identity Access & Management” (link -
Concept https://711199061232.signin.aws.amazon.com/console)
2. Observe the activate “Apply an IAM password policy” warning message as
shown in the following screenshot:
Consequence Minor: This vulnerability will not lead to a direct compromise of the assessed
system. However, successful password guessing brute-force attacks will result in
unauthorised access to the CleverCloud’s AWS resources.
Risk Low
Remediation AWS account password policies should be reviewed to ensure the AWS
recommended password policy values listed below are applied.
Reference(s) https://d0.awsstatic.com/whitepapers/Security/AWS_Security_Best_Practices.pdf
http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_a
ccount-policy.html
Description During testing, Hivint identified multiple unencrypted AWS volumes appear to be
in-use. An absence of full-disk-encryption may allow attackers to retrieve data if
the un-encrypted volumes were accessed. It is therefore recommended to enable
encryption for all volumes and review internal encryption requirements for all
storage devices.
Proof of 1. Login to the AWS Console Auditor Access page and navigate to the storage
Concept configuration settings.
2. Observe the un-encrypted volumes as shown in the following screenshot:
Likelihood Rare: An attacker would first have to gain access to CleverCloud’s AWS services to
access the un-encrypted volumes by intercepting credentials or using social
engineering attacks.
Risk Low
Remediation Enforce encryption on all volumes and review internal encryption requirements
and policies.
Ensure sensitive data is never stored on un-encrypted storage devices.
Reference(s) N/A
Description During Hivint’s review of the AWS S3 configuration it was found that logging was
disabled on all S3 storage buckets. It is recommended to enable logging in order to
track requests for access to AWS S3 buckets.
Proof of 1. Login to the AWS console and navigate to the S3 configuration settings
Concept
2. Select ‘properties’ and observe ‘disable logging’ is selected as shown in the
following screenshot:
Affected hosts(s):
• config-bucket-711199061232
• clevercloudvideo
• clevercloud-vm-migration
• clevercloud-scap-report
• clevercloud-doc
• clevercloud-cloudtrail
Consequence Minor: Although an absence of logging will not lead to a compromise of any
machines, a lack of logging and regular log-reviews may allow changes to S3
instances to go un-noticed.
Likelihood N/A
Risk Low
Description During the AWS assessment component of the security assessment, Hivint
discovered that Termination Protection is disabled on EC2 instances. Termination
protection is used to protect EC2 instances against accidental termination which
could lead to data-loss.
Proof of 1. Login to the AWS console and navigate to the EC2 instances page
Concept
2. Right-click an EC2 instance and select “Change Termination Protection” to view
the termination settings as shown below:
Likelihood Rare: An attacker would first need to gain access to CleverCloud’s AWS services to
terminate EC2 instances by intercepting credentials or using social engineering
attacks.
Risk Low
Reference(s) https://aws.amazon.com/premiumsupport/knowledge-center/accidental-
termination/
The scan performed by CleverCloud included machines in the range of IP addresses 10.100.x.x
(screenshot below):
Examination of the results of the scan demonstrated no High, Medium or Low security issues but 200
log-level issues were reported (as per OpenVAS screenshot below):
The log-level issues were reviewed and contained only the presence of open ports such as SSH (port
22) HTTP/HTTPS services (ports 80/443/8443) and RPC (port 111) but due to time constraints, a
thorough review and rescan was not performed.
The test process was repeated several times and wireshark captures and intercepting proxy tests
were performed to simulate the steps an attacker would take to exploit the system or gain access to
sensitive data.
During testing, no non-compliant PCI DSS data was disclosed and all credit card fields were masked
appropriately. The only security issues identified during testing included: SSL cookie without secure
flag set and Cookie without HttpOnly flag set as described on the following pages.
Description Cookies are used by the CleverCloud Hosted Capture application to uniquely
identify an authorised user’s application session. The Hosted Capture application
does not set the ‘HttpOnly’ attribute on the ‘PHPSESSID’ cookie when sending the
cookie within a HTTP response. This enables the cookie to be requested by
untrusted scripts and could be leveraged by an attacker in a Cross-Site Scripting
(XSS) attack. An attacker could use this cookie to hijack an application user’s
session and gain unauthorised access to the Hosted Capture application and API.
Proof of 1. Authenticate to the Hosted Capture application using a web browser with a web
Concept interception proxy.
2. Observe the lack of the ‘HttpOnly’ attribute in the ‘PHPSESSID’ cookie in the
application response.
Vulnerable path:
https://hcp.securecapture.cloud/api.php/hosted_payment/process
Sample cookie:
Domain: hcp.securecapture.cloud
Cookie Name: PHPSESSID
Value: 8hv9uvpnv4mnlsb2n3oeh3c2o7
Path: /
httpOnly: False
Consequence Moderate: The retrieval of the sensitive ‘PHPSESSID’ cookie from an authenticated
user’s session would result in an attacker being able to hijack the valid user’s
session and gain unauthorised access to the Hosted Capture application.
Likelihood Rare: Exploitation of this security issue is a two-step process that would require an
additional vulnerability to present, such as a Cross-Site Scripting vulnerability and
for a malicious attacker to successfully trick an authenticated CleverCloud Hosted
Capture application user into viewing a malicious link.
Risk Low
Remediation Configure the application to send the ‘HttpOnly’ attribute for all sensitive
application cookies.
Reference(s) https://www.owasp.org/index.php/HttpOnly
Description Cookies are used by the CleverCloud Hosted Capture application to uniquely
identify an authorised user’s application session. The CleverCloud Hosted Capture
application does not set the ‘Secure’ flag on the ‘PHPSESSID’ cookie when sending
the cookie within a HTTP response. This may result in the cookie being disclosed
during transmission to an attacker in a Man-in-the-Middle (MitM) attack scenario
or from an attacker leveraging a Cross Site Scripting (XSS) vulnerability. An
attacker could use this cookie to hijack an application user’s session and gain
unauthorised access to the CleverCloud Hosted Capture application.
Consequence Moderate: The retrieval of the sensitive ‘PHPSESSID’ cookie from an authenticated
user would result in an attacker being able to hijack the valid user’s session and
gain unauthorised access to the CleverCloud Hosted Capture application.
Likelihood Rare: Exploitation of this security issue is a two-step process that requires an
attacker to be strategically located within the communication path of an
authenticated client and the CleverCloud Hosted Capture application web server.
Alternatively, the attacker is required to successfully coerce an application user
into requesting an unencrypted connection.
Remediation Configure the application to send the ‘Secure’ flag for all sensitive application
cookies.
Reference(s) https://www.owasp.org/index.php/SecureFlag
Testing of the Tokenizer API involved the use of Wireshark to ensure all communications were sent
securely. Due to time constraints, thorough testing could not be performed but results concluded no
credit card data was sent insecurely.
1. Start a running capture in Wireshark and issue an API call with customer credit card details (as
shown below):
3. Search the Wireshark capture for credit card details to confirm no credit card info has been
transmitted insecurely.
Review of the source code involved the use of the RIPS PHP code review tool and a brief manual
review.
RIPS was configured to scan for all available vulnerabilities that included the OWASP Top 10
(screenshot below):
Results of testing returned a single, potential Cross-Site Scripting Vulnerability (screenshot below):
CleverCloud was advised of this potential vulnerability but an exploit could not be found on the
tokenizer server - https://tokenserver.securecapture.cloud
AW13 Insufficient Session Expiration 2013-A2 – Broken Authentication and Session Management
1
The Open Web Application Security project (OWASP):
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
Hivint has developed an application testing methodology that can be adapted to a range of security
testing targets and with consideration of a range of industry leading benchmarks and approaches:
We conduct our testing using a structured approach. Our testing process involves initial application
and system familiarisation – that is, getting a thorough understanding of how the system works, how
the security elements are intended to operate, and the key business logic underpinning any core
transactional functionality – followed by in-depth and comprehensive assessment of the web
application itself.
Infrastructure penetration testing involves attempts to compromise a target system using the same
techniques commonly used by malicious attackers, focused on infrastructure components such as
servers, operating systems, network and security devices.
Our infrastructure security assessment process uses localised scanning system, and runs a series of
scans to identify key infrastructure security issues as detailed in the test cases below. Based on the
data identified from these scans, additional testing is conducted to provide concrete demonstration
of vulnerability and removal of false positives. This usually follows the following process:
• Network Discovery: The purpose of this step is to discover and map out the local
infrastructure of the target network. At the end of the network discovery, the penetration
tester should have a basic layout of the local network infrastructure.
• Target Identification: This step aims to identify a host of interest. This is usually a specific IP
range, or a single host/server with many available open ports and corresponding services. At
the completion of the target identification step, the penetration tester would have identify a
specific target that is most likely to allow penetration of the target network. This may
• Vulnerability Assessment: This step includes detailed assessment and analysis of the security
posture of the identified target. This includes assessing and analysing the services and
software packages running on the identified network, and vulnerabilities that are commonly
found on them.
• Vulnerability Exploitation: The step requires that the penetration tester perform manual
verifications of the vulnerabilities that are commonly found on the available services on the
target system. This usually includes attempts to bypass security controls, and the lack of, to
perform unauthorised and most often unauthenticated transactions with the vulnerable
services identified in the previous step.
Time Boxing
Many applications would require an unfeasibly large amount of testing to provide coverage of all
functions within the application with respect to all user types and the permutations of such users and
access. This is particularly the case for systems with a high number of user types and/or privilege levels
(as testing every permutation of one account’s ability to interact with every other account can create
hundreds, or thousands, of such permutations).
As a result, most tests are effectively “time boxed”, which means that a set amount of time is allocated
for testing based on the assessed risk presented by the application and the budget available, and
within that time, test tasks are prioritised based on the areas of highest risk – both the most likely
vulnerabilities to exist; and those that would cause the greatest harm.
In the test conducted against the CleverCloud’s PCI DSS environment, the following test types or
system areas were not able to be comprehensively tested in the available time:
Hivint considers the following as contributing factors to the likelihood of an event occurring.
• The skills required to successfully exploit the vulnerable system using the vulnerability
identified
• The level of access on the vulnerable system required to exploit the security issue
E.g. Privileged administrative user or anonymous user