Pages:
Author

Topic: Nxt source code flaw reports - page 22. (Read 113369 times)

legendary
Activity: 1181
Merit: 1002
January 12, 2014, 02:24:10 PM
@theKnownUnknown: come on, "not" (0 bit) is not the same as "only part" (64bit) - continue and try to get the 100k bounty!

@ricot: Great work Rico!

@everybody else: I'm trying to brute-force the remaining sha256-hashes that BCNext provided, think it's easier than learning java and becoming a crypto-genius. Anybody interested in creating a mining pool for this?
okay, okay, just kidding here  Grin
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 01:45:23 PM
Isn't it what I mentioned some time ago? Not in such detail, but this is the flaw that I meant. Here my own quotes:

Is it one of the flaws that blocks do not contain the hashcode of their previous block?

Block class does not contain hashcode of previous block, only block id and pushBlock() does not check anything into this direction. Isn't it possible to modify old blocks afterwards (By the original author of the block)?

Ur guess was based on decompilation of new binaries.

NB: Some guys mentioned that they would just decompile 0.4.7e binaries and compare the source codes to find the flaws. As a countermeasure against such the trick u still must explain why there is a flaw.
newbie
Activity: 16
Merit: 0
January 12, 2014, 01:09:17 PM
You just need to cause a collission of the block ID, which is 64bit.

Critical flaw description:
Code:
Only 64 bits of the previous block hash are used. This gives ability to inject blocks with another set of transactions.

SHA256-hash:
Code:
888f278c773d39b8334a651d84ee78871bd0e5d45e09be8fdb190ba1b2969530

Looks legit. Where to send 10K to?

Isn't it what I mentioned some time ago? Not in such detail, but this is the flaw that I meant. Here my own quotes:

Is it one of the flaws that blocks do not contain the hashcode of their previous block?

Block class does not contain hashcode of previous block, only block id and pushBlock() does not check anything into this direction. Isn't it possible to modify old blocks afterwards (By the original author of the block)?
full member
Activity: 126
Merit: 100
January 12, 2014, 12:36:51 PM
You just need to cause a collission of the block ID, which is 64bit.

Critical flaw description:
Code:
Only 64 bits of the previous block hash are used. This gives ability to inject blocks with another set of transactions.

SHA256-hash:
Code:
888f278c773d39b8334a651d84ee78871bd0e5d45e09be8fdb190ba1b2969530

Looks legit. Where to send 10K to?
grats ricot!! Smiley
newbie
Activity: 56
Merit: 0
January 12, 2014, 12:14:54 PM
*rofl* (Why is there no rofl smiley here???)
That one was really too obvious... I thought about that ages ago and then I thought: Well, that's still quite a lot of computational power you'd need...

Address is in the sig.
Thanks!
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 12:03:52 PM
So I guess it's time for another hint regarding the serious or fatal flaw, because they were not discussed in this topic before, right?  Grin

Here is the hint:

Fatal flaw wasn't discussed yet. Not sure about the serious one.
newbie
Activity: 50
Merit: 0
January 12, 2014, 11:59:21 AM
LOL, this was too obvious to find.  Grin

All flaws r obvious. This was the best way to hide them. Grin

So I guess it's time for another hint regarding the serious or fatal flaw, because they were not discussed in this topic before, right?  Grin
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 11:57:21 AM
LOL, this was too obvious to find.  Grin

All flaws r obvious. This was the best way to hide them. Grin
hero member
Activity: 910
Merit: 1000
January 12, 2014, 11:56:31 AM
 Smiley
newbie
Activity: 50
Merit: 0
January 12, 2014, 11:55:40 AM
You just need to cause a collission of the block ID, which is 64bit.

Critical flaw description:
Code:
Only 64 bits of the previous block hash are used. This gives ability to inject blocks with another set of transactions.

SHA256-hash:
Code:
888f278c773d39b8334a651d84ee78871bd0e5d45e09be8fdb190ba1b2969530

Looks legit. Where to send 10K to?

LOL, this was too obvious to find.  Grin
sr. member
Activity: 602
Merit: 268
Internet of Value
January 12, 2014, 11:55:21 AM
You just need to cause a collission of the block ID, which is 64bit.

Critical flaw description:
Code:
Only 64 bits of the previous block hash are used. This gives ability to inject blocks with another set of transactions.

SHA256-hash:
Code:
888f278c773d39b8334a651d84ee78871bd0e5d45e09be8fdb190ba1b2969530

Looks legit. Where to send 10K to?


Congrat ricot. Excellent work.
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 11:47:35 AM
You just need to cause a collission of the block ID, which is 64bit.

Critical flaw description:
Code:
Only 64 bits of the previous block hash are used. This gives ability to inject blocks with another set of transactions.

SHA256-hash:
Code:
888f278c773d39b8334a651d84ee78871bd0e5d45e09be8fdb190ba1b2969530

Looks legit. Where to send 10K to?
newbie
Activity: 56
Merit: 0
January 12, 2014, 11:37:18 AM
Regarding the flaws. They assume that an adversary can build ASICs (which is quite possible) or use a lot of GPUs that used to mine bitcoins and now r not used.

Like magically being able to modify blocks while maintaining hashes and sending these modified blocks to the network.


256-bit is still unbreakable.

You just need to cause a collission of the block ID, which is 64bit.
So if you want to inject a block with a certain transaction somewhere within the last 720 blocks, here's how you do it:
You need a block that you generated, otherwise it's hard to modify.
You add your transaction to that block, the block ID (64bit will change).
To get th correct block ID, you just have to change some parameter in the block that doesn't really matter, e.g. the deadline for your transaction, that you just added.
You do that on an ASIC/GPU. You need a 64bit collission, that's not that hard.
When you have your block, you wait until someone calls you to update his blockchain.
You tell him, that you have a great cumulative difficulty. He'll want to confirm your last common block.
You tell him that your last common block is the one before the modified one. He'll believe you, he doesn't check anything.
When he asks you for the blocks, you send him your modified block. It perfectly fits on the common block, so he'll add it.
Next you send the normal chain, that will also fit perfectly because no ID changed. (You have to make sure, that by moving money around you don't keep someone from being able to generate a block that has already been generated)
You replay the current blockchain until you're at the level that the client was before.
The client will check the cumulated difficulty, which is equal to what he had before, so he'll accept it.
Now we have 2 slightly different blockchains, with different amounts of NXT in the wallets but that look the same in all operations. Because when getting a blockchain, you just check the IDs.

Did you mean that thing as a possible attack vector? Wink

[edit]
How to avoid the whole thing:
Also check the 256bit signatures before accepting stuff. Wink

[edit2]
As for 64bit collission generation: You've got nearly a day to calculate a collission with the rate that blocks are moving at the moment.

[edit3]
If you say the 16bit deadline isn't enough freedom to generate a fitting hash: Just add 3 transactions of 1 NXT to yourself, so you have 3*16bit more freedom. Wink
There are tons of ways to do it, since the payloadHash is part of the block ID.
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 10:38:10 AM
Regarding the flaws. They assume that an adversary can build ASICs (which is quite possible) or use a lot of GPUs that used to mine bitcoins and now r not used.

Like magically being able to modify blocks while maintaining hashes and sending these modified blocks to the network.


256-bit is still unbreakable.
legendary
Activity: 1176
Merit: 1134
January 12, 2014, 10:02:06 AM
Regarding the flaws. They assume that an adversary can build ASICs (which is quite possible) or use a lot of GPUs that used to mine bitcoins and now r not used.

Like magically being able to modify blocks while maintaining hashes and sending these modified blocks to the network.
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 05:09:04 AM
Regarding the flaws. They assume that an adversary can build ASICs (which is quite possible) or use a lot of GPUs that used to mine bitcoins and now r not used.
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 05:06:47 AM
if my understand is right, that's why minus all the receptions in last block, right?

Right
newbie
Activity: 26
Merit: 0
January 12, 2014, 04:11:12 AM
I think this is a flaw

This is not one of the injected flaws.

PS: getEffectiveBalance algo will be changed in one of the next versions. It still would be interesting to see some math that assess chance of a successful attack.
Yes math is more convincing. Fine. let's keep digging. if my understand is right, that's why minus all the receptions in last block, right? or there are some other concerns
legendary
Activity: 2142
Merit: 1010
Newbie
January 12, 2014, 04:01:16 AM
I think this is a flaw

This is not one of the injected flaws.

PS: getEffectiveBalance algo will be changed in one of the next versions. It still would be interesting to see some math that assess chance of a successful attack.
newbie
Activity: 26
Merit: 0
January 12, 2014, 03:51:35 AM
In getEffectiveBalance()
Code:
if (height == 0) {

return (int)(balance / 100);

}

for GENESIS accounts(stackholder), not minus the last block recipient amounts like other 'normal' account
Code:
for (long transactionId : Block.getLastBlock().transactions) {

Transaction transaction = transactions.get(transactionId);
if (transaction.recipient == id) {

amount += transaction.amount;

}

}

return (int)(balance / 100) - amount;
this can leave a chance to genesis accounts to control which one can forge next block.
e.g.
account A has millions of nxt and knows he has a high chance to forge next block B1 by compute his target and compare with his hit
then he can make a transaction immediatly to a 'cooperate' genesis account, maybe choose best one with lowest hit to generate next block B2 after B1.

How can he do that? because account A is B1's generator, and B1 is legit. So A knows B1's generationSig before B1 is confirmed by others,  which can be used to calc next hit with account's secretPhrase, now A have the future hits for his every cooperate genesis account, and just choose the genesis account with the smallest hit, and make a transaction to send his huge nxt to this genesis account. this transaction will be included in B1
After B1 is confirmed by network, the chose one genesis account get his effectbalance which contains all the nxt sent by A just few minutes ago. and generate the next block B2 with a very high possibility.

what's worse is that, once u can predict the next block's generator, u can diverge the block chain by generate twins of B1->B2, let's say them T1->T2 in which u delete one transaction of yours. And both two chains are legit, u can release one(let's say it's B1->B2) with lower cumulativeDifficulty first util the transaction in B1 are confirmed, and release the other one later to override the first one. by doing this, u can revoke your transaction, just like u buy something, pay, and get your money back later!

I think this is a flaw
Pages:
Jump to: