Automatic Bug Bounty
Automatic Bug Bounty
Automatic Bug Bounty
Faculty of Informatics
Master’s Thesis
Ján Masarik
Ján Masarik
i
Acknowledgement
First, I would like to express huge gratitude to my advisor prof. RNDr.
Václav Matyáš M.Sc. Ph.D. for the continuous guidance, personal
approach, open-mindedness and for his interesting lectures that were
one of the reasons I decided to study cybersecurity.
My thanks also goes to Anshuman Bhartiya, creator of the Bounty-
Machine framework, for the idea and consultations that guided me
through the initial steps of the implementation.
I would also like to thank my colleagues from Kiwi.com, especially
to Stanislav Komanec for the encouragement and to Alex Viscreanu
for his support and knowledge.
Last but not least, I would like to thank my family and girlfriend
for their support and patience.
ii
Abstract
This thesis introduces the reasoning behind the increasing popularity
of the bug bounty programs and analyzes the most common, impact-
ful bugs whose discovery can be automated at scale. As there was no
suitable existing solution for similar automation identified, the thesis
introduces a new framework, specifically designed for the bug bounty
automation use case. Particular attention of the thesis is dedicated
the usable security of the object storage console on six major cloud
providers, and a large scale quantitative research that revealed dozens
of misconfigured Azure Blob Storage buckets containing highly sen-
sitive data. A set of recommendations, based on the results of the
research, was formulated and delivered to each of the tested cloud
providers.
iii
Keywords
automation, bug bounty, Kubernetes, penetration testing, security
iv
Contents
1 Introduction 1
2 Bug bounty 3
2.1 History . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Benefits for the organization . . . . . . . . . . . . . . . . . 4
2.3 Comparison with traditional approaches . . . . . . . . . . . 4
2.4 Self-hosted bug bounty program . . . . . . . . . . . . . . . 6
2.5 Bug bounty platforms . . . . . . . . . . . . . . . . . . . . . 7
2.5.1 HackerOne . . . . . . . . . . . . . . . . . . . . . 7
2.5.2 Bugcrowd . . . . . . . . . . . . . . . . . . . . . . 9
2.5.3 Others . . . . . . . . . . . . . . . . . . . . . . . . 9
5 Proposed solution 37
v
5.1 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2 Triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2.1 Manual . . . . . . . . . . . . . . . . . . . . . . . . 39
5.2.2 Bugtab . . . . . . . . . . . . . . . . . . . . . . . . 40
5.3 Workflows . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.3.1 Subdomain enumeration . . . . . . . . . . . . . . 43
5.3.2 Bucket enumeration . . . . . . . . . . . . . . . . 44
5.3.3 Subdomain takeover . . . . . . . . . . . . . . . . 46
5.3.4 Git secrets . . . . . . . . . . . . . . . . . . . . . . 46
5.4 Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.5 Alerting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.6 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7 Conclusions 55
Appendices 69
A Archive structure 70
vi
1 Introduction
The bug bounty industry has experienced a significant growth in the
past few years. Now, more and more companies are running their
bug bounty program and accepting reports from hackers1 around
the world [1]. In Chapter 2, the bug bounty phenomenon will be
introduced and discussed from the perspective of a hacker and a
company running a program, along with a comparison with traditional
application security approaches such as penetration testing.
Widespread, high impact bugs in bug bounty, along with the op-
tions of their automated discovery are analyzed in Chapter 3. A signif-
icant part of this chapter is focused on object storage misconfiguration
bugs, that were responsible for a substantial amount of data breaches
that affected companies such as Verizon, Viacom or Accenture [2, 4, 3],
along with U.S. agencies NSA and NGA2 [5, 6] in the past two years.
The usable security of object storage console was analyzed on six
different cloud providers, and mechanisms for enumerating bucket
privileges by an unauthenticated attacker are introduced for each
provider.
Worldwide competition, along with a rapidly growing amount of
programs requires hackers to be either very creative in finding unique
bugs or to automate part of their workflow, as only the first hacker
reporting a bug gets paid. Numerous hackers, such as Eric Head, bet-
ter known as todayisnow3 , have proven that the financial gain from a
large scale bug bounty automation may be in hundreds of thousands
of dollars per year [9]. However, most of those tools are kept private,
and there are only very few attempts to release a unified, open-source
automation framework, similar to Metasploit [97] in the penetration
testing field. Further motivation, already existing solutions, and the
technological basis of the proposed framework is discussed in Chap-
ter 4. In Chapter 5, the thesis introduces an attempt to fill this gap and
1. Term “hacker” in this thesis is always used in the meaning of an ethical com-
puter hacker, also referred to as “white-hat hacker.” It is not referring to a person
supporting or doing any illegal activities.
2. National Geospatial-Intelligence Agency (NGA) is a combat support and intelli-
gence agency housed within the U.S. Department of Defense.
3. https://bugcrowd.com/todayisnew
1
1. Introduction
2
2 Bug bounty
From a high-level perspective, a bug bounty program is a simple
process – the company publishes a page with assets to get tested, con-
ditions that hackers need to follow and the rewards for the discovery
of valid bugs.
Once a hacker finds a bug, he reports it to the company with a
proof of concept exploit and the possible impact. The company or
a dedicated triage team then validates the report, forwards it to the
relevant team for remediation and rewards the researcher accordingly.
The form of a reward may vary. It may be monetary, in the form of
recognition (public hall of fame) or in the form of branded clothing
(referred to as a “SWAG”).
In the past few years, this concept has proven to be beneficial for
both companies and hackers. Companies receive continuous feedback
on the security of their products, and hackers can earn money legally
by doing what they enjoy, with a company of their choice.
2.1 History
The first known bug bounty program was initiated by Hunter & Ready
in 1983 for their Versatile Real-Time Executive operating system. As a
reward, Volkswagen Beetle (also known as “bug”) or an equivalent
cash reward was offered.
The first modern-day bug bounty program was launched by Netscape
in 1995, offering monetary rewards for the Netscape Navigator 2.0
Beta. Years after, in 2004, Mozilla Foundation started offering boun-
ties for bugs found in their core software. Technological giants like
Google and Facebook followed in 2010 and 2011, respectively. In April
2016, the first Federal bug bounty program, Hack the Pentagon was
launched as a program of a first major, government-backed agency
and the number of programs has substantially increased over the past
few years [1].
Significant growth of programs has opened a vast amount of op-
portunities for hackers around the world. A good example is Santiago
Lopez, who at the age of 19 has earned more than $1,000,000 on the bug
bounty platform HackerOne. By March 2019, he had over 1,683 valid
3
2. Bug bounty
1. Blind XSS occurs when the attacker input is saved and then executed in a different
application. This fact makes it extremely dangerous, as the payload may get triggered
in an internal application with privileged accesses.
4
2. Bug bounty
High coverage
Pentest
Bug bounty
Low frequency High frequency
DAST
Low coverage
Figure 2.1: Coverage and the frequency continuance of the different security testing
approaches [130].
2. Black box in this context means that the application does not have access to the
source code.
5
2. Bug bounty
6
2. Bug bounty
2.5.1 HackerOne
HackerOne, currently the largest bug bounty platform was founded
in 2012 by Dutch hackers Jobert Abma and Michiel Prins, Head of
7
2. Bug bounty
8
2. Bug bounty
2.5.2 Bugcrowd
The business offering of Bugcrowd is roughly the same as HackerOne
except an option for self-managed programs [84]. From the community
perspective, Bugcrowd also introduced an educational series aimed
at beginners called Bugcrowd University. However, it has much less
coverage than Hacker101 at the time of writing, and it does not offer
any option of receiving private invites [83].
The ranking system for hackers is based on “kudos points,” that
are assigned based on the severity of submitted reports. Private invites
are then determined based on the number of points and additional
metrics, such as average severity. Monetary rewards are excluded in
the ranking, which highlights the main difference compared to the
HackerOne ranking system [85].
2.5.3 Others
As previously mentioned, there are many more platforms emerging
in this industry with a similar offering. Examples include:
∙ Hacktrophy – smaller Slovak platform, offering public bug bounty
programs, aimed at the local business. This platform currently
hosts bug bounty program of companies such as ESET, Mall or
Moneta bank [88].
∙ Intigriti – a platform that hosts a majority of programs launched
for open-source software such as Drupal or KeyPass, which
received sponsorship from the European Union [89].
9
3 Common bugs in bug bounty
Bug bounty hunters follow a similar methodology as usual pene-
tration testers, such as OWASP testing guide [104]. One of the most
prevalent vulnerabilities in the world – Cross Site Scripting (XSS) [12,
13, 14], is also the most popular vulnerability among hackers on the
HackerOne [1, 48].
This class of injection bugs has, however, already received sub-
stantial coverage by various researches before [41, 42] and it is also
very rarely present as a root cause for breaches. On the other hand,
two other vulnerability types covered in OWASP Top 10 20171 – Using
Components with Known Vulnerabilities and Security Misconfiguration
were together responsible as a root cause for 44% out of 50 analyzed
breaches in the recent study of Snyk [91].
The focus of this chapter is mostly on similarly impactful, but easily
automatable vulnerability types like security misconfiguration. These
vulnerability types shortly follow XSS in its prevalence, but the dis-
coverability is usually significantly easier to automate [1]. A growing
amount of programs with a broad scope, along with an always-online
nature of a bug bounty programs, make these automatable vulnera-
bility types a perfect candidate for further research.
1. The OWASP Top 10 is a report outlining ten most impactful web application
security issues. This report is updated roughly every three years, with 2017 being
the most recent one at the time of writing.
10
3. Common bugs in bug bounty
11
3. Common bugs in bug bounty
12
3. Common bugs in bug bounty
Figure 3.1: Screenshot from the AWS S3 console during the bucket creation.
13
3. Common bugs in bug bounty
CNAME
else
s3-directional.*
Response
[200] [403]
HTTP
status code
[200] else
HTTP
status code
HTTP PUT
WRITE
Write ACL
else [200]
HTTP
status code
HTTP GET
WRITE_ACP
Read ACL
[200]
HTTP
status code READ_ACP
14
3. Common bugs in bug bounty
Figure 3.3: Screenshot from the DigitalOcean Spaces console during the bucket
creation.
2. https://bugcrowd.com/digitalocean
15
3. Common bugs in bug bounty
Figure 3.4: Screenshot from the Azure Blob Storage console during the bucket
creation.
∙ The uploaded objects are strictly following the bucket ACL [111].
16
3. Common bugs in bug bounty
CNAME blob.<microsoft-id>.
store.core.windows.net. else
Response
[ResourceNotFound] [BlobNotFound]
Code
HTTP GET
Bucket Private or
/<bucket-name>?
Non-Existent
restype=container&comp=list
[ResourceNotFound] else
Code
17
3. Common bugs in bug bounty
Figure 3.6: Screenshot from the Google Cloud Storage console after the creation of a
public bucket.
3. https://www.googleapis.com/storage/v1/b/<bucket-name>/iam/
testPermissions
18
3. Common bugs in bug bounty
HTTP GET
/iam/testPermissions
Bucket
READ LIST WRITE WRITE_ACP
Non-Existent
Figure 3.8: Screenshot from the Alibaba Object Storage Service console during the
bucket creation.
19
3. Common bugs in bug bounty
[AccessDenied] [NoSuchBucket]
Code
[200] [403]
HTTP
READ + WRITE status code READ
Figure 3.10: Screenshot from the Oracle Cloud Object Storage console while updating
the visibility.
20
3. Common bugs in bug bounty
[NoSuchKey] [NoSuchBucket]
Code
[NoSuchBucket] else
Code
21
3. Common bugs in bug bounty
4. .DS_Store is Apple OS X specific file used to store attributes of folders with paths
as described in the report https://hackerone.com/reports/142549
22
3. Common bugs in bug bounty
23
3. Common bugs in bug bounty
24
3. Common bugs in bug bounty
25
3. Common bugs in bug bounty
7. AWS Identity and Access Management (IAM) is a web service that helps securely
control access to AWS resources. It may be used to assign granular permissions to
each instance or service, but it is commonly left with an unnecessarily permissive
policy by AWS administrators.
26
3. Common bugs in bug bounty
27
4 Bug bounty automation
Bug bounty automation is currently a subject undergoing intense
study in the bug bounty community. In this chapter, the motivation
for working on such automation, along with the requirements for a
potential bug bounty automation framework will be discussed. Some
existing solutions that emerged during the past two years will be
discussed, but as none of the presented solutions fulfills the set of
requirements, the technological basis of the proposed solution will be
introduced.
4.1 Motivation
Bug bounty, being a very young and competitive scene, lacks a com-
mon platform for automation of tedious tasks. Various open-source
command line tools are released frequently, but there is currently no
common framework that would allow combining them easily. Even if
such a framework is created, it is either kept private or shared only in
small groups with the indisputable motivation of receiving a bounty.
A robust, scalable and easily extensible solution is missing, and many
talented bug hunters around the globe are forced to reimplement it
over and over again. This goes against a known open-source principle
that “no problem should ever have to be solved twice,” also mentioned
in the How To Become A Hacker article by Eric Steven Raymond [99].
Existing penetration testing frameworks like Metasploit [97] may
be useful, but they were initially made for a different use-case. These
tools are only semi-automatic, and they mostly lack continuous moni-
toring functionality. In the end, they were done a different use case,
as a penetration testing is usually done in depth on a narrow scope
during a restricted timeframe.
Conversely, DAST, that is a fully automatic solution capable of
continuous monitoring, was not built to provide a base ground for
further manual testing and only focuses on finding vulnerabilities
based on specific fingerprints. Another disadvantage of DAST is that
it usually causes a considerable amount of traffic that may potentially
overwhelm the servers of the target.
28
4. Bug bounty automation
∙ Provide a base for manual testing – results from the tool should
be able to serve as a good resource for further manual analysis
or testing.
29
4. Bug bounty automation
30
4. Bug bounty automation
4.3.1 Docker
4.3.2 Kubernetes
31
4. Bug bounty automation
4.3.3 Argoproj
Argoproj is a collection of open-source tools for getting work done
with Kubernetes. While being a very young project where the first
32
4. Bug bounty automation
Argo Workflows
Argo Workflows is an open-source container-native workflow engine
for orchestrating parallel jobs on Kubernetes. Argo Workflows are
implemented as a Kubernetes Custom Resource Definition (CRD).
It offers to define workflows where each step in the workflow is a
separate Docker container with clearly defined responsibilities.
These steps can be then chained into multi-step workflows, where
each level consists of one or more steps (containers). An alternative
approach can capture the dependencies between tasks using a di-
rected acyclic graph (DAG), similar to Apache Airflow. The multi-step
workflow declaration is more straightforward to define and allows an
option of dynamic workflows, where DAG based declaration offers
much more granularity needed for the optimization of more complex
workflows, such as buckets enumeration [71]. For the screenshot of
bucket workflow, please see Figure 5.4 on page 46.
33
4. Bug bounty automation
Argo Events
Argo Events is an event-based dependency manager for Kubernetes
that allows defining multiple dependencies from a variety of event
34
4. Bug bounty automation
∙ Sensor that defines a set of event dependencies and after its ful-
fillment triggers Kubernetes resources, such as Argo Workflow.
4.3.4 GitLab
GitLab is a web application that provides a Git-repository manager
with wiki, issue-tracker and a native CI/CD pipelines for free [75]. In
Bugshop, GitLab with its CI/CD is utilized not only as a repository
of the source code but also as a crontab scheduler and storage of
workflow results.
Commit history allows for easy tracking of changes (see Figure 4.2)
and various integrations such as built-in alerting on changes can be
further utilized. Using Git repository as a database in bug bounty was
inspired by a blog post about the bug bounty monitoring [76] by the
author of security.txt IETF draft [77] – Edwin Foudil. GitLab may get
replaced by a full-fledged database in the future, but it is sufficient for
the current requirements of Bugshop.
35
5 Proposed solution
As none of the existing solutions matched all specified requirements,
a new automation framework was implemented with emphasis on
easy extendibility and high scalability. The aim of this solution was to
abstract the underlying technology and provide a reliable, modular
framework for any bug bounty hunter with an intermediate technical
background. The proposed solution can be deployed only with an
elementary knowledge of Kubernetes and extended easily by adding
or editing existing workflows via definitions written in YAML serial-
ization language. The framework is currently split into two standalone
components:
∙ Bugshop – the core of the tool that includes workflow definitions,
configuration files, and Kubernetes manifests used to deploy
Argo and Argo Events in the desired state.
5.1 Architecture
Firstly, the terminology used in further sections needs to be defined.
Trigger is used to describe an initiator of the task. It has a form of an
HTTP request. Notification is a trigger initiated by some action, such
1. https://github.com/janmasarik
36
5. Proposed solution
37
5. Proposed solution
GitLab CI
Docker GitLab
Argo Events
HTTP Gateway
Slack
Email
Argo Slack
Kubernetes API Workflows Kubernetes Notification
Argo CLI Cluster 4. Alert
5.2 Triggers
As shown in Figure 5.1, there are currently two trigger listeners imple-
mented in BugShop; Argo Events gateway and Kubernetes API. Argo
Events HTTP gateway is utilized by Bugtab, Slack webhook or as a
listener for notifications from the onExit handler of workflows. New
triggers can be added easily, as the gateway is essentially just a web
server listening for POST requests with the specified JSON payload.
Listener for Kuberentes API is used only via the Argo command line
interface (Argo CLI), as it requires authentication to the Kubernetes
cluster.
5.2.1 Manual
The simplest way how to trigger a workflow is by the Argo CLI. This
command line interface from Argoproj offers commands for workflow
initialization, termination, status check or logs. Argo CLI is essentially
just a wrapper around the Kubernetes command line tool called kubectl,
that allows you to run commands against Kubernetes clusters [52].
The additional value of Argo CLI is in features like syntax validation
of workflow manifests, more readable output, and more intuitive
interface. For example, the following command would be used to
trigger a new workflow for subdomain enumeration:
argo submit subdomains-workflow.yml -p domain=example.com
38
5. Proposed solution
5.2.2 Bugtab
Continuous monitoring is a fundamental feature of Bugshop that was
originally planned to be implemented via the Argo Events calendar
gateway. However, implementing it this way would require too many
lines of duplicate code for each new target, which was a significant
drawback considering the need for an easy extendibility of the scope.
Furthermore, other use-cases requiring custom code emerged, such
as automatically starting a full monitoring string on both, new public
programs and new invites to private programs on HackerOne.
Because of this, a python utility called Bugtab was implemented,
where GitLab CI schedules are then being used to execute it periodi-
cally and keep track of time. The architecture of Bugtab, represented
as Gitlab CI in Figure 5.1 will be further described in this subsection
and can be seen in detail in Figure 5.2.
Thanks to Bugtab, it was possible to achieve an easy extendibility
of scope, as starting a continuous monitoring process on a new target
requires only a few added lines into the scope, as illustrated in the
Listing 5.1 below, and it also saves time by automatic monitoring of
new bug bounty programs. Bugtab is designed in a modular way
to allow others to potentially make use of it without having to use
Bugshop or Gitlab CI.
Schedule
Bugtab currently consists of two configuration files config.yaml and
scope.yaml. These two files are being parsed and linked together by
Bugtab that initiates a series of HTTP requests containing the name
of workflow along with required parameters to the HTTP gateway
of Argo Events. To keep resulting configuration short, it groups the
sets of modules into so-called “schedules” that contain details on how
39
5. Proposed solution
config.yml
single task
bounty-targets-data Schedule Argo
Workflows
chained task
Kubernetes
Cluster
HackerOne HackerOne
GraphQL API private invites
detection GitLab CI
often should each module run. Schedules are then assigned to each
target, as seen on Listing 5.1. Currently, there are only two schedules
implemented – aggressive and light, however, adding a new schedule
takes just a few lines of configuration, as seen on Listing 5.2.
40
5. Proposed solution
41
5. Proposed solution
5.3 Workflows
The need for some workflow engine emerged while trying to do more
complex, chained tasks, such as general bucket enumeration. There
are numerous open-source, offensive bug bounty tools available and
they are being grouped to various directories such as the one on Bug
Bounty Forum2 . However, new tools are often being created instead of
chaining already existing tools together. A good example is mass33 that
was created for enumeration of S3 buckets on the DNS level. There
is, however, already an existing tool for brute forcing DNS called
MassDNS4 .Instead of implementing a new tool, it is easy to chain
MassDNS to brute-force DNS lookups, sed to filter only valid buckets
names, and then optionally run BucketsPerm to audit the permissions
of the buckets found.
2. https://bugbountyforum.com/tools
3. https://github.com/smiegles/mass3
4. https://github.com/blechschmidt/massdns
42
5. Proposed solution
Root domain
AltDNS MassDNS
Enriched
Sudomains resolvable
subdomains
43
5. Proposed solution
5. No large scale research that could confirm this assumption was done in the past
two years.
6. With list of only 100 subdomains and 1000 permutation words, this list takes at
minimum 1 million entries (100 subdomains * 1000 permutation words * 10 posi-
tions/delimiters).
44
5. Proposed solution
Figure 5.4: Screenshot of the buckets workflow from the Argo UI.
45
5. Proposed solution
5.4 Storage
Most of the workflows are running periodically based on the schedule.
This brought a need to store the results in some persistent storage.
As the changes usually contain the most interesting information, a
requirement for easily viewable changes along with an easy way of
alerting on change was set. GitLab was then chosen as it fulfills both
requirements out of the box, as described in Section 4.3.4.
Two different GitLab repositories are used with similar directory
structure where the second-level domain represents the directory
containing results from workflows, as shown in Figure 5.5. This offers
an easy way how to have alerts only for specified, low false positive
issues, with the rest of the data nicely viewable on one place. As all
results are saved in a simple file structure, it is accessible for further
manual ad hoc analysis using familiar tools such as grep or sed.
5.5 Alerting
As described in the previous Section 4.3.4, alerting is implemented
using built-in GitLab integrations for email or Slack [118]. Both of these
integrations can send a notification on every push to the repository,
but email has an advantage of showing the diff directly in the content
of the message even for private repositories. The operator then sets
7. https://github.com/streaak/keyhacks
46
5. Proposed solution
target-data target-alerts
example.com example.com
subdomains.txt takeoverable.csv
resolvable.csv vulnerable_buckets.csv
buckets.csv low_hanging.csv
acme.com acme.com
.
. .
.
. .
(a) target-data (b) target-alerts
47
5. Proposed solution
5.6 Evaluation
Bugshop is a very young framework which is, however, already able to
serve the purpose for which it was built. During the implementation,
it has found three misconfigured buckets in scope, for which I was
rewarded a few hundreds of dollars in private HackerOne programs.
There is certainly some work left on the Bugshop, but it is already
possible to partially evaluate fulfillment of requirements set in the
Section 4.1:
9. https://github.com/janmasarik
48
6 Misconfigured Azure Blob Storage
Object storage service misconfiguration was analyzed on six major
cloud providers in Section 3.1, where the usable security of the con-
sole was evaluated and the workflows for enumeration of the bucket
privileges introduced. To demonstrate the severity of this vulnerability
class, and to partially demonstrate potential of the workflows imple-
mentable in Argo, a large scale research on the misconfigured Azure
Blob Storage buckets was concluded. Azure Blob Storage was chosen
because it is possible to enumerate valid account names based on DNS
records (see Section 3.1.3) and misconfiguration allowing to effectively
dump a bucket is possible via a dropdown in the console. Moreover,
there was no large scale public research concluded on Azure Blob
Storage up to this date (May 2019). Two large datasets were utilized
to find valid Azure Storage account names, that were then further
brute-forced to find the valid bucket names along with its permissions.
6.1 Dataset
The initial dataset was a combination of data from the CNAME FDNS
dataset and domains from Alexa top 1 million. Due to the slightly
different nature of the datasets, the initial steps were slightly different,
as described further in this section.
1. https://opendata.rapid7.com/about/
49
6. Misconfigured Azure Blob Storage
6.3 Results
The results of the research showed a great amount of misconfigured
Azure Blob Storage buckets in the wild, where a noticeable amount
50
6. Misconfigured Azure Blob Storage
(a) Group 1 (b) Group 2
51
6. Misconfigured Azure Blob Storage
6.4 Recommendations
After the analysis of six different providers and the quantitative re-
search done on Azure Blob Storage, some patterns that may help to
increase usable security of the object storage console were observed.
As we have seen in Section 3.1, each provider is taking a slightly dif-
ferent approach on how to prevent misconfiguration of the buckets
permissions, but there is a set of recommendations applicable to most
of them:
52
6. Misconfigured Azure Blob Storage
This list of recommendations was sent to all tested providers, and now
awaits their response. Especially the blacklist approach brings a novel
idea on how to reduce the amount of misconfigured buckets in the
wild. Even though the providers have much better access to similar
data, I have included the composed blacklist of low false positive
keywords based on the research in the notice.
53
7 Conclusions
The thesis analyzed widespread, high severity vulnerabilities com-
monly discovered in bug bounty programs and introduced a novel
attack methods targeting one of the most prominent vulnerability over
the last few years – object storage misconfiguration on six different cloud
providers.
To demonstrate the severity of this issue, a large scale research on
misconfigured Azure Blob Storage was concluded. This was the first
large scale research focusing on the Azure Blob Storage in the wild,
and the results of it confirmed the assumption about the severity of
this issue. A substantial amount (5,546) of the buckets with full public
access was found, and after a tedious manual analysis, 40 buckets con-
taining highly sensitive data were identified. All affected companies
were notified by an email explaining the risks and a recommended
mitigation. Furthermore, the list of recommendations created in Sec-
tion 6.4 was communicated to the six tested cloud providers and now
awaits their response regarding a possible implementation.
This research showed that while the discoverability of misconfig-
ured buckets is a fully automated process, the identification of the
owner can be a very tedious and manual task, as there is no easy way
on how to reach the bucket owner. Due to the time-consuming nature
of this process, the motivation for similar large scale researches may
be arguably more tempting for malicious actors. No vulnerable bucket
belonging to a company with a public bug bounty program was iden-
tified, but due to the small sample size and the fact that around 70%
of the bug bounty programs is private, no reliable conclusion on this
correlation can be drawn.
The second added value of the thesis was the introduction of a
new open-source framework for the automation of bug bounty. This
framework was built in a modular way that allows easy extensibility,
which is necessary for the quickly advancing bug bounty industry.
While the added value has not been proven by numerous users yet,
it is actively being used in my bug bounty flow, and it is currently
adjusted internally for the defensive purposes of the technology com-
pany Kiwi.com.
54
7. Conclusions
Both the framework and the research about object storage miscon-
figuration has several open-ended problems and a need for further
quantitative research. This thesis may hopefully serve as a trigger for
further research in this high impact area that shows that whenever
there is human-factor involved in a simple, yet impactful security de-
cisions, there is an urgent need to keep usable security in mind. Even
though clear warnings could arguably prevent the majority of the
misconfigurations, it will not protect against negligent or potentially
malicious actors that brings the need for additional counter-measures,
such as the proposed automatic notification for the remaining admin-
istrators.
55
Bibliography
[1] The Hacker-Powered Security Report 2018 [Online]. Avail-
able: https://www.hackerone.com/sites/default/files/
2018-07/The%20Hacker-Powered%20Security%20Report%
202018.pdf
[2] Millions of Verizon customer records exposed in security lapse
[Online]. Available: https://www.zdnet.com/article/
millions-verizon-customer-records-israeli-data/
[3] Accenture left a huge trove of highly sensitive data on exposed
servers [Online]. Available: https://www.zdnet.com/article/
accenture-left-a-huge-trove-of-client-passwords-on-exposed-servers/
[4] Viacom Leak May Have Exposed Hundreds of Digital
Properties [Online]. Available: https://gizmodo.com/
viacom-leak-may-have-exposed-hundreds-of-digital-proper-1818504796
[5] NSA leak exposes Red Disk, the Army’s failed intelligence sys-
tem [Online]. Available: https://www.zdnet.com/article/
nsa-leak-inscom-exposes-red-disk-intelligence-system/
[6] Security company finds unsecured bucket of US military images
on AWS [Online]. Available: https://www.theregister.co.
uk/2017/06/01/us_national_geospatial_intelligence_
agency_leak/
[7] Michael Meli, Matthew R. McNiece, Bradley Reaves How Bad
Can It Git? Characterizing Secret Leakage in Public GitHub Reposi-
tories North Carolina State University, 2019.
[8] Ravi Sen and Sharad Borle Estimating the Contextual Risk of
Data Breach: An Empirical Approach, Journal of Management In-
formation Systems, page 314-341, Routledge 2015. Available:
https://doi.org/10.1080/07421222.2015.1063315
[9] @try_to_hack makes history as first bug bounty
hacker to earn over $1 Million [Online]. Avail-
able: https://www.hackerone.com/blog/
trytohack-Makes-History-First-Bug-Bounty-Hacker-Earn-over-1-Million
56
BIBLIOGRAPHY
[15] Leaking sensitive information on Github lead full access to all Grab
Slack channels [Online]. Available: https://hackerone.com/
reports/397527
57
BIBLIOGRAPHY
[27] Protecting Against Attacks that Hold Your Data for Ran-
som [Online]. Available: https://www.elastic.co/blog/
protecting-against-attacks-that-hold-your-data-for-ransom
58
BIBLIOGRAPHY
[39] Github OWASP/Top10 What are the stats on SSRF and others? [On-
line]. Available: https://github.com/OWASP/Top10/issues/28
59
BIBLIOGRAPHY
[53] Motherboard Why Did Slack Win Out Over IRC, Anyway?
[Online]. Available: https://motherboard.vice.com/en_us/
article/xw5wvj/why-did-slack-win-out-over-irc-anyway
60
BIBLIOGRAPHY
61
BIBLIOGRAPHY
62
BIBLIOGRAPHY
hackerone-connects-hackers-with-companies-and-hopes-for-a-win-win.
html?_r=0
63
BIBLIOGRAPHY
64
BIBLIOGRAPHY
[109] PCI Data Security Standard (PCI DSS) Penetration Testing Guid-
ance [Online]. Available: https://www.pcisecuritystandards.
org/documents/Penetration_Testing_Guidance_March_2015.
pdf
65
BIBLIOGRAPHY
[126] D. Liu, S. Hao, and H. Wang, All Your DNS Records Point to Us:
Understanding the Security Threats of Dangling DNS Records, in
Proceedings of the 2016 ACM SIGSAC Conference on Computer and
Communications Security, ACM, 2016, pp. 1414–1425.
66
BIBLIOGRAPHY
[130] AppSecUSA, Zane Lackey – Practical tips for web application se-
curity in the age of agile and DevOps, 2016 [Online]. Available:
https://www.youtube.com/watch?v=Hmu21p9ybWs
[135] AWS rolls out new security feature to prevent accidental S3 data
leaks [Online]. Available: https://www.zdnet.com/article/
aws-rolls-out-new-security-feature-to-prevent-accidental-s3-data-leaks/
67
Appendices
68
69
A. Archive structure
A Archive structure
bugtab:
bugtab.py
config.yaml
scope.yaml
bugshop
README.md
config
amass.ini
config.json
gitleaks.toml
resolvers.txt
gateways
webhook-event-source.yml
webhook-http.yml
manifests
argo-events-cluster-roles.yaml
argo-events-sa.yaml
gateway-controller-configmap.yaml
gateway-controller-deployment.yaml
gateway-crd.yaml
iap-backend-config.yaml
ingress.yaml
install.yml
sensor-controller-configmap.yaml
sensor-controller-deployment.yaml
sensor-crd.yaml
sensors
webhook-http.yml
wordlists
bucket-directories.txt
fingerprints.json
raft-large-directories-lowercase.txt
resolvers.txt
words.txt
workflows
azure-brute-perf.yml
buckets.yml
gitsecrets.yml
subdomains.yml
subtakeover.yml
Figure A.1: Structure of the attached archive containing repositories of Bugshop
and Bugtab
70
B Vulnerability disclosure email
Figure B.1: Notification email sent to the owners of the misconfigured Azure Blob
Storage buckets holding sensitive data.
71
C DigitalOcean Spaces enumeration workflow
HTTP HEAD to
<bucket-name>.<region>.digitaloceanspaces.com
[200] [404]
HTTP Bucket Non-Existent or
status code Wrong Region
[403]
[200] [403]
HTTP
status code
HTTP PUT
WRITE
Write ACL
else [200]
HTTP
status code
HTTP GET
WRITE_ACP
Read ACL
[200]
HTTP
status code READ_ACP
72