spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.24k stars 3.03k forks source link

Password protect the JSONRPC interface #3374

Closed ghost closed 6 years ago

ghost commented 6 years ago

The JSONRPC interface is currently completely unprotected, I believe it should be a priority to add at least some form of password protection.

Scans for the JSONRPC interface of Ethereum wallets have already started: https://www.bleepingcomputer.com/news/security/theres-some-intense-web-scans-going-on-for-bitcoin-and-ethereum-wallets/

anacondabitch commented 6 years ago

my question: is it safe to type password (passphrase) with bare keyboard or use windows virtual keyboard

dariusc93 commented 6 years ago

@anacondabitch if you believe there is a keylogger on your computer, using the virtual keyboard should help.

anacondabitch commented 6 years ago

@allanhorwitz no its an attack

zatricky commented 6 years ago

Is there a CVE id for this? Distros typically don't know packages need to be updated without one.

nwsm commented 6 years ago

Even with the fix in place, any wallets that were already compromised (but possibly not taken advantage of yet) are still compromised and should be replaced, correct?

ecdsa commented 6 years ago

@zatricky I just submitted one

mautematico commented 6 years ago

@nwsm correct.

If you have any reason to suspect your wallet has been compromised, you shall create a new one (with different seeds), put a passphrase on it and transfer your coins from old compromised wallet to new one.

loshchil commented 6 years ago

there must some sort of internal communication system so that every user will get announcements about critical vulnerabilities like the one described in this thread otherwise, it is very irresponsible to believe that the users under risk (the ones who didn't encrypt their wallets) are familiar with github && check reddit/twitter news during NY vacations.

mautematico commented 6 years ago

@loshchil it is irresponsible itself if a user decides not to encrypt their wallets. Also, users don't need to be familiar with github or anything else. They just need to keep their software up-to-date.

However, I agree that we need a proper way to let users know there are critical bugs. Are you able to come up with a solution and propose it in a PR?

loshchil commented 6 years ago

@mautematico

They just need to keep their software up-to-date.

The current situation we are in is a good example that the above-mentioned view is hard to defend if user's security is taken into account. More specifically, a few moments after the vulnerability appeared on github, a ton of responsible users who used the most recent version so far have become targets to trivial exploits (i.e., hundreds or thousands of hackers are qualified to implement them) which could allow to hack wallets with or without brute-forcing their passwords.

I appreciate your proposal to come with a solution and a PR. However, I will limit my contribution to this reply here.

My proposal would be to i) Make Electrum regularly check whether a more recent version is available. ii) Modify Electrum main window title/caption "Electrum x.y.z" to "Electrum x.y.z TEXT", where TEXT depends on the situation we are in. For instance, it can be empty, "(is not safe to use)", "(outdated but does not have known vulnerabilities)", "(outdated and has known vulnerabilities)" iii) Update Electrum.org to have a section where known vulnerabilities are described version-wise and a set of best practices to deal with them is presented.

ghost commented 6 years ago

@attritionorg, invalid reference, because that bug i submitted is not by any means related to this issue, if you had properly read and understood the bug report you would understand that, but youre probably too busy sending people boxes of feces to care

msadar commented 6 years ago

@ecdsa

what if I never access to the previous version and deleted the wallet software? which means keeping as cold storage?

leonklingele commented 6 years ago

@msadar you were only susceptible to an attack while Electrum was running and your wallet unlocked. Nevertheless, as it is unknown whether the bug has been exploited, it might be worth to create a new cold wallet / Electrum wallet, encrypt it, and transfer your funds to it.

AngelTs commented 6 years ago

It is an excellent example why you should use only the ported version: because the ported version (even with bug(s)) in most cases is used for a very short time (set cd/usb stick, do stuff, then remove it), while installed version is very probably to works all time!

zatricky commented 6 years ago

@ecdsa re CVE id, is there a place where we will know it has been issued? Or will you be posting it here when it has been issued?

ecdsa commented 6 years ago

@zatricky you can check https://docs.google.com/spreadsheets/d/1PlDOsZ4Q36JU4Dz9zyBB2F3814dScppCRCe1muCT7JI/edit#gid=1009122160

attritionorg commented 6 years ago

That sheet is for assignments requested via DWF, a CNA that handles some open source software. If you request via the form on MITRE's web site, you won't be able to look it up until it is published, or the requesting party receives the assignment and posts it here.

petterreinholdtsen commented 6 years ago

Hi. Do you need help getting a CVE assigned, or is the process already in progress? I could ask the Debian security team for one, if it is useful.

ecdsa commented 6 years ago

@petterreinholdtsen I filled the form on MITRE, and my request is listed on the document linked above. Is there something else I need to do? I am not familiar with the process.

petterreinholdtsen commented 6 years ago

I'm not sure either, but have no better suggestion. I asked on #debian-security and it seem to be the recommended approach based on the feedback there.

carnil commented 6 years ago

The assigned CVE for this issue looks to be CVE-2018-1000022

attritionorg commented 6 years ago

@carnil have a reference for that? CVE-2018-6353 was assigned and opened:

http://cve.mitre.org/cgi-bin/cvename.cgi?name=2018-6353

mithrandi commented 6 years ago

CVE-2018-6353 is for #3678, a different issue.

carnil commented 6 years ago

@attritionorg: it was apparently assigned by DWF project. I got that confirmation by MITRE, since I stumpled over the CVE when I was investigating CVE-2018-6353, which mentioned "a different vulnerability than CVE-2018-1000022". I queried about this MITRE, who confirmed that DWF has assigned the CVE (but not yet published back?).

As @mithrandi stated the CVE-2018-6353 is for #3678, whereas CVE-2018-1000022 is for #3374

mautematico commented 6 years ago

Someone could please delete file posted by @Ruethairat?