start	end	text
0	6400	All right, everybody. Welcome. Thank you for attending my talk, Hacking Cryptocurrencies.
7040	11400	My name is Mark Nesbitt. I'm an application security engineer at Coinbase.
12380	16080	In the blockchain village at DEF CON, you all probably know Coinbase, but for those who may
16080	20280	be unfamiliar, Coinbase is a digital currency wallet and platform where merchants and consumers
20280	25600	can transact with cryptocurrency. Some of my recent priorities at my job have been security
25600	29740	support for systems that integrate with cryptocurrency networks, for instance, our hot
29740	35180	wallets. And second has been security assessments and mitigations for supported digital assets.
35180	38500	As you may know, Coinbase is adding a large number of assets to the platform,
38500	41860	and we review each and every one of them for its security qualities.
45120	48980	I'm going to have two main sections to this talk. First, I'm going to talk about what I mean by
48980	54000	hack when I say hacking cryptocurrencies. Second section, I'm going to talk about 51%
54000	57960	double spending attacks. I'm going to walk through some real world examples of this.
57960	61260	And then I'm going to talk about some observed patterns and characteristics of the attacks and
61260	66920	the attackers that we've been able to uncover. First, what do we mean by hack?
67980	72680	With every new technology, a new exploit vector is born. New processor developments,
72680	76180	like speculative execution or out of order execution, were exciting boosts to processor
76180	81140	speed and also enabled the famous specter and meltdown vulnerabilities. Blockchains are no
81140	84840	different. They represent a new technology, which means there are new ways to hack.
84840	89660	I'll explain one of them here. Most everyone here is likely familiar with the CIA framework for
89660	94880	security. C for confidentiality, I for integrity, and A for availability. Examining a system for
94880	98040	these three properties can give a great start into understanding the security and threats
98040	103960	against the system. I'll describe how 51% attacks work in a bit more detail. But for the time being,
103960	107800	it's important to realize that a cryptocurrency is a network of nodes that communicate to one
107800	111920	another according to a protocol. The nodes on the network store a copy of the blockchain,
111920	116160	which is a public shared database. And the network protocol allows nodes to communicate
116160	122340	state information about the blockchain. Nearly every blockchain has an authorization model based
122340	126980	on public key cryptography. The state of data in the blockchain can usually only be updated when
126980	130880	the proper digital signature is provided. An example of this would be sending bitcoins from
130880	136460	one person to another. The sender must authorize this state change by signing the send transaction.
136460	140700	A wallet is an example of software that performs this action, meaning that it's built on top of the
140700	145300	blockchain. Wallets hold private keys and can submit transactions to the blockchain. As you
145300	149120	could realize, because the blockchain is a shared public database, anyone can choose to build a
149120	153880	wallet application on top of a blockchain, so there are a wide variety of wallets. They have their own
153880	158700	CIA to examine. Many of the hacks you hear about in the media are a failure of confidentiality in
158700	163500	the parts of wallets. Peter mentioned that just a few minutes ago in his talk. If the private keys
163500	169340	are leaked, anyone can authorize transactions for actions controlled by those keys.
171600	175620	Another interesting wallet failure mode is integrity failure. Peter also mentioned this.
175620	179960	If an attacker can manipulate the recipient of a transaction prior to signing, there's no need for
179960	184440	the attacker to have access to the private keys. All of this is pretty standard application security
184440	188920	work. There's a lot of history in how to secure these types of systems. A large component of my
188920	192920	day-to-day work is doing that, ensuring confidentiality and integrity in these systems.
194000	198020	For completeness, I've given two examples of availability failure that might happen.
198020	201020	These aren't really hacks because the attackers don't really get the funds.
201580	205800	But this talk is not about wallets. I'm talking about hacking cryptocurrency itself,
205900	209040	a new vector. Let's see where the CIA framework can get us there.
210660	214660	I define the blockchain as a shared database. Thus, it's entirely transparent,
214660	220480	and there really isn't very much confidentiality. Jumping down to availability, this is also not
220480	225620	going to be a focus because it's not a huge concern for anyone except for the protocol designers.
225960	229080	These concerns matter. Concerns about the availability of blockchains have driven
229080	233480	much of what's known as the scaling debate. If protocol design makes the resources required
233480	238240	to run and participate in the network too expensive, it may impact the availability
238240	241380	of the information, which could have many negative impacts on the network.
243380	247740	Violating the integrity of a blockchain is what I want to talk about. It's a way to hack
247740	253360	cryptocurrency. The integrity has recently become a bigger focus across the industry.
256320	260060	As I mentioned before, I work for Coinbase, a major cryptocurrency exchange.
260520	265260	Exchanges make an ideal target for all kinds of attacks, but especially 51% attacks,
265260	270200	which I'll dive into in the second part. First off, exchanges hold a lot of cryptocurrency
270200	274280	on behalf of their customers. That's an obvious enough reason for them to be good targets.
274680	278260	There are other characteristics, though. For instance, liquidity and volume.
278260	282000	Being able to trade one cryptocurrency into a different one can be very advantageous to an
282000	287900	attacker. Speed. Exchanges often credit funds to attackers on a relatively short time frame
287900	292380	and allow for nearly instant sends. An attack could therefore happen very quickly.
293820	298460	Remote interaction. An attacker can execute many of these attacks from across the ocean,
298460	304480	perhaps from North Korea. And in some cases, anonymity. I want to take a second to talk about
304480	307940	this. Many popular media descriptions of cryptocurrency seem to describe it with some
308860	313440	magical anonymity qualities, which it doesn't have. This is especially true if you have an
313440	317560	authenticated session with an exchange such as Coinbase. Coinbase strives to be the most
317560	321040	trusted exchange in the entire cryptocurrency industry. And as part of that, we're heavily
321040	325120	regulated. And a large part of that regulation involves the lengths we go to ensure every
325120	329840	customer on our platform has gone through KYC, AML. KYC, know your customer, so we know their
329840	334100	identities. And that's important for AML, anti-money laundering. Any exchange that doesn't
334100	338780	have these strict requirements would obviously be more attractive to potential attackers.
339640	345660	So if you can find some sort of vulnerability, whether that's subverting a protocol or a more
345660	351800	traditional wallet-style vulnerability, as I described earlier, this makes an exchange a
351800	361250	great target. So 51% double spend attacks. As I mentioned before, a blockchain is a shared
361250	366170	database stored by all nodes on the network and accessible to anyone. For this database to be
366170	370490	useful, there must be a way to update it. Blockchains are append-only databases and are
370490	374870	updated in batches of transactions. Each batch of transactions that's added to the blockchain
374870	381430	is typically called a block. So you can visualize the blockchain like this with the expectation that
381530	386650	a block n plus one would shortly be added. But that raises a question. Who defines block n plus
386650	390630	one? The database is shared and distributed, so there must be some way of coming to consensus
390630	394950	among the network participants about what constitutes this block. The answer to this
394950	398690	question is it depends on the cryptocurrency. This is one of the major defining characteristics
398690	402130	of cryptocurrencies, and a lot of new cryptocurrencies have innovative methods
402130	408170	for adding to the blockchain. For instance, Ripple and Stellar have a concept of validator nodes that
408170	414230	use a voting consensus protocol to determine which transactions are in this block. EOS goes through
414230	418650	regular elections where these nodes are called block producers and they take turns defining the
418650	425330	block. Tezos and Cosmos, the node chosen is based on its stake. It's a proof-of-stake network and
425330	431810	stake is the proportion of network funds owned. Lastly, Bitcoin and Ethereum. The node that first
431810	437710	successfully solves a cryptographic puzzle defines the block. This is known as proof of work. It's
437710	441390	known as proof of work because the solution to the cryptographic puzzle has to be brute-forced,
441390	445970	which takes considerable computational effort. This is called mining. Mining a block is when a
445970	450890	node discovers the solution to the proof-of-work puzzle. Here's a key fact about proof-of-work
450890	456190	networks. Anyone can bring their computation to the table and if they produce a valid block, they
456190	460490	have extended the blockchain. Since this is a distributed and permissionless way of extending
460490	464870	the blockchain, it's possible that the network will encounter multiple versions of the blockchain.
465110	469510	To resolve these versions and reach consensus on a single version, the network deems the version
469510	475130	with the most work to be the canonical blockchain. I'll explain what I mean by that. This diagram
475130	479310	shows the blockchain tilted 90 degrees with the blocks separated. Block n plus one will be added
479310	484210	on top of the other blocks. As before, each block contains some number of transactions.
484890	490770	Suppose a node with its computational power solves the cryptographic puzzle, mines a block.
490830	494530	It broadcasts the block that solves this puzzle to the network and all transactions in the block
494530	498370	are added to the canonical history of transactions that is added to the blockchain.
499630	503550	But suppose the second block is found simultaneously. How does the network decide
503550	507970	which block contains the transactions that are to be added? The rule is that the nodes
507970	512410	on the network define the series of blocks with the most work as the canonical history.
512610	516310	So if either of the two blocks gets another block extending on top of it,
516310	520370	there will be more accumulated work on that branch, which makes it the canonical blockchain.
521890	525550	This means that there's never a case where a block is truly finalized on the chain.
525630	530530	If enough work decides to extend from a different block, once that branch has outworked the rest of
530530	535770	chain, it will be the canonical history. The situation on the slide is called a reorg,
535770	539730	short for reorganization, and the grayed out blocks are known as orphan blocks,
539730	546330	and they are not part of the blockchain. Let me repeat a key fact. Any actor that can outwork
546330	551470	the rest of the network is the sole arbiter of which, among all possible valid transactions,
551470	556110	are the ones that are added to the canonical history. So if there's any kind of network
556110	559330	instability where blocks were not always immediately shared with the network after
559330	563410	they were found, or if some actor was deliberately holding back blocks that had been discovered,
563410	566770	we could see something like what's shown on this slide, where the blocks on the left are hidden
566770	570790	from the network. But if they were shared and made public, the network would switch over to
570790	574390	these blocks and define them as the canonical chain, orphaning all the blocks that were
574390	580010	previously the most recent additions to the chain. Because of this potential for instability of the
580010	584850	most recent blocks, anyone receiving a transaction should wait for several blocks to be found after
584850	588690	the block that contained their transaction to lower the chance that the block containing their
588690	593710	transaction will be orphaned. An analogy that I found interesting is that the most recent blocks
593710	597970	are like recently fallen leaves in the fall. They can blow around and change and shift. After a while
597970	603210	they might get waterlogged and not move very much, and after even longer they'll decompose into mud,
603210	608450	clay, and eventually rock. You can adjust your risk by selecting the number of blocks
608450	612910	that you wait until you consider a transaction finalized. This is known as the confirmation
612910	617310	requirement, and each recipient of a transaction decides on their own level.
619540	623380	So imagine we had the following situation where Coinbase supports a fictional coin,
623380	630160	McCoin, abbreviated MUH. Suppose the confirmation requirement for MUH is three blocks.
630400	636360	Coinbase also supports BTC, Bitcoin, and MUH trading. Any customer of Coinbase could have the
636360	641720	following intention. Create a transaction T that sends coins from the customer's wallet to Coinbase.
641720	647120	Wait for three blocks, after which Coinbase will consider the transaction finalized, and Coinbase
647120	652820	will credit these funds to the customer's Coinbase account. Then the customer may want to sell the
652820	658140	MUH for BTC and then send the BTC wherever they like, off-site, off the platform. This is a
658140	664520	completely normal pattern of behavior for a customer to take. Let's imagine instead though
664520	669400	that the customer is actually an attacker. An attacker with a special ability to outwork the
669400	674640	rest of the network. The attacker creates transaction T, sending some amount of MUH
674640	679160	onto Coinbase. Suppose T is quickly included in a block by some miner on the network.
681360	687560	Simultaneously, the attacker will create a second transaction, T'. Notice that T' sends the same
687560	694240	funds that were sent in T, addressed at A1. However, T' sends those funds to address A2.
694660	698860	T and T' could never exist in the same blockchain together. As soon as one is included,
698860	702840	the other would be an invalid transaction because the funds were already spent.
703500	708860	The attacker begins to mine in secret and includes T' in the secret block, but not T.
709220	713160	The space on the right with the gray background is local to the attacker and the network cannot
713160	717680	see this block. Remember that we've assumed the attacker can outwork the rest of the network,
717680	721920	meaning the attacker can produce blocks faster than the rest of the entire network.
723640	728080	So in order to do anything with the MUH on Coinbase, it first needs to have three confirmations
728080	733380	because that's what it takes to be credited. The attacker does not sit idly by and continues
733380	738640	to secretly produce blocks. The network also produces blocks, but unknown to anyone,
738640	741740	it's not keeping pace with the secret blocks produced by the attacker.
743000	747500	Finally, the network produces the third block, three confirmations on the transaction. The
747500	751580	attacker is now credited with the MUH and can sell it for BTC, which could then be sent off
751580	758060	the Coinbase platform. So the BTC could be withdrawn. It's now in the attacker's control.
758080	761800	Remember, nothing seen publicly thus far is anything out of the ordinary.
762240	767380	But now the attacker can execute the attack. The attacker can reveal the blocks to the network.
767420	771320	These blocks have more accumulated work than the existing top three blocks. So according to the
771320	776740	network rules, a reorg will occur. The attacker's blocks now representing the canonical chain.
777080	781720	The top three blocks that we've previously seen publicly now become orphan blocks. They're no
781720	785420	longer part of the blockchain and the transactions defined in them are now no longer part of the
785420	790620	canonical history. And notice the T was in those blocks, meaning that there's no longer a
790620	796180	transaction to Coinbase in the blockchain anymore. But the BTC has already been withdrawn. There was
796180	802340	a withdrawal, there was no deposit, aka a theft. The ability to do this is directly related to how
802340	806180	difficult it is for an attacker to overpower the network. The more work being put into solving the
806180	811160	proof of work puzzles on the network, the more difficult it will be for any one entity to marshal
811160	816880	the resources and overwhelm the network. Note that the danger of this attack comes when you
816880	822380	accept a deposit directly from the attacking entity. In this example, BTC was provided in
822380	826860	exchange for MUH. If the attacker can't get something irrevocable in exchange for this
826860	831660	vulnerable coin, the attack is invaluable. This is one of the reasons that an exchange is a great
831660	840080	target for this attack, liquidity. The thing about 51% attacks is they're pretty obvious if you know
840080	845320	what to look for. Each block in the blockchain is identified by its hash, providing a unique
845320	851100	fingerprint. If the hash of block at height n changes from what it was before, that block was
851100	857380	replaced with a new block. There must have been some kind of reorg. Small reorgs, shallow depth
857380	861500	reorgs, happen on a regular basis. This is primarily driven by the fact that many nodes
861500	866160	across the world are attempting to find blocks. There is some amount of latency in the network,
866160	869620	so there will be race conditions where multiple blocks are found simultaneously and eventually
869620	878000	only one will be in the blockchain. However, deeper reorgs do allow for attacks if they
878000	886680	exceed the confirmation limit of the service. You can inspect a reorg to look for the presence of
886680	891440	T and T prime. Two transactions are double spends if they send the same money but to different
891440	895420	places. They can't exist in the chain together, but they might exist in competing branches of
895420	900980	the chain. This is the smoking gun that a reorg is malicious. Money that was sent to one place
900980	907680	is effectively clawed back when the new blocks are revealed. From the attacker's point of view,
907680	912980	the attack has two components. One is the ability to form the secret chain, which requires majority
912980	919540	hash power. Two, the ability to create transactions T and T prime. You're going to need some amount of
919540	924940	the currency itself to do this, and the more coins you have, the bigger the impact of T and T prime.
926540	930600	An attacker is also going to need to select a victim. Obviously, the victim must accept
930600	934940	the currency, but the victim has to provide something of value that they cannot take back
934940	939160	once they realize they've been attacked. So an attacker couldn't sell the coin for U.S. dollars
939160	943720	and transfer the U.S. dollars to a bank account. Not only would that likely expose the attacker's
943720	948280	identity, but the bank transfer can usually be reverted. Cryptocurrencies that aren't vulnerable
948280	953160	to 51 percent attacks, however, cannot be reverted. This is another reason why cryptocurrencies
953700	959000	exchanges make such good targets for 51 percent attacks. You can get cryptocurrency from them.
959760	963920	Also notice that this attack can be repeated indefinitely until the victim takes defensive
963920	968100	action, either by raising the confirmations required on their service or simply shutting
968100	974480	down their interaction with this currency. We're going to walk through some real world examples
974480	982900	of 51 percent double spending attacks. The one we'll go into most detail is the 51 percent attack
982900	988160	on Ethereum Classic. In early January was when this happened, and because it's an asset that
988160	992300	supports, we had monitoring systems in place which alerted in real time to the attack,
992300	996260	allowing us to pause interaction with the blockchain. I'll talk about how this attack
996260	1000800	unfolded. The ETC network is minding its own business, mining blocks as usual, adding
1000800	1007260	transactions to the blockchain. Then all of a sudden, seven new blocks show up out of nowhere,
1007260	1015740	and these seven blocks don't extend from the most recent block, but dig down five blocks back,
1015740	1019640	and it happens again. Six new blocks are fitting five previously discovered blocks.
1020440	1026540	I called both of these events practice attacks, and the reason for that is because they were just
1026540	1031160	reorgs. There was never a pair of transactions, T and T prime, where the same money was spent
1031160	1037540	in one place in the first branch to a different place in the second branch. We hadn't observed
1037540	1041820	reorgs of this depth ever on Ethereum Classic, and so it would have been premature to call these
1041820	1048240	attacks. But once we were seeing these, we were alerted that something unusual was going on.
1048640	1055200	And three hours later, there was a very deep reorg. 74 new blocks showed up all at once,
1055200	1062480	orphaning 57 blocks. And in this reorg, there was a T and T prime, where the same money was
1062480	1068460	spent first to one place and then to another. This was on a Saturday night. Our on-call
1068460	1073560	engineers responded, validated the alert, and turned off ETC send and receive functionality.
1075720	1083160	Ethereum Classic isn't the only successful 51% attack. It's the one we're most familiar with
1083160	1087480	because it's the one we were closest to. But I'm going to talk about two others that we've looked
1087480	1092780	into closely. BTG is Bitcoin Gold, and VTC is Vertcoin. But those aren't the only other two.
1092780	1099940	There have been others as well. Some of the observed patterns we see from looking into
1099940	1105820	these three different attacks. It's important to realize blockchains are public. This means
1105820	1110100	that a 51% attack is a pretty noisy attack. It leaves all kinds of good data for understanding
1110100	1113620	the attackers. I'm going to walk through just a few of the things that we've observed, but they
1113620	1117980	really only scratch the surface of what you can learn about an attacker. These attacks leave
1117980	1121880	such a trail of damage, you could say, behind them that I don't think it would be very long
1121880	1126180	before we're very good at learning quite a bit about attackers of this sort.
1128080	1133320	This chart shows all 17 of the reorgs that we were able to find in our research into the Bitcoin
1133320	1138900	Gold attack, and how much Bitcoin Gold was taken in each one of them. Notice the first two
1140200	1147100	didn't take anything. This is Vertcoin, VTC. The first five took nothing.
1148240	1153720	And notice the first two in Ethereum Classic also took nothing. Remember what I said,
1153720	1159140	the 51% attack has two parts. First, being able to build the secret chain, and then properly
1159140	1163840	creating transactions TNT Prime. So what did the attackers do? They broke the problem down into
1163840	1167700	those two steps, made sure they could build an attack chain before they worried about building
1167700	1175240	TNT Prime. Even criminals need integration tests. Criminals are also not perfect. These are the
1175240	1180200	same three charts as before, all in one slide. You may have noticed that there were gaps when
1180200	1184380	I first showed these to you. They're a little harder to explain, I think. But as far as I can
1184380	1189560	tell, the attackers did a bunch of work in these cases to reorg the chain, but they didn't put in
1189680	1194000	a TNT Prime, so they didn't cash in on any double spending. For the first few attacks, it makes
1194000	1199460	sense to assume that they're practicing. But once they've proven they can do that, these just look
1199460	1207830	like mistakes to me. There's also an invest-exploit decision that an attacker has to make. Imagine
1207830	1211510	yourself in the attacker's shoes, and you kind of have an interesting dilemma. Once you have the
1211510	1217330	hash power to successfully attack the network, any additional resources you have should be directed
1217330	1224130	towards owning the currency itself to amplify the impact of TNT Prime. In other words, the cost of
1224130	1228840	the attack and the payoff of the attack are not functions of one another. So as an attack progresses,
1229230	1233370	you're accumulating resources if you're being successful. Should you reinvest these, or should
1233370	1237450	you take them off the table? You know how I said blockchains are very transparent. We can observe
1237450	1245750	the decisions they made clear as day. In the Bitcoin Gold attack, and in the vast majority of
1245750	1250850	the Vertcoin attack, attackers are mostly in exploit mode. They have X amount of coins, and every time
1250850	1256470	they attack the network, they perform a double spend, they get X payoff. But in the Ethereum
1256470	1261970	Classic attack, and oddly in these first three Vertcoin attacks, the attackers seem to be also in
1261970	1266050	invest mode. This makes me think that the Ethereum Classic attackers may have been planning to
1266050	1270730	continue attacking, because I would expect an optimal attack profile to include a period of
1270730	1275610	invest, followed by a flat period of exploit. There's also something really interesting about
1275610	1281290	the Ethereum Classic data. Notice how it steps up in pairs. The first double spend was for a tiny
1281290	1289650	amount, also probably a test. You can see at number four and five, they're roughly the same size.
1290110	1295170	But then the size roughly doubled for six and seven, almost doubled again for eight and nine,
1295170	1299390	stepped up significantly for 10 and 12, with 11 looking like it may have been another mistake,
1300690	1305550	and then doubled again for 13 and 15, with 14 being another possible mistake.
1305790	1309430	It seems to me that the attacker was balancing investing and exploiting. Bigger and bigger
1309430	1314030	payoffs every time, but you never know when the party is going to stop. And so you want to take
1314030	1320720	money off the table while you do it. That's what this looks like to me. This is also really
1320720	1325540	profitable for the attackers. You can see our estimates on how much the double spends were
1325540	1329680	worth, and our estimates on how much the mining cost would have been to perform these attacks.
1329680	1334880	You can see the profit margins. It's absurd. Our mining cost estimates were also fairly conservative.
1335780	1340220	We're also not even factoring the money made from the mining reward. The attacker
1340220	1345200	mined valid blocks. Those blocks come with a mining reward, just like regular miners would
1345200	1349100	have gotten. I'm not even factoring that in. They're approximately on the same order of magnitude
1349100	1357180	as the mining cost, however. But the mining reward and leftover coins from the attack do typically
1357180	1362760	get sold, so attackers are cashing in on this. In the case of Bitcoin Gold, it looked like about 75%
1362760	1366380	of the mining rewards were moved shortly after the attack, probably to an exchange, probably to
1366380	1370220	liquidate them, probably so that they could have coins that were unaffiliated with the attack.
1370820	1375100	In Vertcoin and Ethereum Classic, all mining rewards were moved very shortly after the attack.
1378180	1381760	Analyzing the time of day that the attacks happen is another route to
1381760	1385420	understand the attackers. I've mapped the times of the attacks on this slide.
1386300	1390660	It's hard to draw meaningful conclusions from Bitcoin Gold and Vertcoin. There does seem to be
1390660	1395720	some clustering, but it's not too dramatic and they do have pretty much 24-hour coverage during
1395720	1401800	the attack. Ethereum Classic, however, obviously has a time of day pattern in the attack. And that
1401800	1406100	one outlier that you see was actually the very first practice attack, so it's a different case
1406100	1411400	anyway. If such a major pattern does emerge, I would consider there to be two major hypotheses
1411400	1415840	about what could be driving it. The attacker's preferred waking hours or the time zone the
1415840	1420440	attacker considers most damaging to the victim, probably at night. Also note that the Ethereum
1420440	1425280	Classic attacks and most of the Vertcoin attacks happened over weekends, again, probably because
1425280	1431360	that is when it is most difficult for an exchange to respond. When doing timing analysis, note that
1431360	1434640	these attacks can sometimes take hours for the attacker to build the chain, meaning the attacker
1434640	1439040	doesn't have the full luxury of choosing their timing and may be forced to work around the clock.
1439040	1444240	As an example, the longest Bitcoin Gold attack chain was 27 blocks, which probably took them over
1444240	1449720	four hours to mine. The longest Vertcoin attack chain was 310 blocks, which probably took them
1449720	1459300	over 12 hours to mine. As I said earlier, the risk for 51% attacks is in accepting money directly
1459300	1463560	from an attacker. An attacker will want to find an exchange where it's possible to hide their
1463560	1469020	identity from the exchange. In the case of Bitcoin Gold, Bitcoin Gold was delisted from Bittrex
1469020	1473780	shortly after the attack, and the Bitcoin Gold dev team put out a statement claiming that Bittrex
1473780	1478860	was a victim of the attack, and that explained their delisting. I don't know who the victims
1478860	1483520	were of the Vertcoin attack. In the case of Ethereum Classic, three exchanges all put out
1483520	1488080	statements acknowledging that they were targets. KYC can help prevent an attack.
1489420	1494540	Another pattern, the attacks stop after they're publicized. Cockroaches hate the light.
1495120	1499200	Bitcoin Gold was a three-day attack. It was publicized on the third day.
1500780	1506880	Vertcoin was nearly two months. The day it was publicized was the day of the last attack.
1507420	1513100	And Ethereum Classic, also a three-day attack. The third day was the day it was publicized.
1515060	1517960	The last pattern I want to talk about is also interesting.
1518640	1523760	We've noticed that attackers commonly don't place their TNT Prime transactions in the optimal blocks.
1523760	1527460	Consider the example of the very first Ethereum Classic double spend attack that I talked about
1527460	1536720	before, where 74 blocks did the orphaning of 57 blocks. This would be the ideal block
1537280	1542280	for an attacker to have placed their transaction T in. It's the deepest block that was orphaned,
1542280	1546600	which would have given transaction T 57 confirmations at the time of the attack.
1547680	1552760	Instead, T was placed 13 blocks higher, where it only had 44 confirmations at the time of the
1552760	1559340	attack. Transaction T was not the deepest orphan block. That means the attacker did the amount of
1559340	1564620	work required to orphan a transaction with 57 confirmations, but only for a transaction that
1564620	1569180	had 44. This happens in the vast majority of the double spends that we've observed, which is
1569180	1576060	frankly very puzzling. So let's review. I define hacking by attacking the integrity of the
1576060	1581460	blockchain. New technologies, new ways to hack. I described a 51% double spend attack, then I
1581460	1585460	walked through real world examples of these attacks, along with the patterns that we've
1585460	1597920	observed. That concludes my talk. Does anyone have any questions? Yeah?
1605110	1607190	I'm sorry, I can't quite hear you.
1612070	1616470	Yeah, so I think, let me make sure I'm understanding your question correctly.
1616470	1619730	When a block is orphaned, is that data lost? Is that what you're getting at?
1629570	1635390	Yeah, a node will store that data on its own. So when a block is orphaned, the node in its
1635390	1639570	database will say this is an orphan block, but it'll hold it. And so you can still query your
1639570	1643070	node for that data. Your node had to be around at the time, because those blocks aren't being
1643070	1648450	shared around on the network. But if your node saw it, your node has it. Yeah?
1648450	1653710	So you mentioned that the payout for mining a block is a cost.
1654250	1660530	It's not exactly, but I think they're probably close, especially in smaller market CapCoins,
1660530	1665130	where general purpose hardware can be moved to arbitrage the mining reward.
1669290	1678230	This is way more profitable. If someone is going to take a deposit for a very weak
1678230	1682210	amount of confirmations and give you something incredibly valuable for it,
1682210	1689250	it's just so trivial to claw back the original deposit. I don't really think they are.
1692830	1698390	Yeah, well, yes, when they mine their blocks, those are just ordinary nodes. And the easiest
1698390	1702370	way for them to do it is to not even modify the software, just disconnect it from the internet,
1702370	1706770	mine your block, you create your transactions. And then once you look locally, you see that
1706770	1710730	you've outpaced the main chain, you just connect to the internet and then the reorg will happen
1710730	1722830	by itself. So Coinbase has never lost anything in this sort of attack. We've only seen one attack
1722830	1728730	on an asset that we support, which was the Ethereum Classic attack. We noticed it immediately
1728730	1734730	because we were monitoring for this and we immediately shut down. I can't remember the
1734730	1740150	number, there are something like 15 of these reorgs with Ethereum Classic. The very first one
1740150	1744330	that had a double spend, we alerted and we shut down. So all the subsequent ones, we're offline
1744330	1749270	and they couldn't have attacked us. Yeah, but actually there are four different exchanges
1749270	1755050	targeting the ETC 51%. And actually one of our customers was not that happy because
1755050	1761010	the bank has sent the ETH. But really the question to you guys is, if you want to withdraw
1761010	1768790	that fiat from Coinbase, it takes quite a bit, right? And literally, if I am the attacker,
1768790	1776630	how would I cash out or move the fund so that I can cause damage to the exchange? I don't think
1776630	1782070	that's the case for Coinbase, but under what scenario would that be a damage?
1782270	1786870	So I'm not sure I understand your question. I think you're saying if there's a delay on
1786870	1790870	withdrawing from the exchange, that makes it harder to attack the exchange. And you're definitely
1790870	1794410	correct that if there is a delay in withdrawing the exchange, because then the attack could
1794410	1798610	potentially be detected and before the funds left, you could put a hold on them. But that's not true
1798610	1803670	in all cases. You can transfer onto an exchange, sell and transfer off. And that is a very common
1803670	1809950	pattern without these long delays. It's one of the pain points for a lot of customers in the
1809950	1814330	cryptocurrency industry. They don't want to sit and wait for five days for seemingly no reason.
1814470	1819110	So it's a constant balance to get that number right. But the faster it is,
1819110	1830820	the better the opportunity for an attacker. Any other questions? What's that?
1836070	1839570	Once the attacker transfers out of Coinbase, it's out of our control. So then if they can
1839570	1843530	claw back that original send, then they got away with it, essentially,
1844110	1848610	which has never happened to Coinbase, just to be clear. Any other questions?
1852990	1854650	All right. Thank you, everybody.
