Pages:
Author

Topic: Bitcoin Signed Binaries - page 2. (Read 5411 times)

legendary
Activity: 916
Merit: 1003
September 26, 2012, 03:05:59 PM
#32
Bitcoin is an open-source project.  Build the client yourself from source to guarantee you don't run a compromised executable.

That's the whole point of open source.

Not a guarantee

Well OK.  I meant you actually *read* the code before building it.
kjj
legendary
Activity: 1302
Merit: 1026
September 26, 2012, 02:51:40 PM
#31
Bitcoin is an open-source project.  Build the client yourself from source to guarantee you don't run a compromised executable.

That's the whole point of open source.

Not a guarantee
legendary
Activity: 916
Merit: 1003
September 26, 2012, 02:11:41 PM
#30
Bitcoin is an open-source project.  Build the client yourself from source to guarantee you don't run a compromised executable.

That's the whole point of open source.
legendary
Activity: 1526
Merit: 1129
September 26, 2012, 02:06:44 PM
#29
Agree with Mike, just one quibble - the main usage of PE signatures today is so anti-virus systems can automatically learn reputation. Having a binary signed by a "good" organization that has lots of installs and few/no reports of being a virus means even if the executable/DLL is brand new, it'll be left alone. It also helps AV engines detect modified system libraries. For this reason it's really helpful to let Bitcoin develop a good reputation - it'll reduce AV FPs.

A tool to strip the signatures from EXEs is probably already in existence, if not it'd be easy to write (for either windows or linux, though don't we already depend on Wine?).
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
September 26, 2012, 01:06:07 PM
#28
One additional idea for thrustworthyness, could we compute the hash in the binary (a hash of itself during startup) and compare that agains the reference-hash, which resides on the download server or is stored where it can't be manipulated (no master plan for this though) and warn the user or block program usage, when the hashes don't match? I have to admit I never checked the hash of bitcoin-qt.exe btw. ^^ and I would love if I could easily ensure I have a valid and official binary.

Dia

Problem is that someone who modifies a binary to be malicious will just as easily modify the self-test to falsely report success.

The only self-testing that's really sensible is for the currently installed version to acquire and verify the next version you're about to install to replace it.  The way I see it, this would actually be a strong defense against a whole lot of potential fake-client attack avenues.
hero member
Activity: 769
Merit: 500
September 26, 2012, 10:25:36 AM
#27
One additional idea for thrustworthyness, could we compute the hash in the binary (a hash of itself during startup) and compare that agains the reference-hash, which resides on the download server or is stored where it can't be manipulated (no master plan for this though) and warn the user or block program usage, when the hashes don't match? I have to admit I never checked the hash of bitcoin-qt.exe btw. ^^ and I would love if I could easily ensure I have a valid and official binary.

Dia
legendary
Activity: 1072
Merit: 1181
September 26, 2012, 07:12:16 AM
#26
Simply eliminate the bytes belonging to the signature field from comparison.  Adding a signature, according to a cursory Google search, simply fills in a pre-allocated signature field inside the executable in a location that can be found deterministically from the executable file headers.  When Microsoft hashes the file for the purpose of signature validation, this field is located and excluded from the hash calculation by design, so a signed binary will hash the same as an unsigned one for their signing purposes.  The build process could do the same.  Then it could automatically confirm that the same binary (minus the signature) was signed by everyone, and then you'd have great security.

Sounds like it's relatively easy to add/remove such a signature from a binary, so it could be done after the gitian building step, and still be verifiable. I'm all in favor of signing released binaries if it helps making Bitcoin trustworthy. I'm totally oblivious about the process to achieve that for Windows binaries, though.
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
September 26, 2012, 02:22:50 AM
#25
I think you missed a key point, pun intended.  The build process demands that multiple people all produce exactly the same binary file, bit for bit.  The only way to do this is to have multiple people with the same private signing key, which is bad security, and had certainly better be grounds for revocation of the signing certificate.

This is a build process that can be changed as needs arise, right?

Simply eliminate the bytes belonging to the signature field from comparison.  Adding a signature, according to a cursory Google search, simply fills in a pre-allocated signature field inside the executable in a location that can be found deterministically from the executable file headers.  When Microsoft hashes the file for the purpose of signature validation, this field is located and excluded from the hash calculation by design, so a signed binary will hash the same as an unsigned one for their signing purposes.  The build process could do the same.  Then it could automatically confirm that the same binary (minus the signature) was signed by everyone, and then you'd have great security.
kjj
legendary
Activity: 1302
Merit: 1026
September 26, 2012, 01:12:12 AM
#24
If the objective is to sign the binaries in a Windows-favored style just so that it's signed for the sake of shutting up the OS about untrusted software, just one person doing the signature will accomplish the objective.  That person can just as well sign with a personal (rather than organizational) signature.  Until Windows makes any distinction between once-signed and multiply-signed binaries, the practical difference is moot.  Mac OS X likely falls under the same umbrella.  Multiple PGP signatures can and ought to be checked by those able to do so.

I might point out that someone downloading an update is far more in a position to be scammed than someone downloading the client for the first time, since the updater is far more likely to own coins.  Therefore, I would submit including an automated update mechanism in the client with authentication built in would be the most effective mechanism to bring secure client downloads to bitcoin users.

I believe that Windows binary signing is meant to make sure that code can be connected with a real person or organization.  It wasn't designed to be a technical based control against all rogue code, it's meant to be a legal/social one (where someone who signs something harmful can be identified and held accountable - as well as the certificate revoked - and therefore has an incentive not to abuse it).

I think you missed a key point, pun intended.  The build process demands that multiple people all produce exactly the same binary file, bit for bit.  The only way to do this is to have multiple people with the same private signing key, which is bad security, and had certainly better be grounds for revocation of the signing certificate.

You are somewhat right about the technical control / legal control aspect, but it turns out that whatever the intention was, lots of things treat binaries differently based on the validity of the signature.
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
September 26, 2012, 01:04:04 AM
#23
If the objective is to sign the binaries in a Windows-favored style just so that it's signed for the sake of shutting up the OS about untrusted software, just one person doing the signature will accomplish the objective.  That person can just as well sign with a personal (rather than organizational) signature.  Until Windows makes any distinction between once-signed and multiply-signed binaries, the practical difference is moot.  Mac OS X likely falls under the same umbrella.  Multiple PGP signatures can and ought to be checked by those able to do so.

I might point out that someone downloading an update is far more in a position to be scammed than someone downloading the client for the first time, since the updater is far more likely to own coins.  Therefore, I would submit including an automated update mechanism in the client with authentication built in would be the most effective mechanism to bring secure client downloads to bitcoin users.

I believe that Windows binary signing is meant to make sure that code can be connected with a real person or organization.  It wasn't designed to be a technical based control against all rogue code, it's meant to be a legal/social one (where someone who signs something harmful can be identified and held accountable - as well as the certificate revoked - and therefore has an incentive not to abuse it).
kjj
legendary
Activity: 1302
Merit: 1026
September 26, 2012, 12:37:37 AM
#22
It's been over a year since this thread was touched. I was just looking at my system with Process Explorer and out of the 62 processes, only 3 are not signed. One of them is Bitcoin-qt. Is there any downside to signing? I always verify with Gavin's signature and I trust that keychain more than I would one issued by a centralized authority... We all know what has happened to SSL CAs. Is this the argument?

Matt hit it.  (And Maged beat me to it, but I think I explain more.)

On code signing:
This one is a bit more difficult.  Because Bitcoin will be built deterministically, we have two options.  A. send the code signing private key around to all the devs for that to be a part of the building process (this is even harder as the building happens on Linux via the MinGW cross compiler) or B. find a way to strip out the code signing certificate in the download script and then check the stripped version instead of the signed version.  I googled this pretty quick and saw no simple CLI program which will do this, but I might have missed something as I didnt spend too much time on it.  If anyone finds something, please tell me. 

Bitcoin-qt isn't built in Windows, it is cross-compiled from a Linux.  Even worse, the build process is totally scripted inside a Linux virtual machine.  There are several people that build the binaries in this way, and then they compute hashes on the outputs.  The official releases only get posted after a bunch of people have all built exactly the same files, as verified by the hashes.

To get signed Windows binaries, we would need to distribute the signing key to everyone that builds the releases, which would be bad.  Also, I'm guessing here, but I bet that Microsoft's policies for accepting CA certs for code signing require that the CA have policies that prevent distribution of the keys they hand out.

Phew, I managed to get all of the way through a PKI post without going off onto a tangent about how the current CA scheme used by SSL and everything else is absolutely and totally fucked and broken.  Er, almost.
legendary
Activity: 1204
Merit: 1015
September 26, 2012, 12:31:00 AM
#21
Is there any downside to signing?
As Matt said...
On code signing:
This one is a bit more difficult.  Because Bitcoin will be built deterministically, we have two options.  A. send the code signing private key around to all the devs for that to be a part of the building process (this is even harder as the building happens on Linux via the MinGW cross compiler) or B. find a way to strip out the code signing certificate in the download script and then check the stripped version instead of the signed version.  I googled this pretty quick and saw no simple CLI program which will do this, but I might have missed something as I didnt spend too much time on it.  If anyone finds something, please tell me. 
As you can see, that's a pretty big downside.
hero member
Activity: 900
Merit: 1014
advocate of a cryptographic attack on the globe
September 25, 2012, 10:42:14 PM
#20
It's been over a year since this thread was touched. I was just looking at my system with Process Explorer and out of the 62 processes, only 3 are not signed. One of them is Bitcoin-qt. Is there any downside to signing? I always verify with Gavin's signature and I trust that keychain more than I would one issued by a centralized authority... We all know what has happened to SSL CAs. Is this the argument?
ene
newbie
Activity: 42
Merit: 0
May 30, 2011, 09:14:28 PM
#19
As long as the process of getting the binaries is secure.

You missed the point.  Roll Eyes
I did? You can make updating secure such that other risks are higher than the update risk.

They're different kinds of risk. If the auto-update has a vulnerability, somebody could steal the private keys of tens of thousands of users in a matter of minutes. If the client software has some other vulnerability, then depending on the nature of it, it will be more or less dangerous than what I just mentioned. Probably less.
newbie
Activity: 20
Merit: 0
May 30, 2011, 07:30:55 PM
#18
The compiler should use ProPolice or /GS in case of M$
member
Activity: 105
Merit: 10
May 30, 2011, 06:50:45 PM
#17
May I suggest another thread for the auto-update debate?
member
Activity: 224
Merit: 10
May 30, 2011, 06:35:33 PM
#16
As long as the process of getting the binaries is secure.

You missed the point.  Roll Eyes
I did? You can make updating secure such that other risks are higher than the update risk.
ene
newbie
Activity: 42
Merit: 0
May 30, 2011, 06:32:24 PM
#15
As long as the process of getting the binaries is secure.

You missed the point.  Roll Eyes
member
Activity: 224
Merit: 10
May 30, 2011, 06:27:42 PM
#14

auto-update = super bad idea. if a attacker can compromise the script, he can make tons of rouge clients.
Wouldn't it be more risky NOT having an auto-update? As long as the process of getting the binaries is secure. I'm thinking from the point of view that there could be exploits in the network or old versions where you want people to update to protect themselves. People are notorious for not upgrading and what if we need them too to prevent an attack on the network? Newer web browsers seem to do it to enhance security so why wouldn't that be the case for bitcoin?
hero member
Activity: 755
Merit: 515
May 30, 2011, 06:01:23 PM
#13
auto-update = super bad idea. if a attacker can compromise the script, he can make tons of rouge clients.
Obviously we aren't going to blindly auto-update, there will be a user-prompt.  Also, the binaries are signed by multiple developers meaning you would have to compromise the pgp private keys of several developers.  If you think an attacker will try to compromise the download script, well how is that any different from compromising the current downloads?  You would have to compromise sourceforge, so it wouldn't make a difference.  If you think the script itself might be trickable into downloading without having enough signatures, then I ask you to look it over yourself https://github.com/devrandom/gitian-builder/blob/updater/share/gitian-updater
Pages:
Jump to: