Should this be public though?
Published on sites.google.com
Every day we hear about the various type of vulnerabilities that affects a company. Companies are usually fast to fix these and protect the integrity of their customer data.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This write-up is about accidental information disclosure by employees on public websites, rather than a flaw in a company's own application. The researcher spent bug bounty time targeting companies that accept reports of this kind when the leak carries substantial security risk to the company or its customer data. The asset named in the report is sites.google.com, and the weakness is information disclosure. The work was disclosed on 13 July 2018 and the bounty recorded is 500.00 USD.
The report is in two halves. The first describes where employees leak material and what was found. The second describes LeakFinder, a script that automates discovery using Google Custom Search Engine, the Google Custom Search JSON API and the Trello API. Many details in the report are redacted to protect the privacy of companies, users and employees.
Setup
The research needs no target-side account. The preconditions are:
- Knowledge of a company's internal domain names. The report stresses that knowing the internal domain is what makes the searches productive.
- A Google account able to create a Custom Search Engine and obtain a Google API key.
- A Trello account, from which a Trello API key and an auth token are generated.
- Python 3 to run the LeakFinder script.
Finding it
The starting observation is that employees, not outside attackers, are the source of the leak. Password dumps were deliberately excluded because the interest was in what an employee publishes. The researcher gathered intelligence on which sites are frequently used by employees depending on department and project. The common sites listed are:
- Presentation sites such as Prezi and Emaze.
- Forums and question sites such as stackoverflow.com and productforums.google.com.
- Task management and bookmark apps: Trello (credited to Kushagra) and papaly.com for personal bookmarks.
After choosing bug bounty targets, each site was scanned against those targets to gauge how many disclosures existed.
The initial technique was simple Google dorks. The key input was the company's internal domain, placed in the intext parameter. For example, when looking in Trello:
site:trello.com intext:domainx.com
Here site: restricts results to the public site and intext: requires the internal domain string to appear in the page body, which surfaces pages where an employee has pasted an internal link or reference.
Google dorks produced most of the results, but the report is explicit that each hit had to be analysed to identify the impact accurately. The categories of disclosure found were:
- Valid employee credentials.
- Internal presentations containing information about the internal support process for specific cases.
- Employee expense sheets for visits and company trips.
- Links to internal Google docs and sheets. These could not be accessed, but their titles gave out project information.
- Internal-purpose dashboard apps such as Datadog.
- User details (emails, numbers, names, stats and similar) tracked in internal sites.
A sample Papaly board is shown where user credentials could leak.
The report is careful about interpretation: finding user data or an employee credential does not mean the company follows poor security practice. Unlike hardcoded credentials in company-owned code, employee disclosures on public sites are hard to watch. As departments grow and more employees are hired, responsibility does not sit only with the company; employees need to be aware of what they publish, because it can tell an attacker how an internal application works.
The issue was not confined to one company. At the time of writing the researcher had found multiple companies affected. Some accepted it as a risk; some, such as Uber, took it seriously and fixed disclosures within 24 to 48 hours. The report notes this is not like CSRF, XSS or RCE that a code patch can fix. It requires active monitoring and alerts for any mention of internal sites in public domains or publication of internal documents. If a company has an internal domain that is not public knowledge, monitoring it is essential, because there will likely be a case where an employee leaks information without realising.
Exploitation
Manual dorking is tedious, so the process was automated into LeakFinder. The report warns that the script only gives valid results when monitoring private domains: monitoring something like google.com produces many false positives, whereas a domain such as corp.google.com gives valid disclosures.
Step 1: Create the Google Custom Search Engine
Go to https://cse.google.com/cse/create/new. In Sites to Search put:
trello.com/*, papaly.com/*, codepen.io/*, productforums.google.com/*, prezi.com/*
This restricts the engine to the public sites where employee material tends to appear. Give the CSE a title to complete setup.
Step 2: Retrieve the cx parameter
Go to https://cse.google.com/cse/all, select the CSE, and on the setup page select Public Url and click the link. Copy the value of the cx parameter and save it. The cx identifies which search engine the API queries.
Step 3: Obtain a Google API key
Go to https://developers.google.com/custom-search/json-api/v1/overview and click Get a Key. Create or select a project; an API key is generated and displayed. Copy and save it. This key lets the script retrieve results from the CSE in JSON format.
Step 4: Obtain the Trello API key
Go to https://trello.com/app-key. The page displays the API key for the logged-in Trello account. Copy and save it. The script uses it to resolve board names from retrieved card and board links.
Step 5: Obtain the Trello auth token
On the same page, the site explains how to generate a token. Because the token is being produced for the researcher's own account, click the token hyperlink. An authorisation page loads; approve it and it returns the auth key. Save it.
Step 6: Install LeakFinder
Clone the repository:
git clone https://github.com/rojan-rijal/LeakFinder.git
Then set up the code with the install script:
chmod +x install.sh
sudo ./install.sh
Provide the necessary API keys when prompted.
Step 7: Run the script
The invocation takes the domain to monitor:
python3 main.py domain.com
For example, to run against uberinternal.com:
python3 main.py uberinternal.com
The report says the Trello API allows finding board names based on retrieved card and board links.
The report also mentions that companies can create a simple monitor directly through https://www.google.com/alerts, but the researcher does not guarantee its efficiency or success because it is not used frequently.
An important caveat is stated plainly: not every result will contain sensitive information. Every result must be analysed to see what is being disclosed.
Root cause
The root cause is human and organisational rather than a defect in a specific application. Employees paste internal domains, internal document links, credentials, expense sheets and internal dashboards into public sites such as Trello, Papaly, Prezi, Emaze, CodePen and product forums. A search restricted to the site plus the internal domain string surfaces it. The report frames the remedy as continuous monitoring and alerting rather than a patch.
Impact
An attacker who finds these pages learns internal domain names, project titles, internal support processes, dashboard URLs and, in the worst case, valid employee credentials and user details such as emails, numbers, names and stats. That information can help an attacker understand how an internal application works and plan further access. The report does not claim access to the internal Google docs and sheets it found, only that their titles disclosed project information. The exposure applies to any company whose employees use these public sites, and the researcher found multiple companies affected, with responses ranging from accepting the risk to fixing within 24 to 48 hours.
Fix
The report does not describe a code change by any vendor. It recommends active monitoring and alerts to track and record any mention of internal sites in public domains or publication of internal documents, and provides LeakFinder as one way to do it. It also notes Google Alerts as a simpler option without guaranteeing its efficiency. Shopify took down a disclosure within 2 hours of the report, and Uber fixed disclosures quickly, including one reported over a weekend and taken down within 48 hours.
Variants to test
- Swap the site list. Run the same
intext:dork against other collaboration and publishing platforms, for examplesite:codepen.io intext:domainx.com. A positive result is a public page containing the internal domain, an internal link or a credential. - Vary the internal identifier. Search for short internal hostnames, project code names and email domain suffixes rather than only the root internal domain. A positive result is a page that references an internal system by a name that is not public knowledge.
- Check document titles. Search for links to internal docs and sheets even when they are not accessible. A positive result is a public page whose title or snippet reveals project information.
- Check bookmark and task boards. Look for Papaly and Trello boards belonging to employees. A positive result is a board or card containing credentials or internal links.
- Monitor continuously. Point the CSE and script at the internal domain and schedule runs. A positive result is a new hit appearing after the baseline, which indicates a fresh disclosure.
- Use Google Alerts as a low-effort check on the internal domain. A positive result is an alert for a public page mentioning it, though the report does not vouch for the reliability of this route.
What happened, in plain words
This is a story about employees accidentally leaving company secrets on public websites, not about a bug in a company's own software. The researcher spent bug bounty time looking for companies that accept reports of this kind when the leak is serious enough to threaten the company or its customers. The asset named in the report is sites.google.com, and the weakness is information disclosure. The work was disclosed on 13 July 2018 and the bounty recorded is 500.00 USD.
The report has two halves. The first explains where employees leak material and what was found. The second describes LeakFinder, a script that automates the search using Google Custom Search Engine, the Google Custom Search JSON API and the Trello API. Many details are redacted to protect the privacy of companies, users and employees.
Setup
You do not need an account on the target company's systems. The things you need are:
- Knowledge of a company's internal domain names. The report stresses that knowing the internal domain is what makes the searches productive.
- A Google account that can create a Custom Search Engine and obtain a Google API key.
- A Trello account, from which a Trello API key and an auth token are generated.
- Python 3 to run the LeakFinder script.
Finding it
The starting observation is that employees, not outside attackers, are the source of the leak. Password dumps were deliberately excluded because the interest was in what an employee publishes. The researcher gathered intelligence on which sites are frequently used by employees depending on department and project. The common sites listed are:
- Presentation sites such as Prezi and Emaze.
- Forums and question sites such as stackoverflow.com and productforums.google.com.
- Task management and bookmark apps: Trello (credited to Kushagra) and papaly.com for personal bookmarks.
After choosing bug bounty targets, each site was scanned against those targets to gauge how many disclosures existed.
The initial technique was simple Google dorks. A Google dork is just a search query with special operators that narrow results. The key input was the company's internal domain, placed in the intext parameter. For example, when looking in Trello:
site:trello.com intext:domainx.com
Here site: restricts results to the public site and intext: requires the internal domain string to appear in the page body, which surfaces pages where an employee has pasted an internal link or reference.
Google dorks produced most of the results, but the report is explicit that each hit had to be analysed to identify the impact accurately. The categories of disclosure found were:
- Valid employee credentials.
- Internal presentations containing information about the internal support process for specific cases.
- Employee expense sheets for visits and company trips.
- Links to internal Google docs and sheets. These could not be accessed, but their titles gave out project information.
- Internal-purpose dashboard apps such as Datadog.
- User details (emails, numbers, names, stats and similar) tracked in internal sites.
A sample Papaly board is shown where user credentials could leak.
The report is careful about interpretation: finding user data or an employee credential does not mean the company follows poor security practice. Unlike hardcoded credentials in company-owned code, employee disclosures on public sites are hard to watch. As departments grow and more employees are hired, responsibility does not sit only with the company; employees need to be aware of what they publish, because it can tell an attacker how an internal application works.
The issue was not confined to one company. At the time of writing the researcher had found multiple companies affected. Some accepted it as a risk; some, such as Uber, took it seriously and fixed disclosures within 24 to 48 hours. The report notes this is not like CSRF, XSS or RCE that a code patch can fix. It requires active monitoring and alerts for any mention of internal sites in public domains or publication of internal documents. If a company has an internal domain that is not public knowledge, monitoring it is essential, because there will likely be a case where an employee leaks information without realising.
Exploitation
Manual dorking is tedious, so the process was automated into LeakFinder. The report warns that the script only gives valid results when monitoring private domains: monitoring something like google.com produces many false positives, whereas a domain such as corp.google.com gives valid disclosures.
Step 1: Create the Google Custom Search Engine
A Custom Search Engine (CSE) is a Google search box you configure to search only the sites you choose. Go to https://cse.google.com/cse/create/new. In Sites to Search put:
trello.com/*, papaly.com/*, codepen.io/*, productforums.google.com/*, prezi.com/*
This restricts the engine to the public sites where employee material tends to appear. Give the CSE a title to complete setup.
Step 2: Retrieve the cx parameter
Go to https://cse.google.com/cse/all, select the CSE, and on the setup page select Public Url and click the link. Copy the value of the cx parameter and save it. The cx identifies which search engine the API queries.
Step 3: Obtain a Google API key
An API (Application Programming Interface) is a way for one program to talk to another over the internet, like a waiter taking your order to the kitchen. An API key is a secret string that identifies you to that service, like a membership card. Go to https://developers.google.com/custom-search/json-api/v1/overview and click Get a Key. Create or select a project; an API key is generated and displayed. Copy and save it. This key lets the script retrieve results from the CSE in JSON format (a structured text format that programs can read easily).
Step 4: Obtain the Trello API key
Go to https://trello.com/app-key. The page displays the API key for the logged-in Trello account. Copy and save it. The script uses it to resolve board names from retrieved card and board links.
Step 5: Obtain the Trello auth token
On the same page, the site explains how to generate a token. A token is like a temporary pass that proves you have authorised an app to act on your behalf. Because the token is being produced for the researcher's own account, click the token hyperlink. An authorisation page loads; approve it and it returns the auth key. Save it.
Step 6: Install LeakFinder
Clone the repository. Cloning means downloading a copy of the code from GitHub, a website where people share code.
git clone https://github.com/rojan-rijal/LeakFinder.git
Then set up the code with the install script:
chmod +x install.sh
This command makes the file install.sh executable, meaning the computer is allowed to run it as a program.
sudo ./install.sh
This runs the install script with administrator rights (sudo), which is often needed to install software. Provide the necessary API keys when prompted.
Step 7: Run the script
The invocation takes the domain to monitor:
python3 main.py domain.com
This tells Python 3 to run the script main.py and pass it the domain you want to search for. For example, to run against uberinternal.com:
python3 main.py uberinternal.com
The report says the Trello API allows finding board names based on retrieved card and board links.
The report also mentions that companies can create a simple monitor directly through https://www.google.com/alerts, but the researcher does not guarantee its efficiency or success because it is not used frequently.
An important caveat is stated plainly: not every result will contain sensitive information. Every result must be analysed to see what is being disclosed.
Root cause
The root cause is human and organisational rather than a defect in a specific application. Employees paste internal domains, internal document links, credentials, expense sheets and internal dashboards into public sites such as Trello, Papaly, Prezi, Emaze, CodePen and product forums. A search restricted to the site plus the internal domain string surfaces it. The report frames the remedy as continuous monitoring and alerting rather than a patch.
Impact
An attacker who finds these pages learns internal domain names, project titles, internal support processes, dashboard URLs and, in the worst case, valid employee credentials and user details such as emails, numbers, names and stats. That information can help an attacker understand how an internal application works and plan further access. The report does not claim access to the internal Google docs and sheets it found, only that their titles disclosed project information. The exposure applies to any company whose employees use these public sites, and the researcher found multiple companies affected, with responses ranging from accepting the risk to fixing within 24 to 48 hours.
Fix
The report does not describe a code change by any vendor. It recommends active monitoring and alerts to track and record any mention of internal sites in public domains or publication of internal documents, and provides LeakFinder as one way to do it. It also notes Google Alerts as a simpler option without guaranteeing its efficiency. Shopify took down a disclosure within 2 hours of the report, and Uber fixed disclosures quickly, including one reported over a weekend and taken down within 48 hours.
Variants to test
- Swap the site list. Run the same
intext:dork against other collaboration and publishing platforms, for examplesite:codepen.io intext:domainx.com. A positive result is a public page containing the internal domain, an internal link or a credential. - Vary the internal identifier. Search for short internal hostnames, project code names and email domain suffixes rather than only the root internal domain. A positive result is a page that references an internal system by a name that is not public knowledge.
- Check document titles. Search for links to internal docs and sheets even when they are not accessible. A positive result is a public page whose title or snippet reveals project information.
- Check bookmark and task boards. Look for Papaly and Trello boards belonging to employees. A positive result is a board or card containing credentials or internal links.
- Monitor continuously. Point the CSE and script at the internal domain and schedule runs. A positive result is a new hit appearing after the baseline, which indicates a fresh disclosure.
- Use Google Alerts as a low-effort check on the internal domain. A positive result is an alert for a public page mentioning it, though the report does not vouch for the reliability of this route.
Glossary
- API: A way for one program to talk to another over the internet, like a waiter taking your order to the kitchen.
- API key: A secret string that identifies you to a service, like a membership card.
- Auth token: A temporary pass that proves you have authorised an app to act on your behalf.
- Bug bounty: A programme where companies pay people for finding and reporting security problems.
- Clone: Downloading a copy of code from a repository such as GitHub.
- CSRF: Cross-Site Request Forgery, an attack that tricks a logged-in user's browser into sending a request the user did not intend.
- CSE: Custom Search Engine, a Google search box configured to search only chosen sites.
- cx parameter: The identifier for a specific Custom Search Engine.
- Datadog: A dashboard application for monitoring systems.
- Dork: A search query using special operators to narrow results.
- Google Alerts: A service that emails you when new results appear for a search term.
- intext:: A search operator that requires the term to appear in the page body.
- JSON: A structured text format that programs can read easily.
- LeakFinder: The script described in the report that automates searching for disclosures.
- RCE: Remote Code Execution, an attack that lets an attacker run commands on a server.
- Redacted: Removed or hidden to protect privacy.
- site:: A search operator that restricts results to a particular website.
- sudo: A command that runs a program with administrator rights.
- Token: See auth token.
- XSS: Cross-Site Scripting, an attack that injects malicious script into a web page viewed by others.