Google-apper
Hovedmeny

Post a Comment On: Ken Shirriff's blog

"The Bitcoin malleability attack graphed hour by hour"

23 Comments -

1 – 23 of 23
Anonymous Anonymous said...

You are an "evil genius", Ken. For the record, I understand that some Bitcoin fanatics despise you -- because you keep yanking the covers off their magical little world and exposing the innards. And as you've demonstrated, the innards are a bit dodgy.

This attack was rumored to be run by some Russian hackers for "lulz", using a "known vulnerability" - known to very few people. It caused quite a stir.

http://siliconangle.com/blog/2014/02/12/bitcoin-weekly-2014-february-12-bitcoin-wide-transaction-malleability-attack-apple-blocks-bitcoin-wallets-fiverr-accepts-btc-and-more/

http://www.informationweek.com/security/attacks-and-breaches/bitcoin-exchanges-buckle-under-ddos-attacks/d/d-id/1113809

http://www.forbes.com/sites/andygreenberg/2014/02/13/silk-road-2-0-hacked-using-bitcoin-bug-all-its-funds-stolen/

February 15, 2014 at 1:30 AM

Anonymous Anonymous said...

I'm not so sure Bitcoin fanatics despise Ken. He's incredibly informative and unbiased. His views on Bitcoin are not negative, either. I think you might be projecting or imagining things.


Wonderful content, please keep it coming!

February 15, 2014 at 11:07 AM

Anonymous Anonymous said...

Why do you think Bitcoiners despise Ken? Quite to the contrary, every single Bitcoin supporter I know (including myself) think his blog posts are awesome!

There's been a dearth of good information on the Bitcoin protocol available on this low level, and many of us are totally eating it up.

Keep it up, Ken! I've been passing your links around to all the engineers and devs interested in Bitcoin that I know.

February 15, 2014 at 12:08 PM

Anonymous Anonymous said...

Changing the script would invalidate the signature, no?

February 15, 2014 at 12:22 PM

Anonymous Peter Todd said...

Did you only look for PUSHDATA2, or did you look for any instance of a PUSHDATA where the shortest possible encoding was not used? If you didn't do the latter, you probably have missed some examples of malleability.

Secondly the two "weird" transactions you mentioned are perfectly valid, if non-standard, transactions. The first, with OP_RETURN, was simply spending a odd P2SH output that does nothing other than pushing a large string to the stack. The second is a valid multisig output, and can be spent by providing 14 signatures with the "correct horse" pubkey.

February 15, 2014 at 12:40 PM

Anonymous Anonymous said...

"Since the OP_PUSHDATA2 attack didn't start until Feb 9, this attack can't be responsible for the Feb 7 problems. One possibility is there was a different type of malleability attack that affected Mt.Gox."

I read somewhere it's also possible to malleate a tx by changing the represantional form of the signature.

February 15, 2014 at 12:43 PM

Anonymous Anonymous said...

Inside Job IMHO

February 15, 2014 at 1:25 PM

Blogger Ken Shirriff said...

Peter Todd: following your suggestion, I also looked for OP_PUSHDATA1 and OP_PUSHDATA4. I found a small number of unnecessary uses of OP_PUSHDATA1 for bulk deposits to (vanity?) address 1KiTTY2sRjPRdobHdNTzBVv7rBiNG1tX2E, but it doesn't look like malleability.

If the "correct horse" transaction I found earlier is valid, then I guess .022 BTC are up for grabs.

February 15, 2014 at 4:00 PM

Blogger Unknown said...

This Bitcoin culture is a hacker culture. We value accurate information openly and honestly presented. Where there are flaws, we want them discussed and, hopefully, fixed. We know that Bitcoin is an ongoing experiment. Ken represents the best of that culture.

Suggested edit: "Up to 25% of the RECORDED transactions" I assume that more than 25% of the transactions could have been modified, but it some cases the original transaction was recorded, not the modified one. Does anyone have an idea how many modified transactions were injected in to the network?

February 15, 2014 at 4:31 PM

Anonymous Anonymous said...

Peter Todd: I'm not sure but There are actually 20 public keys for correct horse listed but only 14 pushed into the stack. Is that still a valid transaction? If it is I must have been doing something wrong...

February 15, 2014 at 7:54 PM

Anonymous Anonymous said...

This guy also warned of the attack scheme, but not much attention was paid it seems i_think_i_may_have_caused_the_bitcoin_attack

February 15, 2014 at 9:23 PM

Blogger Wladimir said...

An actual insightful, useful analysis of what happened. Well done! Of course it got buried under all the sensationalist crap on Reddit.

Nice observation that the malleability abuse DOS only started *after* MtGox discovered having problems. I remember someone on reddit asking for a 'malleability bot' shortly after the MtGox press release, so it's likely multiple people got the same idea at the same time.

And indeed: the type of malleability used 'against' MtGox was different. Their software was creating transactions with extra padding in the DER encoding of the signatures (#2 in https://gist.github.com/sipa/8907691). 0.8.0 added canonization rules to forbid these to restrict malleability. So all the 'attackers' did was remove this extra padding and their version of the transaction was accepted. No need for pushdata mutations.

February 16, 2014 at 1:05 AM

Anonymous Anonymous said...

Ken can you look for all transactions that _don't_ use PUSHDATA? You should be able to set up a pretty good regex to find every "odd" transaction.

February 16, 2014 at 1:43 AM

Anonymous Anonymous said...

Blockchain.info displays non-standard scripts incorrectly in many cases. If you use bitcoind decoderawtransaction you'll see the script does have "20" in the right places. The 0.022BTC are up for grabs, along with a few other non-standards - just a little encouragement to those new to cryptocurrencies to dig under the surface and learn.

February 16, 2014 at 6:51 AM

Blogger Ken Shirriff said...

Anonymous: I also scanned for "odd" transactions in the blockchain. There are roughly a zillion of them, in a huge variety. It's hard to conclude anything except people do a lot of crazy stuff with the Bitcoin protocol.

February 16, 2014 at 9:11 AM

Blogger Unknown said...

Hi Ken. This is really interesting, although I don't really have the knowledge to fully understand it all. The question I'm left with is: Can you figure out how much money Mt Gox was conned out of?

Thanks, Andy

February 20, 2014 at 8:05 AM

Blogger Ken Shirriff said...

Andy: I can't figure out what MtGox lost for two reasons. First, if signature malleability is their problem, the "bad" transactions will drop out of the system leaving only the "good" transactions, so there's nothing unusual to find in the blockchain. Second, I don't know what addresses MtGox uses.

MtGox transactions have failed often in the past due to a bunch of issues (missing fee, transactions too large, double spends) as well as invalid signatures. So it seems like there's a long history of faulty transactions.

February 21, 2014 at 8:46 AM

Blogger johnny said...

I can confirm the multisig transaction was in fact valid. As nobody else did until now, I just claimed it.. :-)

Here the tx I created to spend the multisig tx:

https://blockexplorer.com/rawtx/da738e29f64e90ae46dcc3e6b4154041d6324abbe7919e722d486a4a3148b7dc

February 23, 2014 at 12:59 PM

Anonymous Anonymous said...

Doesn't this analysis prove that Gox's/SR2's claim that this transaction malleability attack is bs? If you add up all the transactions that were malformed the total isn't anywhere near the 750k from Gox + whatever went "missing" some SR2

February 25, 2014 at 5:43 AM

Blogger shortrange said...

Mt Gox addresses are pretty well known. To determine the quantity of coin Mt Gox lost to tx ID malleability scan the chain for non-padded DER signature encoding originating from a Mt Gox on-line wallet address then look for recent txs with identical outputs from Mt Gox with padded DER encoded signatures. The BTC value in the output will be lost from the wallet.
If no duplicate is found then correlate the outputs with a refund in the Mt Gox internal transaction log.

March 23, 2014 at 9:52 PM

Blogger Unknown said...

Mr. Ken, you've explained the whole vague topic of malleability to me very smoothly. I'm actually conducting a research on the crash of Bitcoins and the factors responsible therein. as a conclusion i've to put up the probable solutions that could bring btc right back on track and make it a risk-free currency instead of a medium of internet vice.
i would really appreciate if you could state your suggestioms and recommendations to improve the working of BTC.

April 16, 2014 at 11:38 PM

Anonymous Anonymous said...

Hey Ken,
can you provide information where you got your data (especially for the graph) from? Thanks!

June 25, 2014 at 6:41 AM

Blogger Ken Shirriff said...

Anonymous: you asked where I got the data. I wrote a slow, hacky Python script to go through the blockchain data, parse the transactions, and look for OP_PUSHDATA2.

July 5, 2014 at 2:31 PM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot