Skip to content
RCE Write-up Intermediate

Hacking Imgur for Fun and Profit

nathonsecurity Follow

Published on medium.freecodecamp.org

Bounty$5,500 View original

I’ve been meaning to write about this for a while. It all started back in July 2015 when I decided to look for vulnerabilities in Imgur, an incredibly popular image sharing platform.

Nathan (@NathOnSecurity), on medium.freecodecamp.org

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

Context

Imgur is an image sharing platform. The researcher, Nathan (@NathOnSecurity), was a frequent visitor and already familiar with how the site worked, which is why he chose it as a target in July 2015. The work described here spans several months and covers two distinct areas: a set of common web vulnerabilities found on the production site, and a much more serious chain that started from a development domain, imgur-dev.com, which Imgur used for internal development.

Hacking Imgur for Fun and Profit
Hacking Imgur for Fun and Profit From the original on medium.freecodecamp.org

The report opens with a joke about memes being safe, which sets the tone for what follows.

Image
Image From the original on medium.freecodecamp.org

Setup

The researcher used no special accounts or roles on Imgur itself. His tools and preconditions were:

  • Familiarity with the production site from regular use.
  • Google, for searching indexed pages on imgur-dev.com.
  • A cached copy of an indexed page, viewed while the development server was down.
  • SubBrute, run against alan.imgur-dev.com to enumerate sub-subdomains.
  • A public proof-of-concept script for CVE-2014-3120.
  • A HackerOne account, once Imgur launched its bug bounty program.

Finding it

The first round of production issues

After a quick survey of Imgur, the researcher identified common vulnerabilities: XSS, clickjacking, and a large number of CSRF issues. Reporting them was difficult because the only visible contact route was Imgur's support system, which was not suitable for security issues. On 1 August 2015 he wrote up a report and emailed [redacted]. A couple of hours later Imgur's founder and CEO, Alan Schaaf, replied thanking him and offering swag as a reward. Over the following days the researcher forwarded more reports, including one that would later earn him over $5,000.

In late September 2015 Imgur was hacked: someone uploaded an HTML file with malicious JavaScript to Imgur and used it to target 8chan users. This was quickly fixed, but it was widely reported. A week later Imgur launched its bug bounty program, giving researchers a proper reporting channel. The researcher contacted Alan again to ask whether his earlier reports were eligible. He was put in touch with an Imgur developer, who confirmed eligibility and asked him to file a report on HackerOne. For all the vulnerabilities he had reported, 20+ in total, the reward was $50, on the grounds that "for the most part, we're offering swag for CSRF reports, so you're more of the exception here".

Before the bug bounty program existed, Imgur was riddled with CSRF vulnerabilities. Some, since fixed, included:

  1. The ability to update the user's bio.
  2. The ability to generate a new client secret for a given Imgur app.
  3. The ability to change the redirect URL for a given Imgur app.

These were among the issues he had initially reported, so a $50 reward was disheartening. The developer explained that the program was new and still being improved. The researcher gave him a list of the issues he had reported, and the developer confirmed there was much more in the reports than he had realised.

The HTML source snippet

During the initial research the researcher looked through Imgur's HTML source code and found this snippet:

JavaScript
$(function() { if(!/^([^:]+:)\/\/([^.]+\.)*imgur(-dev)?\.com(\/.*)?$/.test(document.referrer)) { Imgur.Util.jafoLog({ event: ‘galleryDisplay’, meta: { gallerySort: ‘viral’, galleryType: ‘hot’ }}); } });

That reference to a development domain is what prompted recon on imgur-dev.com, which turned out to be the domain Imgur uses for internal development.

A Google search for site:imgur-dev.com showed that Google had indexed the subdomain alan.imgur-dev.com, which contained a development version of Imgur. The server was down at the time, but a cached copy of the page revealed database tables and column names in SQL queries output by Kohana's profiler.

The development environment comes back up

In November the researcher looked at imgur-dev.com again. alan.imgur-dev.com was live and accessible. It was essentially Imgur as normal, with a couple of users and a few test posts. Because it was a developer's environment, it exposed stacktraces that included parts of Imgur's source code, PHP warnings and notices, details about the environment, database queries, and full paths to configuration files. He filed another HackerOne report and waited.

Exploitation

Step 1: enumerate sub-subdomains

Two days later he ran SubBrute against alan.imgur-dev.com to look for sub-subdomains of interest. Not long after starting the scan he got a hit: es.alan.imgur-dev.com. Visiting it showed an Elasticsearch server that had not been updated in a while. Searching for an Elasticsearch vulnerability led him to CVE-2014-3120, described as:

Text
The default configuration in Elasticsearch before 1.2 enables dynamic scripting, which allows remote attackers to execute arbitrary MVEL expressions and Java code via the source parameter to _search.

Step 2: read files through Elasticsearch

He took a public proof-of-concept script for the CVE and used it to try reading /etc/passwd. It worked: the file was read successfully. At this point the safe move would have been to report the issue and stop, but with the program paying $50 and swag, he decided to go further and see how badly he could compromise Imgur.

Step 3: read the configuration file

Among the paths he had noticed earlier was a configuration file called keys.php. He read it the same way he had read /etc/passwd, and again it succeeded. The file contained:

  • API keys for Fastly and MailChimp.
  • Mobile app API keys.
  • reCAPTCHA API keys.
  • Credentials for connecting to both the local and remote MySQL servers.

The remaining problem was that he did not know the hostname of the remote MySQL server, and the local one could not be reached remotely.

Step 4: log in to the production database

The subdomain scan produced another hit: sql.alan.imgur-dev.com. Visiting it presented phpMyAdmin. Normally only a username and password are needed, but here the login offered a choice of hosts: the local server, and a remote server hosted on Amazon AWS. He selected the remote server, entered the credentials from keys.php, and had full access to Imgur's production database.

Step 5: stop at the AWS keys

The configuration file also contained two sets of Amazon AWS access keys, one for development and one for production. He did nothing with them. He knew he could have used them to spin up new servers, SSH into existing ones, or destroy them, but he decided against even testing whether they worked. In his words, an important part of security research is knowing when to stop: he had gone far enough to prove the seriousness of the issue and show what a malicious attacker could do, without being careless or intrusive.

Step 6: report and shutdown

He updated the HackerOne report with the new findings and emailed Alan urgently. Within half an hour the server was offline. The next morning Alan replied that access to the server was disabled while they worked out the next steps.

Root cause

Imgur's own statement after the report was published explains the underlying mistake:

Text
A security group configuration error allowed Imgur development environments to face the public internet. Typically these environments were protected behind a special endpoint which would open access to authenticated Imgur employees for a short time window. Since the development environments were configured in such a manner to make development easier, some keys and environment variables were exposed. While most of these pieces of sensitive information were limited to the development environments, some production information was also exposed. Since this report was published, security around development environments has been completely re-worked and they now reside behind a VPN.

In other words, such development environments were typically protected behind an endpoint that opened access only to authenticated employees for a short window. A security group configuration error allowed the development environments to face the public internet. The development configuration then did the rest: debug output (stacktraces, PHP warnings and notices, environment details, SQL queries, full paths to configuration files) revealed where secrets lived, an outdated Elasticsearch instance allowed arbitrary file reads, and the exposed keys.php supplied credentials that reached production systems.

Impact

The chain gave the researcher read access to files on the Elasticsearch server, including keys.php with its third-party API keys, mobile app keys, reCAPTCHA keys and MySQL credentials. Those credentials opened phpMyAdmin on sql.alan.imgur-dev.com with full access to Imgur's production database. The AWS access keys for development and production were also exposed, though the researcher deliberately did not test them. Imgur's statement notes that most of the exposed sensitive information was limited to the development environments, but some production information was exposed as well.

Fix

Imgur disabled access to the server while it worked out next steps, and its statement says security around development environments has been completely re-worked so they now reside behind a VPN. The report does not describe any other specific remediation, such as rotating the exposed keys or upgrading Elasticsearch.

Variants to test

  1. Search engine indexing of development domains. Run site: queries for likely internal domains (for example site:example-dev.com) and check cached copies of any hits. A positive result is an indexed development host, a cached page, or profiler output showing table and column names.
  2. Referrer allowlists in client-side code. Grep page source for regular expressions that accept more than the production domain, such as an optional -dev suffix. A positive result is a development domain you can then investigate.
  3. Sub-subdomain enumeration on development hosts. Run a tool such as SubBrute against a known development hostname. A positive result is a host exposing a service such as Elasticsearch, phpMyAdmin or another administrative interface.
  4. Outdated Elasticsearch with dynamic scripting. Check whether the source parameter to _search accepts MVEL expressions, and try reading a known file such as /etc/passwd. A positive result is file contents returned in the response.
  5. Debug output on development environments. Look for stacktraces, PHP warnings and notices, environment details, SQL queries and full paths to configuration files. A positive result is any of these revealing where secrets are stored.
  6. Configuration files reachable through file read. Try reading paths such as keys.php once you have file read. A positive result is API keys, database credentials or cloud access keys in the response.
  7. phpMyAdmin host selection. Where a login form offers a choice of hosts, try credentials against each one, including remote hosts. A positive result is a session with access to a database other than the local development one.
  8. Cloud access keys. If keys are exposed, confirm their scope only within agreed rules of engagement, and stop rather than using them to create, access or destroy infrastructure.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

What happened, in plain words

A security researcher spent several months in 2015 and early 2016 poking at Imgur, a very popular website where people upload and share images (memes, screenshots, photos). He started by finding ordinary, well-known weaknesses in the main website. While reading the website's code, he spotted a reference to a second domain, imgur-dev.com, which turned out to be where Imgur's engineers built and tested changes before releasing them to the public. That development area was supposed to be private, but a configuration mistake left parts of it reachable from the open internet. From there he found an old, unpatched search server that let him read files, one of those files held passwords and keys, and those credentials let him log in to Imgur's real production database. He stopped before touching Imgur's cloud (Amazon AWS) keys, reported everything, and eventually received $5,050 in total: $50 for the earlier reports plus an extra $5,000 for this chain.

This article walks through the same steps for someone who has never done security work. Every new idea is explained the first time it appears, and every piece of code is copied exactly as it appeared and then explained in plain words.

Hacking Imgur for Fun and Profit
Hacking Imgur for Fun and Profit From the original on medium.freecodecamp.org

The title of the write-up is a play on the classic "Hacking X for Fun and Profit" phrasing. The report opens with a joke about memes being safe, which sets the tone for what follows.

Image
Image From the original on medium.freecodecamp.org

Background ideas you need first

Before the steps make sense, here are the concepts the story relies on. None of them require any prior knowledge.

  • A domain and a subdomain. A domain is a website's name, like imgur.com. A subdomain is a name placed in front of it, like alan.imgur.com, and it can point to a completely different machine. Think of a domain as a building's street address and subdomains as apartment numbers inside it. A sub-subdomain adds one more level, like es.alan.imgur.com.
  • Production versus development. Production is the real website that real users see. Development (often shortened to dev) is a copy where engineers try changes safely. A restaurant comparison: production is the dining room, development is the test kitchen. You really do not want customers wandering into the test kitchen, because it is messy and the knives are out.
  • HTML source code. Every web page you see is delivered as text that your browser interprets. Right-clicking and choosing "View source" (or similar) shows that text. It often contains hints about how the site is built.
  • JavaScript. The programming language that runs inside your browser to make pages interactive. A short piece of JavaScript embedded in a page can reveal what the developers were thinking.
  • A regular expression (regex). A pattern for matching text, a bit like a wildcard search on steroids. imgur matches that word; a regex can express things like "the word imgur, optionally followed by -dev, then .com".
  • The referrer. When you click a link from one page to another, your browser can tell the destination page where you came from. That piece of information is called the referrer. Sites use it to check that visitors arrived from a trusted place.
  • XSS (cross-site scripting). A class of bug where an attacker gets their own code to run inside another person's browser on a trusted site. Imagine someone slipping a fake instruction sheet into a restaurant's menu so the waiter follows the attacker's orders.
  • Clickjacking. Tricking a user into clicking something they did not intend to click, usually by placing an invisible or disguised button over a real one. Like putting a "pay here" sticker over a "cancel" button.
  • CSRF (cross-site request forgery). A bug where another website makes your browser send a request to a site you are already logged in to, without you meaning to. Think of a forged letter with your signature already on it: the bank sees your signature and obeys.
  • A bug bounty program. A formal scheme where a company pays researchers for reporting security bugs responsibly instead of exploiting them. It is a reward scheme with rules, run through a platform.
  • HackerOne. One of those platforms. Companies list their programs there, researchers submit reports, and the company triages and pays.
  • A vulnerability report. A written description of a bug: what it is, how to reproduce it, and why it matters.
  • An API key. A long secret string that lets a piece of software talk to another service, like a password for programs rather than people. If it leaks, someone else can pretend to be your software.
  • Credentials. A username and password pair (or similar) used to log in to something.
  • MySQL. A very common database system. A database is an organised store of data, like a set of very strict spreadsheets.
  • phpMyAdmin. A web page for browsing and editing a MySQL database. It is a control panel for the spreadsheets.
  • Elasticsearch. A search engine product often used to search large amounts of data quickly. It has a web interface that accepts queries.
  • A CVE. A public catalogue number for a known vulnerability, so everyone can refer to the same bug unambiguously. CVE-2014-3120 is one specific entry.
  • A proof-of-concept (PoC) script. A small program that demonstrates a vulnerability works, usually published so others can verify it.
  • A stacktrace. The list of function calls a program was in when it crashed. Useful to developers, dangerous to expose publicly because it reveals internal file names and code structure.
  • A configuration file. A file holding settings, often including secrets such as passwords and keys. keys.php is one such file.
  • A security group. A cloud firewall rule set. It decides which network traffic may reach which machines. A misconfiguration here is like leaving the staff entrance unlocked.
  • A VPN. A virtual private network. It creates a private tunnel so only authorised people can reach internal systems, even over the public internet.
  • Subdomain enumeration. Systematically guessing subdomain names to discover machines that were not meant to be found. Like trying every apartment number in a building to see which doors open.
  • SSH. A way to log in to a remote computer's command line. If you have the keys, you can run commands on someone else's server.

Setup

The researcher used no special accounts or roles on Imgur itself. His tools and preconditions were:

  • Familiarity with the production site from regular use. Knowing how a site normally behaves makes oddities stand out.
  • Google, for searching indexed pages on imgur-dev.com.
  • A cached copy of an indexed page, viewed while the development server was down. Search engines keep snapshots of pages they have seen, so you can read a page even after it goes offline.
  • SubBrute, run against alan.imgur-dev.com to enumerate sub-subdomains.
  • A public proof-of-concept script for CVE-2014-3120.
  • A HackerOne account, once Imgur launched its bug bounty program.

Finding it

The first round of production issues

After a quick survey of Imgur, the researcher identified common vulnerabilities: XSS, clickjacking, and a large number of CSRF issues. These are the everyday bugs of web security: code running where it should not, clicks being hijacked, and requests being forged. Reporting them was difficult because the only visible contact route was Imgur's support system, which was not suitable for security issues. Support queues are for lost passwords and billing, not for "your site has a hole in it".

On 1 August 2015 he wrote up a report and emailed [redacted]. A couple of hours later Imgur's founder and CEO, Alan Schaaf, replied thanking him and offering swag as a reward. Swag means branded merchandise, a T-shirt or stickers, not money. Over the following days the researcher forwarded more reports, including one that would later earn him over $5,000.

In late September 2015 Imgur was hacked: someone uploaded an HTML file with malicious JavaScript to Imgur and used it to target 8chan users. The site hosted the attacker's HTML and JavaScript and served it to other people. This was quickly fixed, but it was widely reported. A week later Imgur launched its bug bounty program, giving researchers a proper reporting channel. The lesson for a beginner: a public incident is often what pushes a company to formalise how it receives security reports.

The researcher contacted Alan again to ask whether his earlier reports were eligible. He was put in touch with an Imgur developer, who confirmed eligibility and asked him to file a report on HackerOne. For all the vulnerabilities he had reported, 20+ in total, the reward was $50, on the grounds that "for the most part, we're offering swag for CSRF reports, so you're more of the exception here". Twenty-plus bugs for fifty dollars is the kind of mismatch that later matters in this story.

Before the bug bounty program existed, Imgur was riddled with CSRF vulnerabilities. Some, since fixed, included:

  1. The ability to update the user's bio.
  2. The ability to generate a new client secret for a given Imgur app.
  3. The ability to change the redirect URL for a given Imgur app.

These were CSRF issues: another website could trigger actions on your behalf while you were logged in.

These were among the issues he had initially reported, so a $50 reward was disheartening. The developer explained that the program was new and still being improved. The researcher gave him a list of the issues he had reported, and the developer confirmed there was much more in the reports than he had realised. This is a useful reminder: a triager reading dozens of reports can miss depth, and a clear list helps.

The HTML source snippet

During the initial research the researcher looked through Imgur's HTML source code and found this snippet:

JavaScript
$(function() { if(!/^([^:]+:)\/\/([^.]+\.)*imgur(-dev)?\.com(\/.*)?$/.test(document.referrer)) { Imgur.Util.jafoLog({ event: ‘galleryDisplay’, meta: { gallerySort: ‘viral’, galleryType: ‘hot’ }}); } });

Line by line, in plain words:

  • $(function() { ... }); means "run the code inside the braces once the page has finished loading". The $ is a common shorthand provided by the JavaScript library jQuery.
  • if(!/^([^:]+:)\/\/([^.]+\.)*imgur(-dev)?\.com(\/.*)?$/.test(document.referrer)) is the interesting part. It takes the referrer (where the visitor came from) and tests it against a pattern. The ! means "if the test does not match".
  • Inside the pattern, imgur(-dev)?\.com means "the word imgur, optionally followed by -dev, then .com". In other words, the code treats both imgur.com and imgur-dev.com as trusted places to have come from.
  • Imgur.Util.jafoLog({ event: ‘galleryDisplay’, meta: { gallerySort: ‘viral’, galleryType: ‘hot’ }}) records an analytics event when the visitor did not come from a trusted Imgur page.

The regular expression tests document.referrer against a pattern that accepts imgur.com and also imgur-dev.com. That reference to a development domain is what prompted recon on imgur-dev.com, which turned out to be the domain Imgur uses for internal development. The reasoning is simple: if the public site's code mentions a development domain, that domain probably exists, and it probably is not meant to be public.

A Google search for site:imgur-dev.com showed that Google had indexed the subdomain alan.imgur-dev.com, which contained a development version of Imgur. The site: operator tells Google "only show me results from this domain", which is a quick way to see what a search engine has already crawled. The server was down at the time, but a cached copy of the page revealed database tables and column names in SQL queries output by Kohana's profiler. Kohana is a PHP web framework, and its profiler is a debugging panel that prints the database queries a page ran. Seeing table and column names tells you how the data is structured, which is valuable reconnaissance.

The development environment comes back up

In November the researcher looked at imgur-dev.com again. alan.imgur-dev.com was live and accessible. It was essentially Imgur as normal, with a couple of users and a few test posts. Because it was a developer's environment, it exposed stacktraces that included parts of Imgur's source code, PHP warnings and notices, details about the environment, database queries, and full paths to configuration files. Each of those is a gift to an attacker: stacktraces show code structure, warnings show file paths, and paths tell you where secrets are likely stored. He filed another HackerOne report and waited.

Exploitation

Step 1: enumerate sub-subdomains

Two days later he ran SubBrute against alan.imgur-dev.com to look for sub-subdomains of interest. SubBrute is a tool for finding subdomains. Not long after starting the scan he got a hit: es.alan.imgur-dev.com. Visiting it showed an Elasticsearch server that had not been updated in a while. Searching for an Elasticsearch vulnerability led him to CVE-2014-3120, described as:

Text
The default configuration in Elasticsearch before 1.2 enables dynamic scripting, which allows remote attackers to execute arbitrary MVEL expressions and Java code via the source parameter to _search.

In plain words: versions of Elasticsearch older than 1.2 shipped with a feature called dynamic scripting turned on. That feature lets a query include a small program (an MVEL expression, or Java code) that the server will run. The source parameter to the _search endpoint is where that program goes. So a search request can carry executable logic, and an attacker can make the server do things it was never meant to do, such as reading files. The word "remote" means the attacker does not need to be on the same network; the internet is enough.

Step 2: read files through Elasticsearch

He took a public proof-of-concept script for the CVE and used it to try reading /etc/passwd. On Linux systems, /etc/passwd lists user accounts and is world-readable, so reading it proves file read. It worked: the file was read successfully. At this point the safe move would have been to report the issue and stop, but with the program paying $50 and swag, he decided to go further and see how badly he could compromise Imgur. That decision is the ethical hinge of the whole story, and he later explains where he drew his own line.

Step 3: read the configuration file

Among the paths he had noticed earlier was a configuration file called keys.php. He read it the same way he had read /etc/passwd, and again it succeeded. The file contained:

  • API keys for Fastly and MailChimp.
  • Mobile app API keys.
  • reCAPTCHA API keys.
  • Credentials for connecting to both the local and remote MySQL servers.

Each key is a secret that lets software act on the company's behalf, so leaking them is like handing out copies of the office keys. The remaining problem was that he did not know the hostname of the remote MySQL server, and the local one could not be reached remotely. Credentials without an address are like a key without a door.

Step 4: log in to the production database

The subdomain scan produced another hit: sql.alan.imgur-dev.com. Visiting it presented phpMyAdmin. Normally only a username and password are needed, but here the login offered a choice of hosts: the local server, and a remote server hosted on Amazon AWS. He selected the remote server, entered the credentials from keys.php, and had full access to Imgur's production database. The host dropdown solved the missing-address problem: the door was listed right there in the login form.

Step 5: stop at the AWS keys

The configuration file also contained two sets of Amazon AWS access keys, one for development and one for production. He did nothing with them. He knew he could have used them to spin up new servers, SSH into existing ones, or destroy them, but he decided against even testing whether they worked. In his words, an important part of security research is knowing when to stop: he had gone far enough to prove the seriousness of the issue and show what a malicious attacker could do, without being careless or intrusive. For a beginner, this is the most important paragraph in the report. Proving access is enough; using it to cause damage or cost is not research.

Step 6: report and shutdown

He updated the HackerOne report with the new findings and emailed Alan urgently. Within half an hour the server was offline. The next morning Alan replied that access to the server was disabled while they worked out the next steps. A fast response like this is what a good incident process looks like from the outside.

Root cause

Imgur's own statement after the report was published explains the underlying mistake:

Text
A security group configuration error allowed Imgur development environments to face the public internet. Typically these environments were protected behind a special endpoint which would open access to authenticated Imgur employees for a short time window. Since the development environments were configured in such a manner to make development easier, some keys and environment variables were exposed. While most of these pieces of sensitive information were limited to the development environments, some production information was also exposed. Since this report was published, security around development environments has been completely re-worked and they now reside behind a VPN.

In other words, the development environments were meant to sit behind an endpoint that opened access only to authenticated employees for a short window. A security group misconfiguration removed that protection and exposed them directly. The development configuration then did the rest: debug output (stacktraces, PHP warnings and notices, environment details, SQL queries, full paths to configuration files) revealed where secrets lived, an outdated Elasticsearch instance allowed arbitrary file reads, and the exposed keys.php supplied credentials that reached production systems. The report does not describe any additional defence that should have caught the chain.

Impact

The chain gave the researcher, and would have given any attacker who found the same hosts, read access to files on the Elasticsearch server, including keys.php with its third-party API keys, mobile app keys, reCAPTCHA keys and MySQL credentials. Those credentials opened phpMyAdmin on sql.alan.imgur-dev.com with full access to Imgur's production database. The AWS access keys for development and production were also exposed, though the researcher deliberately did not test them. Imgur's statement notes that most of the exposed sensitive information was limited to the development environments, but some production information was exposed as well.

Fix

Imgur disabled access to the server while it worked out next steps, and later re-worked security around development environments entirely so that they reside behind a VPN. The report does not describe any other specific remediation, such as rotating the exposed keys or upgrading Elasticsearch.

Variants to test

These are the same checks, phrased as things you could try on a system you are authorised to test. Never run them against a site you do not have permission to test.

  1. Search engine indexing of development domains. Run site: queries for likely internal domains (for example site:example-dev.com) and check cached copies of any hits. A positive result is an indexed development host, a cached page, or profiler output showing table and column names.
  2. Referrer allowlists in client-side code. Grep page source for regular expressions that accept more than the production domain, such as an optional -dev suffix. A positive result is a development domain you can then investigate.
  3. Sub-subdomain enumeration on development hosts. Run a tool such as SubBrute against a known development hostname. A positive result is a host exposing a service such as Elasticsearch, phpMyAdmin or another administrative interface.
  4. Outdated Elasticsearch with dynamic scripting. Check whether the source parameter to _search accepts MVEL expressions, and try reading a known file such as /etc/passwd. A positive result is file contents returned in the response.
  5. Debug output on development environments. Look for stacktraces, PHP warnings and notices, environment details, SQL queries and full paths to configuration files. A positive result is any of these revealing where secrets are stored.
  6. Configuration files reachable through file read. Try reading paths such as keys.php once you have file read. A positive result is API keys, database credentials or cloud access keys in the response.
  7. phpMyAdmin host selection. Where a login form offers a choice of hosts, try credentials against each one, including remote hosts. A positive result is a session with access to a database other than the local development one.
  8. Cloud access keys. If keys are exposed, confirm their scope only within agreed rules of engagement, and stop rather than using them to create, access or destroy infrastructure.

Glossary

  • API: an interface that lets one piece of software talk to another, like a waiter taking orders between you and the kitchen.
  • API key: a secret string that identifies software to a service, like a password for programs.
  • AWS (Amazon Web Services): Amazon's cloud platform, where companies rent servers and services.
  • Bug bounty program: a formal scheme where a company pays researchers for responsibly reported security bugs.
  • Cached copy: a saved snapshot of a web page kept by a search engine, viewable after the original goes offline.
  • Clickjacking: tricking a user into clicking something they did not intend to click.
  • Configuration file: a file of settings, often containing secrets such as passwords and keys.
  • Credentials: a username and password pair, or similar, used to log in.
  • CSRF (cross-site request forgery): another site making your logged-in browser send a request you did not intend.
  • CVE: a public catalogue number for a known vulnerability.
  • Database: an organised store of data, like a set of strict spreadsheets.
  • Development environment: a copy of a system used by engineers to test changes, not meant for public access.
  • Domain: a website's name, such as imgur.com.
  • Elasticsearch: a search engine product with a web interface that accepts queries.
  • HackerOne: a platform where companies run bug bounty programs and researchers submit reports.
  • HTML: the text format that describes the structure of a web page.
  • JavaScript: the programming language that runs in your browser to make pages interactive.
  • jQuery: a JavaScript library that simplifies common tasks; the $ shorthand comes from it.
  • Kohana: a PHP web framework; its profiler prints database queries for debugging.
  • MVEL: an expression language that Elasticsearch's dynamic scripting feature could evaluate.
  • MySQL: a common database system.
  • phpMyAdmin: a web control panel for browsing and editing a MySQL database.
  • PoC (proof of concept): a small script or demonstration showing that a vulnerability works.
  • Production: the real, live system that actual users use.
  • Referrer: the information a browser sends about the page you came from.
  • Regex (regular expression): a pattern for matching text.
  • Security group: a cloud firewall rule set controlling which traffic reaches which machines.
  • Stacktrace: the list of function calls a program was in when it crashed, revealing internal structure.
  • Subdomain: a name placed in front of a domain, like alan.imgur.com.
  • Subdomain enumeration: systematically guessing subdomain names to find machines not meant to be found.
  • Swag: branded merchandise given as a reward, not money.
  • VPN: a virtual private network that creates a private tunnel for authorised access to internal systems.
  • XSS (cross-site scripting): getting attacker code to run inside another person's browser on a trusted site.

More by nathonsecurity

View all

1 more disclosed report, best first.

More from Imgur

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.