185 points · by DyslexicAtheist · 8y ago · 93 comments
This is ludicrous. If a torrent client considers this class of bug to be a vulnerability[1], I don't see why folks who are trying to revolutionise money (something that is far more important than a few small RCEs) don't. While it is true you need to run it with the --rpc option, I'm confused why the RPC is unauthenticated by default, and whether there is any front-end that will start up the RPC server in the background (similar to electrum).
[1]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-5702
That's why a lot of the more technical people really dislike ethereum. It's not one or two problems. The entire system all the way through want made with the mentality of compromising stability in favor of getting features sooner.
Tech folk should be excited about blockchain but the hysteria over exchanges right now is off-putting once you understand how deeply rigged the markets are. My next venture will be blockchain-based but I have a few years before I'm free to pursue that. I'd rather see the fundamentals of the tech improved in the meantime rather than have it prematurely hyped and have the bubble pop as I seek to raise funding...
I imagine there are many others who are in the position of wanting to build apps based on blockchain tech but who are not yet able. For us, slow and steady wins the race.
The approach that a couple of currencies have taken (including the one I lead) is to make a separate blockchain entirely dedicated to their app. And I think that's a far better choice than anything out there, though it comes with the glaring downside of needing to build and run your own blockchain, which is a very difficult thing to do.
Most of the apps we are seeing today don't make any sense anyway. Very much smacks of the dotcom bubble, where people who suspected that the Internet would change the world were absolutely correct, but then the companies and ideas they put their money behind were missing the mark by miles.
We've got the same issue today. Most successful ICOs are going to fail very hard, due to known impossibilities, known poor uses of the technology, etc. It's just a general fever that has a lot of new entrants in the space innovating in the wrong direction.
It will get better. Dapp platforms will appear that make sense, have good foundations, and are easy to setup and use. But it's not around the corner, it's probably 3-5 years away.
Qtum sounds like the thing you could be looking for. To TL;DR; it, Qtum is a smart contract platform on an independent blockchain that supports PoS (not DPoS, true PoS) and designed to support multiple smart contract VMs. Right now it only supports the EVM and thus can only run Solidity smart contracts, but later this year we'll release a new VM based on the x86 architecture so that it will be possible to use mainstream languages like C++, Rust, Go, etc...
Anyway, ending the whole description bit, we built it because of similar thoughts as you. Tired of seeing the only suitable smart contract platform (Ethereum) be treated like some philosophical research project, rather than a platform that businesses and people stake hundreds of millions of dollars on. Everything we design is intended to be practical to not just use, but also implement. We pride ourselves in never missing any deadlines we set for ourselves, and in never having some pipe dream project that won't be ready to use for 5 years.
* This is a "browser bypass of SOP" issue. All your "unauthenticated" local services should be vulnerable.
* A good part of Geth's usage is for servers that do not browse the internet.
* You usually do not handle accounts inside of a geth node, instead you open the node's API via RPC and have another tool that sends already-signed transactions to it. That means that this attack would probably not yield much if not allow someone to use the geth node as a public node to query public information.
* If you do decide to handle accounts in there, you would probably (1) not open the node with RPC and (2) have the accounts be encrypted. See Ethereum's documentation[1] :
> It supports interactive mode, when you are prompted for password as well as non-interactive mode where passwords are supplied via a given password file. Non-interactive mode is only meant for scripted use on test networks or known safe environments.
[1]: https://github.com/ethereum/go-ethereum/wiki/Managing-your-a...
How could anyone not consider this a vulnerability when it has an actual CVE assigned to it?
The discussion in the github issue also shows they took it pretty seriously: https://github.com/transmission/transmission/pull/468
And Ethereum is actually terrible.
This specific problem is easily mitigated. However, for most people who dabble in cryptocurrencies, they don't realize relying on security and setting defaults is just asking for trouble.
DNS rebinding to bypass SOP is an old and known issue. There is nothing
particular about geth being vulnerable to this.
* The RPC api is not the primary protection against theft of ether, users are
encouraged to have a long and difficult password, presumably difficult to
bruteforce.
* Although I cannot find the ticket right now, we're already considering
being even more strict on Origin, so that geth would not accept
POST-requests from non-whitelisted Origin:s (by default).
https://www.reddit.com/r/netsec/comments/7s7cz9/dns_rebindin...I'm not sure about the first bullet point. You have to unlock your accounts before calling any balance-changing methods but I don't know if there is a default time after which the accounts get locked again.
Even if there is, isn't there a time period while your accounts would be vulnerable?
As this seems easily mitigated by a simple security token, I don't see why they shouldn't implement this.
How are DNS rebinding attacks not a valid vulnerability?
The vulnerability is allowing the service to run without authentication.
Rather, it's a problem of DNS resolvers and browsers.
This is true over http and browsers, as well as internal servers, sockets, and cross frame communication. There are no such things as trusted internal services, just services that have not yet been breached (looking at you hardware vendors).
> I regularly encounter users who don’t accept that websites can access services on localhost or their intranet. These users understand that services bound to localhost are only accessible to software running on the local machine, and that their browser is running on the local machine – but somehow believe that accessing a website “transfers” execution somewhere else. It doesn’t work like that, but this is a common source of confusion.
For example in unbound there's
private-address: <IP address or subnet>
Give IPv4 of IPv6 addresses or classless subnets. These are
addresses on your private network, and are not allowed to be
returned for public internet names. Any occurrence of such
addresses are removed from DNS answers. Additionally, the DNSSEC
validator may mark the answers bogus. This protects against
so-called DNS RebindingAnd for dns blacklists you can exempt their domains from these rules.
The thing I’m most disappointed with is that because we’ve been so lax about 127.0.0.1 and it’s usage, it’s become a means of different applications to blackhole requests suchas ad-blocking networks.
Better than that though, are the applications that are using localhost resolution from public names to communicate with local versions of their applications from the browser.
The sad thing, is that because of these we can’t just make a simple resolution policy. The one I would like to be true is that only localhost names can resolve to localhost (this doesn’t require any remote resolution), and that you must whitelist private domains for private address spaces (e.g. 10/8). For localhost it’s a very simple area in resolution code to drop RData with 127.0.0.1, private address spaces would need a little more but still easy to identify when to apply it.
For now it seems that we have to rely on applications to do a better job of using things like TLS to validate the endpoints to which they are connecting and verifying that the IP is in the expected scope.
There are many simple solutions (force auth, xsrf token) and it is mind-boggling that these mitigations are not considered standard-issue in the space.
---
We originally rejected the bounty report because:
* We always recommend people communicate with Geth via IPC, not HTTP. The APIs are too powerful for public access: even if noone can steal your Ether, they can exhaust all your local resources via eth_call for example. Our suggestion is to always run a custom proxy that properly rate limits and authenticates outside users vs. running an HTTP server inside Geth. CORS is a protection that always depends on browsers correctly enforcing it, which have been circumvented multiple times, so it's not a good enough security measure. * For a very long time now, we considered unlocking an account a dangerous operation recommended only to power users who can properly protect their setup. Mist and other applications transact via API endpoints that do not unlock accounts, so unless a user explicitly manually unlocks their account, they should be fine.
That being said... even though we consider the attack vector fairly convoluted and would require a lot of bad user practices to pull off; we agreed that if we can do anything meaningful to prevent it, then we should most definitely do that. For that reason we introduced the `--rpcvhosts` flag which is similar to CORS, but checks the requests origin via different means, and rejects DNS rebound HTTP actions server side.
As for the original report, although we rejected the bounty request initially, we agreed that it should be rewarded with a low-impact value since we did make a software modification based on the report. Unfortunately this bounty decision is waiting for approval since the 5th of February. Not sure why it got stuck in the pipeline, we apologize for the delay.
Sounds like a normal DNS rebind, nothing that is strictly a problem of ethereum.
Routers have had the same exact problem for years and it's been partially solved by filtering DNS answers on their side.
The easiest solution, of course, would be that browsers consider the origin of any domain pointing to 127.0.0.1 different to localhost itself. Or something in that postcode/general direction.
I do think that Ethereum ought to authenticate it's JSON-RPC service, but not because of DNS rebinding.
Not so with many other firmwares.