Sub Domain Takeover at mk.prd.vine.co
The subdomain mk.prd.vine.co was previously served by an EC2 instance that has been stopped, and the DNS record now points to a load balancer controlled by someone else. An attacker could potentially serve content on that subdomain, though the report only shows the new load balancer responses.
- Triaged in 35 hours
- Fixed in 25 days
- Paid in 41 hours
- Disclosed after 2 months
Hey
It looks like the EC2 Instance at mk.prd.vine.co has been stopped and now it has been assigned to someone else
Proof of Concept
http://mk.prd.vine.co/few days back didn't have port 443 open but now it does have an open port 443
Response
< HTTP/1.1 426 Upgrade Required
< Date: Thu, 15 Dec 2016 07:06:34 GMT
< Content-Type: text/plain
< Content-Length: 16
< Connection: keep-alive
Also http://mk.prd.vine.co/%00 pops an error
< HTTP/1.1 400 Bad Request
* Server awselb/2.0 is not blacklisted
< Server: awselb/2.0
< Date: Thu, 15 Dec 2016 07:06:58 GMT
< Content-Type: text/html
< Content-Length: 171
< Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>awselb/2.0</center>
</body>
</html>
So it looks like now someone's load balancer is pointing to mk.prd.vine.co
What the report shows
The target is the hostname mk.prd.vine.co, which the researcher says was an EC2 instance that had been stopped and then assigned to someone else. The report is short and consists of two observations made a few days apart.
- A few days earlier,
http://mk.prd.vine.co/did not have port 443 open. At the time of the report it did. - Requesting the host over HTTPS returned a
426 Upgrade Requiredresponse:
< HTTP/1.1 426 Upgrade Required
< Date: Thu, 15 Dec 2016 07:06:34 GMT
< Content-Type: text/plain
< Content-Length: 16
< Connection: keep-alive
- Requesting
http://mk.prd.vine.co/%00produced a400 Bad Requestserved byawselb/2.0:
< HTTP/1.1 400 Bad Request
* Server awselb/2.0 is not blacklisted
< Server: awselb/2.0
< Date: Thu, 15 Dec 2016 07:06:58 GMT
< Content-Type: text/html
< Content-Length: 171
< Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>awselb/2.0</center>
</body>
</html>
From the appearance of an AWS Elastic Load Balancer banner, the conclusion drawn is that someone else's load balancer is now pointing to mk.prd.vine.co.
The report records a bounty of 140.00 USD and was disclosed on 2017-02-13. It does not state a severity rating, a CVSS score, a weakness classification or a remediation step.
Root cause
The report's framing is that the EC2 instance behind mk.prd.vine.co was stopped and assigned to someone else, whose load balancer now answers for the name. The report does not show the DNS record or the address involved.
Impact
The researcher's framing is that someone else's load balancer is now pointing to a Vine hostname. In a dangling-record scenario the practical risk is that whoever controls the reassigned resource can answer requests for the hostname, which can mean serving arbitrary content under the organisation's domain, receiving traffic and data that clients send to that name, and potentially obtaining TLS certificates for it if validation is possible.
The report itself does not demonstrate any of these consequences. It shows only that port 443 was newly open and that an AWS load balancer answered, so the impact should be read as the risk implied by the takeover rather than as something proven here.
How this kind of bug works
Cloud providers allocate IP addresses and hostnames from shared pools. When a customer releases an address, it goes back into the pool and can be handed to another customer. If a DNS record still points at the released address, the original owner's name now resolves to infrastructure controlled by someone else. The same pattern applies to platform-specific endpoints: object storage buckets, load balancers, application hosting platforms and CDN endpoints all have names that can be claimed by anyone who knows them, and a CNAME or alias left pointing at a deleted resource is enough to hand over the hostname.
The bug class is often called subdomain takeover, though it is not limited to subdomains: any DNS name that resolves to a claimable resource is affected. The core mistake is lifecycle management. Records are created when a service is provisioned and are not removed when the service is decommissioned, so the DNS layer and the cloud layer drift apart.
Defences are procedural as much as technical: treat DNS records as part of the resource they point to, delete them in the same change that deletes the resource, and keep an inventory that maps every record to a live owner. Some providers let you reserve or re-register the name to prevent others claiming it.
How to test for it
- Enumerate names: collect hostnames from certificate transparency logs, DNS brute force, JavaScript files, mobile apps and historical scan data. Old and internal-sounding names such as environment prefixes are worth keeping.
- Resolve each name and record what it points at: an A record to a cloud address, a CNAME to a provider hostname, or an alias to a load balancer.
- Fingerprint the response. Request the name over HTTP and HTTPS and look at the status line, the
Serverheader, the body and the TLS certificate. Provider error pages, default welcome pages and distinctive banners identify the platform that is answering. - Compare against the expected service. A name that used to serve the organisation's application but now returns a provider's generic error or a different service is a candidate.
- Confirm claimability. For a CNAME to a platform endpoint, check whether the resource name is still registered with the provider. If the provider allows anyone to create a resource with that name, the takeover is real. For an IP address, check whether it is still allocated to the organisation or has moved to another owner.
- Prove control carefully. Registering the resource or serving a harmless marker page is usually enough to demonstrate impact; do not interfere with live traffic or collect data from real users.
A positive result is a hostname that resolves to a resource the organisation no longer owns and that you can claim or that now serves someone else's content. Common false positives include wildcard DNS records that answer for every name, provider error pages that appear for names that are still correctly owned, and services that return a generic page but whose underlying resource is still registered to the organisation. A changed banner alone is a signal, not proof; the claimability check is what turns it into a finding.
How it is fixed
Remove the dangling record, or repoint it at a resource the organisation controls. Where the provider supports it, reserve the name so it cannot be claimed by another customer. Add decommissioning DNS cleanup to the process for retiring infrastructure, and monitor for records that resolve to unclaimed resources. For names that must stay, keep the backing resource alive or place a controlled placeholder in front of it.
Hunting notes
These bugs cluster around environments that are created and destroyed often: staging, QA, demo and preview names, and anything with a region or product prefix. Acquisitions and rebrands leave orphaned names behind, as do migrations between cloud accounts. Certificate transparency logs are a good source because they record names that were once live even if they are gone now.
Useful recon signals are CNAMEs pointing at platform hostnames, A records in cloud ranges that no longer respond as expected, and hosts whose banners changed between scans. Keeping historical scan data pays off: a name that served one service last month and a provider error page this month is exactly the pattern in this report.
To strengthen a report, show the chain end to end: the DNS record, the resource it points at, evidence that the resource is unclaimed or owned by someone else, and a demonstration that you can serve content on the name. Keep the demonstration minimal and reversible, and explain the impact in terms of the hostname's role, for example whether it is used by production clients or holds cookies for the parent domain.
What happened, in plain words
A website is made of many names. The main one, like vine.co, is the address people type. Smaller names in front of it, like mk.prd.vine.co, are called subdomains and usually point at a specific piece of machinery that runs one part of the service. This report is about one of those names.
The researcher says mk.prd.vine.co was an EC2 instance. EC2 is Amazon's service for renting a virtual computer in the cloud. You do not buy the computer outright; you rent it, and when you stop renting it, Amazon takes it back and can hand it to another customer. The researcher's claim is that this is what happened here: the machine behind the name was stopped, given to someone else, and that someone else's load balancer is now pointing to the Vine name.
To check, the researcher looked at the name twice, a few days apart.
- A few days earlier,
http://mk.prd.vine.co/did not have port 443 open. A port is a numbered doorway on a computer; port 443 is the standard doorway for encrypted web traffic (HTTPS). A closed doorway means connections on that port are refused. - At the time of the report, port 443 was open. Something new had appeared behind the name.
- Asking for the name over HTTPS returned this response:
< HTTP/1.1 426 Upgrade Required
< Date: Thu, 15 Dec 2016 07:06:34 GMT
< Content-Type: text/plain
< Content-Length: 16
< Connection: keep-alive
A response is what a server sends back when your browser asks for a page. The first line, HTTP/1.1 426 Upgrade Required, is a status code: a three-digit number that summarises the answer. 426 means the server refuses the current way of talking and wants the client to switch to a different protocol. The other lines are headers, small labelled facts about the reply: the date, the type of content, its length in bytes, and whether the connection stays open. None of this looks like Vine's own application.
- Requesting
http://mk.prd.vine.co/%00produced a different error:
< HTTP/1.1 400 Bad Request
* Server awselb/2.0 is not blacklisted
< Server: awselb/2.0
< Date: Thu, 15 Dec 2016 07:06:58 GMT
< Content-Type: text/html
< Content-Length: 171
< Connection: close
<html>
<head><title>400 Bad Request</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<hr><center>awselb/2.0</center>
</body>
</html>
The %00 at the end of the address is a way of writing a null byte, a character that is not normally allowed in a web address. Sending it is a small nudge to see how the server reacts. It answered 400 Bad Request, meaning it did not understand the request. The interesting part is the Server header: awselb/2.0. That is the signature of an AWS Elastic Load Balancer, a piece of Amazon equipment that spreads incoming traffic across several machines. The same name appears in the body of the error page.
Put together, the two observations say that a load balancer belonging to somebody else is now pointing to a Vine hostname. The report records a bounty of 140.00 USD and was disclosed on 2017-02-13. It does not give a severity rating, a CVSS score, a weakness category or a fix.
In general, how this kind of bug works
Cloud providers hand out addresses and names from shared pools. When a customer releases one, it goes back into the pool and can be given to a different customer. If a DNS record still points at the released address, the original owner's name now leads to infrastructure controlled by a stranger. DNS is the internet's address book: it maps a name people can read to the numeric address of a machine. A record is one line in that book.
The usual cause is a dangling record: the name was set up when a service was created and never removed when the service was shut down. The address book and the cloud drift apart. The same pattern appears with storage buckets, load balancers, application hosting platforms and content delivery networks, all of which have names anyone can claim if the name is free. The bug class is often called subdomain takeover, though any name that resolves to a claimable resource is affected.
In general, the risk is that whoever controls the reassigned resource can answer requests for the hostname: serving arbitrary content under the organisation's domain, receiving traffic and data that clients send to that name, and potentially obtaining TLS certificates for it. This report does not demonstrate any of those consequences; it shows only that port 443 was newly open and that an AWS load balancer answered.
How to test for it
- Collect names: from certificate transparency logs (public lists of certificates issued for names), from guessing common subdomains, from JavaScript files and mobile apps, and from old scan data. Names with environment prefixes such as
prdorstgare worth keeping. - Look up what each name points at: a numeric address, or an alias to a provider's hostname.
- Fingerprint the reply. Request the name over HTTP and HTTPS and read the status line, the
Serverheader, the page body and the certificate. Provider error pages and default welcome pages identify the platform answering. - Compare with what you expect. A name that used to serve the organisation's application but now returns a provider's generic error, or a different service, is a candidate.
- Confirm the resource can be claimed. If the provider lets anyone create a resource with that name, the takeover is real. For a numeric address, check whether it still belongs to the organisation or has moved to another owner.
- Prove control gently. Registering the resource or serving a harmless marker page is usually enough. Do not interfere with live traffic or collect data from real users.
A changed banner alone is a signal, not proof; the claimability check is what turns it into a finding. Common false positives are wildcard DNS records that answer for every name, provider error pages for names that are still correctly owned, and generic pages whose underlying resource is still registered to the organisation.
How it is fixed
Remove the dangling record, or repoint it at a resource the organisation controls. Where the provider supports it, reserve the name so nobody else can claim it. Add DNS cleanup to the process for retiring infrastructure, and monitor for records that lead to unclaimed resources. For names that must stay, keep the backing resource alive or put a controlled placeholder in front of it.
Hunting notes
These bugs cluster around environments that are created and destroyed often: staging, QA, demo and preview names, and anything with a region or product prefix. Acquisitions and rebrands leave orphaned names behind, as do migrations between cloud accounts. Certificate transparency logs are a good source because they record names that were once live even if they are gone now.
Useful signals are aliases pointing at platform hostnames, numeric addresses in cloud ranges that no longer respond as expected, and hosts whose banners changed between scans. Historical scan data pays off: a name that served one service last month and a provider error page this month is exactly the pattern in this report. To strengthen a report, show the chain end to end: the DNS record, the resource it points at, evidence that the resource is unclaimed or owned by someone else, and a minimal, reversible demonstration that you can serve content on the name. Explain the impact in terms of the hostname's role, for example whether production clients use it or whether it holds cookies for the parent domain.
Glossary
- Subdomain: a name placed in front of a main domain, such as
mk.prd.vine.coundervine.co, usually pointing at one part of a service. - EC2 instance: a virtual computer rented from Amazon Web Services.
- Port: a numbered doorway on a computer through which a particular kind of traffic arrives; port 443 is the standard one for HTTPS.
- HTTPS: the encrypted version of the web protocol, so that traffic cannot be read or altered in transit.
- Request: the message a browser sends to a server asking for a page or resource.
- Response: the message a server sends back, starting with a status code and headers.
- Status code: a three-digit number summarising a response, such as 400 or 426.
- Header: a labelled fact attached to a request or response, such as
ServerorDate. - 426 Upgrade Required: a status code meaning the server wants the client to switch to a different protocol.
- 400 Bad Request: a status code meaning the server could not understand the request.
- Null byte: a character written
%00in a web address, normally not allowed there. - Load balancer: equipment that spreads incoming traffic across several machines;
awselb/2.0is the signature of an AWS Elastic Load Balancer. - DNS: the internet's address book, mapping readable names to machine addresses.
- DNS record: one entry in that address book, pointing a name at an address or another name.
- Dangling record: a DNS record still pointing at a resource that has been released or deleted.
- Subdomain takeover: claiming a released resource so that a name still pointing at it now serves your content.
- CNAME: a DNS record that points one name at another name rather than at a numeric address.
- A record: a DNS record that points a name at a numeric IP address.
- TLS certificate: a digital document that proves a server's identity for encrypted connections.
- Certificate transparency logs: public lists of certificates issued for names.
- Wildcard DNS record: a record that answers for every possible subdomain of a name.
- False positive: a result that looks like a finding but is not one.
- CVSS: a standard scoring system for the severity of a vulnerability.