start	end	text
3000	8420	Hello and welcome to the State of Blockchain Security here at the Blockchain Village at
8420	14760	DEF CON 28. I'm excited to share with you just a really zoomed out view of the current state
14760	19880	of our industry. We'll talk about a variety of blockchain security related events, major
19880	25160	incidents. We'll gather some insights and make future predictions. And most importantly, we'll
25160	31060	talk about a lot of opportunities how to build a stronger and more trustworthy financial system.
32360	37060	In case we have not met, my name is Peter Kaczynski. I'm a blockchain security engineer
37060	42340	at Coinbase, where I spend most of my time trying to break and secure a variety of standalone
42340	48720	blockchain systems and smart contracts. On the side, I also publish a blockchain
49440	54440	threat intelligence newsletter where I share the latest news. And partially, I will be recapping
54440	59340	some of the major events that I cover in that newsletter. And in the past, I was also organizer
59340	67320	of the Capture the Coin competition at DEF CON. In the past, I was working also as a malware
67320	72120	reverse engineer at FireEye. If you're a malware reversal, you may have run into a few of my tools
72120	79880	such as Flare VM and FakeNetNG. And I've also reversed a whole lot of APT malware that I care
79880	86720	to remember. Zooming even back out, I was more on the offensive side as well for the Federal
86720	91800	Reserve System, where I was working as a penetration tester, trying to break Finance 1.0.
92420	98380	I guess everyone shares their story of how they got into crypto. The revealing moment for me was
98380	102800	just basically my past growing up in the Soviet Union and observing what hyperinflation means
102800	113120	in the first place. So it really, it really stroke a chord in me when I understood what the future
113120	119360	offered by the cryptocurrencies. And I take it as a personal mission to make this field succeed
119360	123600	by making it more secure. And I hope you join me on that mission as well.
124520	131120	So what are we going to talk about? I would like to help inform, educate, and identify as many
131120	136100	opportunities for you as possible. So if you feel like this is the field for you, you will know
136100	143100	exactly where to plug in and what to pursue. Within this talk, we're going to talk about a
143100	148600	variety of incidents, as I mentioned, from the newsletter. But the key point here is that it's
148600	152960	less about me being right. I will offer some insight and opinions here, but I'm even more
152960	158340	excited to start a discussion and learn from you during the Q&A session or offline if you care to
158340	165060	reach out. I would be highly excited to hear your thoughts on it. In our presentation, we'll begin
165060	170560	by defining the field in the ecosystem. So we'll talk, what is blockchain security? How is it
170560	177320	different from any other security disciplines, let's say web application or IoT security? What
177320	184220	makes it unique? We will also talk about the overall ecosystem that we're trying to protect
184220	190880	and also think how it's getting attacked. Next, we're going to break down all of the variety of
191440	196120	components within the blockchain security field. So we'll talk about exchange security.
196120	201220	What were the major incidents this year so far? What can we learn from it? We're going to talk
201220	206700	about the asset security. So we will discover a variety of protocol issues that are being
206700	211500	exploited. We'll talk about software getting attacked, other weak points. And last but
211500	216600	definitely not least is user security. We're going to deep dive into the main point of why we're
216600	220460	this is for the users, for people to be able to transact securely.
222320	226980	We will finish the presentation with thoughts about building this industry, how to make it
226980	234520	more mature, what we can do to share the guidelines that people can just pick up and
235260	238480	implement in their next projects, the tools that still need to be developed,
238480	240860	as well as how we can build up our community.
242440	249200	So let's begin first by defining what is blockchain security. I believe it's a brand
249200	255120	new field. It's a new discipline of information security with a mission of securing and defending
255120	263540	the cryptocurrency ecosystem. What is cryptocurrency ecosystem? We, again, I mentioned users are at the
263540	270580	core of it. We have a variety of assets, both layer one and layer two. So smart contracts and
270580	277220	all of that. So nodes, wallets, smart contracts are all within the scope of this field. Of course,
277220	284520	exchanges, a variety of people choose to delegate and use centralized points of
285060	291380	storage instead of holding all the keys themselves. And a variety of attacks and
291380	296570	security implications that that brings, including what are the issues with cold hot storage,
297090	301430	the incidents that are happening in this world and other issues.
303430	308230	So some of the threats that we'll cover throughout this talk, we'll talk a lot about malware,
308230	313150	just because of my background, we'll cover how it's affecting both the assets where
313150	319190	they're getting backdoored, malware attacks against users themselves, the ransomware and
319190	324870	the miners and all that good stuff, as well as how it affects exchanges. We'll go through fraud
324870	330010	and scam schemes that are perpetrated against users. We'll talk about what are the losses,
330010	334310	what can we do to defend ourselves against it, make users feel a little bit more comfortable
334310	340110	and safer. We'll talk about network attacks. So we'll dive into nitty gritty technical details
340110	347670	of attacks against a variety of different chains and lessons that we can learn from them.
348150	353490	We'll talk about phishing attacks against exchanges and users, and definitely about
353490	358650	bad actors, who are the people behind those threats, what can we learn, how we can better
358650	365250	defend ourselves against them. So let's first dive into the exchange security.
366790	371130	I mean, last year, if you've been paying attention in 2019, there were so many incidents
371130	376510	when one exchange after another was falling down with millions and millions of dollars lost
376510	382450	from the hot wallet theft. This year, what I'm observing is something different, is that we're
382450	387070	seeing two incidents from BlockFi and CoinCheck, where the attackers chose not necessarily to go
387070	393310	after the, you know, just grab the coins and run off. Instead, they were content with just getting
393310	399430	to PII data. So we're talking about emails, addresses, other personally identifiable
399430	405590	information from the customers. So the first incident that I'm going to cover is BlockFi,
405590	412810	and they were good at publishing the incident reports fairly quickly. However, what
412810	416490	they described as the reason, the root cause for the attack, is that one of their employees was
416490	424050	SIM-ported. SIM-ported to access the internal portal. So this sounds like something preventable.
424050	431210	I mean, if you're defending your internal portal with a phone,
431210	437490	you're using 2FA, which is like some kind of SMS or a phone system, it really could have
437490	443250	been improved. It's something that could have been avoided. Similarly, CoinCheck reported a
443250	451330	loss of 200 customer PII data. And again, the root cause for it
451330	455690	was the main registrar was hacked. It's something that could have been avoided by maybe picking
455690	460970	someone more secure or trying to find a way how to secure your registration so it wouldn't be
460970	467950	hijacked as easily. And of course, this year, we had good old hot wallet theft. So the year
467950	476830	started alt-spit with really tiny financial loss. It was only 7 bitcoins stolen and 23 ETH.
477230	482750	LulzSec took credit for this compromise. Unfortunately, the exchange shut down as a result,
482750	486950	and so we don't really know as much information about what caused it, what was the underlying
486950	493770	issue. But it just continues on the trend from last year that these things happen. And this
493770	498290	happened early in the year, I believe back in January. A more recent incident was from the
498290	504410	Kasha exchange, which reported a loss of 336 bitcoins. And again, the reasoning that they
504410	509970	described was that their employee was using a personal laptop to conduct official business.
509970	514910	So they were running OTC desk from their personal machine, which apparently got malware on it,
514910	519370	and the attacker was able to get away with the keys. Again, something that could have been
520110	527010	avoided. So some insights, some observations that we're seeing so far. Are exchanges getting
527010	532350	more secure? I think so. We're observing a decrease in the number of incidents. Back in
532350	537150	2019, it was absolutely insane where we had multiple exchanges sometimes compromised within
537350	542610	a single week. So far, we're seeing four exchanges with only two of them, resulting in a direct
542610	550570	monetary loss. Speaking of damage, financial damage itself, the total amount of loss was in
551250	559550	$175 million. Back last year, we're almost six months into the year and the total losses so
559550	565270	far only $4 million. So the financial damage is going down. What's also very interesting to see
565270	571070	is that folks are very open about the compromises. They release incident reports within 24 hours.
571070	578750	They tell exactly who is affected, what was the issue. So that response is just really good to see.
579890	584170	On the other hand, as I mentioned, the types of incidents that could have been really easily
584170	591030	avoided. SIM swapping, that could have been locked down ahead of time. Letting people,
591030	598510	employees run official work on unmanaged personal laptops is just a very risky thing to do.
600410	605530	Another trend is the attackers going after more than just HawkWallet, not more than just
605530	611410	the coins themselves. So I imagine that whatever PII they stole on Monday, come Monday, they will
611410	616910	turn around and try to perform SIM swapping attacks. In fact, there was an article, I believe,
616910	620410	where there was an interview with the attackers where they explicitly said that, well, you know
620410	626050	what, we could, the best way for us to monetize is to actually just to start SIM swapping instead
626050	632590	of trying to sell that data or using any other type of attack. So this is something we may see
632590	640890	more in the future. Next, let's talk about the asset security, specifically security of the
640890	646510	protocols. We're talking about the interaction between different chains and nodes and all of
646510	653850	that. Well, the best example are the variety of 51% attacks, which have been always happening,
653850	660390	continue happening. First, we'll cover two incidents with Bitcoin Gold. So the first
660390	667410	incident was back in January 23rd and 24th. So there were in fact two 51% attacks back-to-back.
667410	675450	It resulted in 29 block re-ORC, which is fairly sizable, and it definitely resulted in a double
675450	683690	spin. So this is unfortunate. This is something that we observed happening for a while. Any
683690	691730	coin which is relatively lower hash power and has a hash power available for sale that you can
691730	698870	easily rent on something like NiceHash is getting a 51% attack. What's interesting is the second
698870	705170	incident on July 10th is that the attacker apparently once again tried to rent out some
705170	710110	hashing power on NiceHash. But in this case, the miner who rented out their capacity apparently
710110	716630	figured out they're doing something bad and was able to notify Bitcoin Gold developers. So what
716630	722610	they did in response to that was fascinating and potentially trend for the future is that they
722610	729470	contacted miners in secret and distributed a modified piece of node software which had a
729470	735090	checkpoint. That checkpoint essentially invalidated whatever new chain that the attacker was mining
735090	741210	in secret. So what happened was once the attacker actually published the reorg
741210	746910	chain, it was not accepted by the network. So they wasted all their money on NiceHash and all
746910	754630	their efforts. Bitcoin Gold published their report about what happened, what they did to defend the
754630	762810	network. This is concerning and this is interesting also in two ways. On one side,
762810	768270	it's great that they were able to catch it, but this was only done because one of the NiceHash
768270	773410	miners was vigilant enough to be able to notify them. So this could have been just as easily
773410	780270	missed. Depending on how you view those networks introducing checkpoints into your protocol,
780270	786650	secretly communicating with miners, it depends on your specific looks and on decentralization,
786650	792610	that may be considered by some as something that we don't want to see. But it worked in this case
792610	797490	and we'll in fact see later on when we talk about Vertcoin, it is once again something that repeated
797490	803890	where developers of Node software are communicating with miners in order to help secure the network.
804270	809130	Another interesting trend about this particular attack is that the reorg was massive. It was
809130	816370	1300 blocks reorg. So the attackers are willing to spend and invest significant funds into their
816370	823970	attacks. In fact, the most recent incident, which is still ongoing, is starting August 1st,
823970	833030	is a massive 3500 block reorg, the first of two, where an attacker apparently spent more than 200k
833030	840030	on NiceHash to rent capacity in order to double spend and exchange. So in this, in the slide,
840030	845330	I'm only listing the first incident. There was in fact yet another reorg attempt, successful reorg
845330	852270	attack on the Ethereum Plastic Network with another massive 4000 block reorg.
853350	858970	So some of the insights in this is that these types of attacks will continue. Any coin which
858970	865630	has easily rentable GPU capacity that you can rent on NiceHash or something that you can
865630	874530	repurpose from another coin, they will be attacked. They're under a risk of getting attacked.
876310	881590	What's another interesting observation, what Bitcoin Gold did with working with miners and
881590	887650	kind of trolling the attackers by not saying to everyone, like, hey, we know there's an attacker
887650	895250	and they're about to release their secret chain anytime now. They actually waited for the attacker
895250	901790	to waste their capacity and their funds until they found out, like, wow, okay, this was all
901790	909790	wasted effort. So what I covered before were traditional 51% attacks against proof of work
909790	917610	networks. What's interesting happening on the blockchain networks today are, is that there's
917750	924710	a trend towards shifting into proof of stake consensus algorithms. So what I'll cover are
924710	929630	two different coins, so Steemit incident and the Ethereum incident, and explain how they're
929630	935010	potentially trend setting and something that we may see more in the future rather than just more
935010	944050	and more 51% attacks. So on the Steemit side, I guess just to summarize the incident, Justin Sun
944050	953370	from Tron purchased the Steemit coin. There was a disagreement over how to manage vast assets of
953370	959490	frozen funds that were initially pre-mined since the beginning of Steemit. The way that this
959490	964630	disagreement was addressed was not through negotiation and trying to find some kind of
964630	974690	agreement, but in fact it was on the Tron side, they decided to attack the coin by taking over
974690	981130	its delegated proof of staking algorithm. So if you're familiar with proof of stake algorithm,
981130	986650	the more coins you have, you can take those coins, you can lock them up somehow to give you some
986650	993930	voting power. So you can, this is what's called staking, in order to produce blocks or vote for
993930	1001430	whatever unchained action. So some coins use governance for that. In the delegated proof
1001430	1009950	of stake systems, you don't vote for blocks yourself directly. Something, for example,
1009950	1016050	in ETH 2.0, you need to lock up 32 ETH and you can vote on blocks and can validate blocks.
1016050	1023690	With delegation, you in fact delegate a set of validators and you empower them and you entrust
1023690	1030270	them to validate and produce blocks. So this is the system used in Steemit, EOS, and other coins.
1030790	1037330	So what happened in this particular incident is that Tron colluded with a number of large
1037330	1042110	exchanges which were holding vast amounts of Steemit coin in order to gain the controlling
1042110	1048410	package of the asset. Once they got that, they were able to vote in a controlling set of
1048410	1053250	validators, which allowed them to basically control the network. They were empowered to
1053250	1058690	set what are the consensus rules. Once they gained that right, they were able to push an
1058690	1065610	updated node software, which unfroze through basically a hard fork, unfroze those funds,
1065610	1072930	which were from the initial pre-mine, which absolutely gave Tron a controlling package of
1072930	1077790	the asset in the system where no one could really challenge them and they were able to hold on to
1077790	1087620	their power indefinitely. Taking the ethics aside, there are arguments on both sides that, you know,
1087620	1092320	why did this have to break down into a technical attack when something that could have been agreed
1092320	1098900	upon just by dialogue? What's interesting about this, this is the first case of a proof-of-stake
1098900	1106220	attack and we could see how it played out. The way that it played out was very quickly.
1106220	1112140	Between the time that Tron was able to get the controlling package of Steemit coins, to
1113080	1119260	pushing their own set of validators, to pushing a hard fork, to unfreeze funds, to taking those
1119260	1125680	funds and, you know, multiplying how much voting power they have, it didn't take months or even
1125680	1132020	weeks, it took hours. So it was a highly coordinated attack. It was executed very precisely and
1132020	1143240	effectively. So this was a fascinating example. On the Ethereum side, we're, again, Ethereum is
1143240	1146800	something that has massive hash power, so we're not going to see, highly unlikely we're going to
1146800	1153180	see 51% attacks, but there's still a variety of things that people do, such as mempool manipulation.
1153360	1159860	When there was a black swan event, when the price of Ethereum crashed and a bunch of
1159860	1165640	MakerDAO auctions were starting to get liquidated, there was apparently a mempool attack where they
1165640	1173860	tried to cause a high degree of congestion so that some individuals were able to create a number of
1173860	1180500	liquidation bids for nothing, zero bid liquidations, and be able to win them because
1180500	1185000	they essentially did not have any competition because the network was congested. This is
1185420	1190480	a very interesting approach. We've seen mempool attacks before, but this is interesting how we are
1191360	1195420	manipulating the underlying protocol, underlying Ethereum network, in order to attack
1196260	1200260	higher level smart contracts and DeFi projects as well.
1201100	1207400	So some network security insights from what we've seen is that Steemit, that opens up a new era of
1207400	1212000	proof-of-stake attacks and governance attacks. Instead of being worried that someone will
1212000	1218880	buy up a whole bunch of miners or mining capacity, hash power capacity on NiceHash, now the power is
1218880	1224560	in the exchanges. So exchanges control the most coins, exchanges colluding together may decide to
1224560	1232920	attack a chain. So this is something that we have to be on the lookout for now. Attackers are getting
1232920	1240060	more creative as well, so mempool manipulation in order to attack a DeFi project is something
1240060	1247470	interesting that we'll likely see as well. Let's switch gears a little bit and instead of
1247470	1253190	talking about asset security on the protocol side, let's talk about the underlying software itself.
1253190	1258830	In the end, it's all abstract, it all works in the cloud, but what's actually working,
1258830	1265810	the actual logic and code that runs is a node software itself. Nodes are complex
1267190	1273830	pieces of software and the inevitable that they will have bugs and vulnerabilities. So a few
1273830	1279950	interesting incidents that I want to cover so far this year, two of them happen on the testnet,
1279950	1285450	so I'll start from left to right. So the Solana network, there were no issues in the protocol
1285450	1294110	itself. So the design, I believe it uses a BFT-like system. The issue was in the implementation,
1294110	1299570	there was a flaw, there was a vulnerability in the way that it failed to, the node software
1299570	1306150	failed to validate transactions, which essentially allowed somebody to print 500 million Solana coins.
1308190	1313850	On the mainnet project, so the Tendermint, this is the underlying consensus library used
1313850	1320510	by projects like Cosmos and others, a denial of service vulnerability was discovered, which
1320510	1327470	essentially allowed someone to halt the entire network. And again, this was done not because
1327470	1334570	of some flaw in the protocol, it was because of nodes failing to validate specially crafted
1334570	1341410	blocks. The last example is the inflation bug. Those are particularly dangerous because they
1341410	1347470	affect the entire ecosystem. Luckily, this one was discovered again on the testnet where 9 billion
1347470	1355130	file coins were minted. This was patched and did not affect the mainnet. But you can see like the
1355130	1359530	vulnerability, there are only three examples that I'm listing here, but the vulnerabilities in node
1359530	1367570	software can have severe implications for the market. On the wallet side, again, any piece of
1367570	1374890	software will have vulnerabilities. Monero wallet failed to validate specially crafted coinbase
1374890	1381710	transactions to be specific, which resulted in it appearing as if you received more of Monero than
1381710	1386870	was actually sent. This is something similar to, if you recall, there were a whole bunch of
1386870	1393910	exchanges compromised with the ripple. There was a special flag which is basically telling you
1393910	1400650	how much you are vouching to send as opposed to how much you actually are going to send. So there's
1400750	1411510	a potential for exchanges or individual wallet owners to incorrectly credit whoever is sending
1411510	1416670	them funds. Lightning network, it's still very much alpha system, so it continues to have
1416670	1420790	vulnerabilities discovered and patched. There are a lot of papers getting published,
1420790	1426050	so this is actually a good sign that people are looking into it and finding flaws early on.
1426490	1431510	Now Argent wallet, that was an interesting bug that was responsibly disclosed by OpenZeppelin
1431510	1438370	and effectively patched by the Argent folks, is that it allowed users to basically
1438370	1446210	create a kind of recovery mechanism using specialized guardian nodes. And in rare occasions
1446210	1451290	when such nodes were not properly defined, it allowed anyone to take over those wallets.
1451410	1455850	Once again, this was patched, but an example of vulnerabilities in wallets.
1457490	1462090	What's more interesting are not the vulnerabilities that are discovered and patched.
1462650	1468050	This is normal. What's more interesting are intentional backdoors that are introduced in
1468050	1473390	both wallets and node software. So the first incident I'm going to cover happened in the
1473390	1481610	Trinity wallet. We've seen backdoored wallets for a while. Last year I talked a lot about
1481610	1488630	the Electrum wallets getting backdoored. The way they attacked the Trinity wallet was not directly,
1488630	1496010	after the main repository itself. Instead, they were going after the third-party dependency.
1496010	1500110	So the third-party dependency on which Trinity wallet was relying to was patched to steal
1500110	1505770	users' keys. That was included in the main repository, and any user downloading and
1505770	1513510	using this was heading at this asset stolen. Ravencoin incident was even more vicious.
1513510	1519950	On July 4th, an inflation bug was discovered, and an emergency patch was issued to a variety
1519950	1529710	of nodes and distributed to miners. And this is something that initially maybe was just a
1529710	1534910	vulnerability. Every once in a while you discover those things, until the point they realized that
1534910	1540340	the bug was intentionally introduced. It was introduced back early in the year, in January,
1541100	1547380	by an account which was a throwaway GitHub account. The patch appeared to be a very
1548580	1555000	innocent-looking commit, which allowed you to be more verbose about the type of errors
1555000	1562780	that you're getting. So it snuck by the core maintainer's eyes. They were not able to detect
1562780	1569960	that. And for months now, they were slowly minting. There was a script running that was slowly minting
1570340	1576820	RVN coins. So in total, 300 million RVN coins were minted over time, and unfortunately also
1576820	1583920	sold on exchanges. So this was a successful inflation bug that was maliciously introduced
1583920	1590820	and exploited. These are particularly scary, and I'm sure we'll see this again and again,
1590820	1595340	because they attack the whole ecosystem rather than individual user or piece of software.
1597880	1605780	So some insights on node and wallet software security. Vulnerabilities are still very rare.
1605780	1612080	We only talked about four flaws here, and one was introduced intentionally. The question and
1612080	1617940	challenge to you, do we really have enough eyes looking at nodes, looking for the vulnerabilities,
1617940	1623500	and being able to patch them? There are bug bounties which are available, but I wonder if
1623500	1627900	there are enough participants and enough folks which are really pushing the limits of how secure
1627900	1633900	that software is. Ravencoin stealth commit and Trinity supply chain threats. This will likely
1633900	1639280	happen again. Attackers are highly motivated. There's a direct financial profit in attacking
1639280	1649440	these pieces of software. So this will likely repeat. So switching gears a little bit on the
1649440	1656020	layer two issues, which is smart contracts, that's even more concerning. There were, I mean,
1656020	1660880	I'm listing here 10 incidents. There was one more that happened in the last few days, which is not
1660880	1668660	included here. As DeFi projects are getting more and more popular, this is complex software,
1668660	1672780	which once again has a lot of different vulnerabilities which are constantly getting
1672780	1678000	discovered. I'm not going to cover all of these, just it would take a whole hour on its own,
1678000	1684960	but I'll focus on just three of these. So we'll start left to right. The first incident that
1684960	1692840	basically opened the year was the VZX DeFi project back in February. And the way that it started out
1692840	1698880	was there was a margin trading vulnerability that was exploited. 1 million worth of ETH was stolen.
1699000	1704380	What was interesting about this particular incident is that the attacker used flash loans
1704380	1710540	in order to amplify the attack. Flash loans is basically a mechanism where you can borrow
1710540	1719240	X amount of an asset and return it back to the initial point all within the same transaction.
1719240	1725200	So you're paying non-existent or minimal fees for doing that and allows you to execute an attack
1725200	1730380	in between since you have all these assets available to you in order to execute the attack.
1730380	1737640	So this kind of defeats a kind of a paradigm that we had before where we think that if it costs so
1737640	1744540	much money to attack something, that it makes it less likely that someone will actually execute
1744540	1751480	the attack. But with flash loans, attackers have really minimal risk to basically the transaction
1751480	1757740	reverting, then so be it, they don't lose anything. And they can return those funds and whatever they
1757740	1763620	loaned and they don't really lose anything. But if they win, then they win big. So in this case,
1763620	1769720	they won one million dollars worth of ETH. And we start seeing this flash loans approach happen
1769720	1775720	again and again throughout the year from this point on. Another incident which is interesting
1775720	1782680	to note is the balancer project. So again, 500k was drained from multi-token pools. This one is
1782680	1790000	interesting because it wasn't the vulnerability in the balancer smart contract itself, it was in
1790000	1794900	the way that one complex project was interacting with another complex project. In this case, the
1794900	1802440	developers could not predict that you could use deflationary tokens which change the logic to
1802440	1809180	the attacker's advantage. So when on its own, like in all their testing with traditional token
1809180	1815680	systems, then it works as expected. So this is something that is well known in the traditional
1816220	1820880	computer security practice and something that needs to be applied to DeFi projects as well.
1820960	1827080	Another gotcha in this one is that the vulnerability was reported in a bug bounty report.
1827080	1832300	So the good news is bug bounties work. I think a lot of the projects in the DeFi space do have
1832300	1838100	bug bounties. It's just, it's very hard to triage those things, very hard to find the ones which are
1839640	1846020	real examples of an attack and or which ones are not as good quality. So this is something
1846020	1853420	to keep in mind when running your own bug bounties. The last example, and again this is something that
1853980	1861720	example here repeated in other incidents, is a Bancor project where developers were notified
1862800	1868740	that they had a vulnerability, so they learned there was an issue. And the way that they
1868740	1876800	approached to protect their users is by attacking their own coin, their own smart contract,
1876800	1881080	with the same ways that an attacker would, it's just that with the purpose of actually
1881080	1886200	preserving users funds. But what was interesting here is that arbitrage bots, apparently
1886760	1891840	they're a piece of software constantly monitoring the Ethereum network, seeing that
1891840	1898940	if there's some large activity happening and it started automatically replaying it, trying to
1900140	1904420	make arbitrage opportunities, exploit arbitrage opportunities there,
1904420	1909920	picked up on developers trying to secure users funds and were automatically able to exploit
1909920	1915300	the project in the same way that the developers were doing it. So it's fascinating to see those
1915300	1922280	automated pieces of software that just piggyback off existing attacks.
1924120	1930360	So some insights on the Layer 2 smart contract security. This is going to be the year of DeFi
1930360	1938560	hacks. Both in the amount lost, the number of vulnerabilities discovered, unfortunately
1940120	1946140	the number of incidents is on the rise. So it will likely continue seeing that this year.
1947740	1953500	The bug bounty programs, they work and developers are catching bugs early, which is a good sign.
1953520	1958320	And I'll explain to you why in a bit when we talk about tooling and guidelines.
1959800	1965080	But the interesting trend is by Bancor is that we often have to hack ourselves to secure funds.
1965920	1972740	Complex code will continue having bugs and complex interactions between different projects
1972740	1977740	are also something that we need to think about as this is the whole point of DeFi is that you're
1978600	1982780	creating links between vast smart contract projects out there.
1984990	1990750	So I promised to talk about user security and we had a few major incidents that we're going to cover
1990750	2000630	shortly from Twitter and so on. But this is sometimes not as exciting of a field to look at,
2000630	2007950	but just as critical as any other discipline. So we're going to talk about cryptocurrency malware,
2009010	2014310	variety of scam and fraud schemes, as well as just talk a little bit like who are the
2014310	2018550	bad actors? Who is doing that? Who are the new players in this arena now?
2019650	2026120	So first, let's talk about the crypto mining malware. And this is how I got into partially
2026470	2032950	into cryptocurrencies is that essentially for a year, I was reversing nothing but ransomware
2033650	2042010	and crypto mining samples. For on the crypto mining side, it was always the Monero folks,
2042010	2048530	they are setting up their miners XM rig into anything that can possibly run XM rigs.
2048530	2053650	If they can run it on toasters, they probably would run it on toasters. So far this year,
2053650	2062130	it's not as bad as Russian scientists mining on nuclear stations. But still,
2062130	2068430	five EU supercomputers were hacked in order to run Monero miners. We had multiple issues with
2068430	2075170	Docker where attackers were scanning vulnerable API endpoints to take over existing Docker images
2075170	2080790	or just publishing their own backdoored Docker images on the Docker hub, which would also
2081410	2086470	mine Monero in the background. And of course, there's just never ending stream of
2088130	2095790	Windows desktop malware. One example is Lucifer, which is just, it's an arsenal of,
2095790	2098030	it was a whole exploit kit built into it,
2098030	2101910	which can self propagate attack other Windows machines and spread on its own.
2103990	2111710	So on the ransomware side, it seems like this is an ongoing threat. I'm not sure yet if the
2112430	2119330	trend is going down yet, but so far we had UCSF, which was attacked for 100 Bitcoin or so,
2119330	2125350	Travelex earlier this year, 285. Just a few days ago, we learned that Canon was attacked
2125350	2132290	with ransomware by, I believe, the Maze crew. We don't know. They're known to ask for Bitcoin
2132290	2140130	as a compensation, as a ransom. So we'll find out when the incident concludes. And of course,
2140130	2146090	it seems like every city in Florida is getting ransomware on their machines. So an example of
2146090	2154290	city Riviera had to pay 65 Bitcoins to get their systems back online. Yeah, so this sucks. This is
2154290	2159930	unfortunate. This is a threat that we have to worry about, especially on systems like UCSF
2160870	2166350	in the time of COVID. But this is something we'll continue seeing. Monero miners will
2166350	2175170	hack anything available to them to install the crypto mining malware. Ransomware appears to be
2175170	2180030	on the decline, but it's too early to say we're still only halfway through the year to establish
2180210	2187870	a trend. Crypto giveaways. Well, I mean, we all talked about the Twitter hack, which was
2187870	2196170	absolutely epic. I don't want to steal Victor's keynote presentation tomorrow, but he'll dive into
2196170	2203890	more details. But just to summarize, 130 accounts were hijacked on Twitter from exchanges to
2203890	2209070	celebrities to corporate accounts. The way they were hijacked is that the attackers were able to
2209070	2214950	basically get access to the internal tools through social engineering of Twitter employees.
2215470	2218730	And that's kind of fascinating. The best thing they could think of doing it
2219670	2225930	was running a BTC giveaway scam. So on one side, this is really bad. On the other side,
2225930	2233830	it could have been much worse. Elon Musk is getting no break from YouTube scammers. So
2233830	2241090	anytime you see a SpaceX feed, there's likely going to be send BTC notes everywhere. So sorry,
2241090	2251850	Elon. MLM scams are still continuing on as before. So we started with the BitConnect and moved on to
2251850	2257250	$4 billion enterprise plus token. And now the latest and greatest is Chinese police just busted
2257910	2266350	wall token scammers who managed to get $1 billion worth of crypto from 700,000 victims.
2269120	2276660	What's more interesting is not just the existing scams or the ones that I covered before, but the
2276660	2282520	trends of what are we going to see attackers experimenting with, which may become something
2282520	2289800	more prevalent. So one example is the MakerDAO phishing attack. And that is the first example
2289800	2296960	of a Web3 phishing scam. So you think that you are exchanging side to die.
2299980	2305880	You are interacting with MetaMask or so you think you're putting in your keys and then bam,
2305880	2310840	all your coin is stolen. So this is something that was reported early in the year and something
2310840	2319060	potentially we'll see in the future. The Justin Sun deepfake scam, that was fascinating. Someone
2319060	2327300	essentially recorded a video of Justin Sun doing some kind of investor scam, trying to get people
2327300	2334700	to send money to this unknown entity. And they played that video on a Skype call complete with
2334700	2341280	Justin cuffing and it looked very real and also very fake and strange at the same time. They
2341280	2347160	faked his passport to show for some reason. If you want to search that on YouTube, it's a
2347160	2352120	fascinating video to watch. It's still not something that was successful, but
2352120	2356860	it's kind of fascinating that scammers are even exploring deepfakes for that purpose.
2357320	2365820	The last example is the trust wallet scam. So we see just a barrage of backdoored fake wallet
2365820	2372540	software everywhere. If you search on Google, if you search in the app stores, what's
2372540	2379460	interesting about this case is not the wallet itself, it's how it was addressed, which is a
2379460	2385660	security researcher was able to actually attack the infrastructure, a fairly broken infrastructure
2385660	2389820	on the attacker side to start recovering the funds. And this is an interesting trend of
2390460	2394960	basically folks taking things into their own hands to help users.
2396420	2401260	So a quick note about the bad actors. So we already talked about the individual attackers,
2401260	2406680	so the Twitter folks, three were already arrested, one in Florida, one in UK.
2407820	2410640	So we'll call them lone wolf type attackers.
2411560	2417700	Insider threats such as Kasha employee who got malware in their machine and unfortunately
2418900	2425980	resulted in funds loss. Let's talk about APTs. So we're familiar with Lazarus Group,
2425980	2432220	so that's a North Korean APT, and a whole variety of financial ransomware groups who
2432220	2436660	basically attack anything with financial gain. What's interesting this year is the CryptoCore
2436660	2445280	APT, which is our very own dedicated cryptocurrency exchange advanced persistent threat.
2445940	2454380	So with a bull market maybe happening sometime in the future and the renewed interest,
2455220	2459300	we're probably going to see more dedicated groups like this as this becomes highly profitable
2459300	2468400	enterprise. So some insights. One is that users are taking things into their own hands.
2468660	2473960	So we have Woz who's suing YouTube for being too slow at taking down the giveaway scams.
2474020	2481680	We have Michael Turpin suing AT&T to basically compensate him for allowing the sim swap to happen
2481680	2487540	in the first place. We have researchers like Harry Denley reverse hacking scammers to get
2487540	2494160	users' funds back. While it does sound good on one hand that people are really pushing their
2495060	2500880	fighting back against the scammers, I really wish the industry was more mature and we had enough
2501700	2508760	tools on one side, but also user education and guidelines and other security controls available
2509620	2513320	that not as many people would get compromised in the first place.
2514040	2520520	MLM schemes are incredibly profitable. So this year out of all cryptocurrency scams,
2521080	2528260	basically 99% of the take was the Wo token $1 billion scam. In the past,
2528260	2536740	plus token with their $4 billion take, I think controlled a whole 1% of the total Bitcoin supply.
2536740	2540320	So these things are incredibly profitable and will definitely continue.
2541280	2545380	An interesting trend that exchanges are proactively blocking bad addresses to protect
2545380	2550220	their users. So there's always debate of centralized storage versus decentralized storage.
2550280	2556540	That's something that was interesting to observe this year is that exchanges like Coinbase,
2556540	2563560	they were basically blacklisting the attacker addresses immediately to save their internal
2563560	2568580	customers' funds. This is something that could be decentralized as well if you're looking for a
2568580	2576120	project to be able to alert users of doing some kind of unsafe action. And I believe a few
2576120	2582600	projects like MyCrypto are in fact doing that already. Scammers are getting more creative. So
2583300	2590540	the Web3 phishing sites and the deepfake scams, this is fascinating to see. I'm not sure how
2590540	2596000	profitable they are yet, but if they do become profitable at one point, we'll see a very rapid
2596000	2606700	rise of them. So to summarize the state of blockchain security insights that we've seen so
2606700	2613280	far, we talked about the exchange security, the number of hacks and financial damage is decreasing.
2613280	2618820	That's great. On the other side, existing incidents could have been easily prevented.
2619240	2624040	Attackers are going after more than just coins. They're going after PII. They're getting creative.
2624570	2630500	On the asset side, low hash rate GPU mineable proof-of-work coins are getting 51% attack,
2630500	2635980	will continue getting 51% attacked. There was a first example of a proof-of-stake attack,
2635980	2642380	and it was very efficiently executed. We're not finding nearly enough node wallet vulnerabilities.
2642380	2646980	I think there's an opportunity there for independent security researchers to really
2646980	2653380	start looking at that. Nasty backdoors and supply chain attacks against nodes and wallets
2654220	2659620	Again, if you can backdoor a node, you can attack the whole coin as the whole ecosystem.
2659620	2664260	You don't have to go after individual people and you can take basically the whole asset down.
2664260	2669920	So this is highly dangerous, highly critical to start looking at. D5 vulnerabilities are
2669920	2676260	unfortunately on the rise and so are the attacks as the whole ecosystem is becoming more popular.
2676580	2682960	On the user side, I don't see any new threats which are suddenly popped up. It's just a
2682960	2690080	consistent threat from miners, ransomware, fake software, and scammers are still sticking to
2690080	2694560	giveaway scams and MLM schemes. They're getting more creative here and there, but
2694560	2700840	they, I mean, the giveaway scams unfortunately still work. So an opportunity here is to work
2700840	2707540	on more user education to see if we can make users a little bit more secure.
2708720	2712360	So we've seen what the issues are. We've seen what the problems are. Here and there,
2712360	2716880	I dropped some ideas of what you can do to contribute to the field, make it more secure,
2716880	2723680	but really we can look at it more holistically and think of the blockchain security as just a
2723680	2729760	standalone industry that we can build up together. We can grow in terms of maturity, education,
2729760	2735580	projects, and so on. So some things, some ideas that I'm going to cover of what we can do is we
2735580	2740500	can talk about the guidelines and tools, how we can develop those. We can talk about growing the
2740500	2747040	community and specifically you, what is it that you can do today to start applying and contributing
2747040	2755680	to this field? So on the guidelines and tools side, there are a few amazing projects that are
2755680	2761280	available. So on the consensus diligent folks there, they keep on publishing a variety of
2761280	2767000	software to test smart contracts. They publish the SWC, smart contracts, weakness classification
2767000	2773760	registry, where you have a listing of top vulnerabilities, give you a good understanding
2773760	2778500	like what they are, how to prevent them. Trail of bits folks, they're publishing tools one after
2778500	2783920	another. They have the slither echidna. They published a document basically summarizing
2783920	2790580	findings from all of their smart contract security assessments. What are the trends? What are the top
2790580	2796180	issues to look out for? Open zeppelin essentially defined the field of how to write secure smart
2796180	2800600	contracts. I'm seeing a lot of the newer projects, they're just basically verbatim
2800600	2806160	adopting open zeppelin, open zeppelin templates, and they're very secure as a result.
2806320	2812360	Other projects like securing, they published the smart contract security verification standard.
2812520	2820360	NCC group published an OWASP style list top 10 list back in 2018. But unfortunately,
2821260	2824960	it wasn't really maintained for a while. So it would be interesting for them to
2825520	2830340	give new life to this project. Another one is the cryptocurrency security standard.
2830340	2835100	And this one is interesting because if you notice all the previous things that I mentioned,
2835100	2840840	they have to do with smart contracts and Ethereum. This is the only standard and project out there,
2840840	2847560	which attempts to talk more about how to securely generate keys, how to securely store
2847560	2852780	keys in the cold storage. I would love to see this project growing and having a larger impact
2852780	2858280	on the security of exchanges and nodes and wallets and so on.
2860820	2865160	Guidelines and tools are important. If we are to grow this industry, we need to have
2865160	2870160	large collections readily available for anyone who wants to contribute to this field
2870160	2875140	to be able to quickly learn from the mistakes of the past. On the smart contract side,
2875140	2879460	I think we're pretty solid. We have great tooling, we have methodology,
2879460	2884260	we have a variety of companies and consultants who are available to test your smart contracts.
2884260	2888260	So even though there are a lot of DeFi issues which are getting discovered,
2888260	2893540	but there's enough tools and folks that are experts in this field that can address this
2893540	2901120	trend very quickly. On the other hand, we're missing core guidelines, core methodology,
2901120	2907960	and practically no tools to address standalone blockchains. If someone wants to build a new
2907960	2914040	project, what is a good resource that they can read and learn about the failings of the past
2914040	2918840	and how they can learn and correct whatever future designs that they're building?
2919920	2925900	Node configuration operation. Nodes are at the core of any blockchain project. If nodes at some
2925900	2930080	point start having more and more vulnerabilities discovered, then this breaks down everything that
2930080	2935660	is built on top of them. Hot and cold storage security, key management, protocol design,
2935660	2943160	wallet design, innovations in blockchain forensics, and also user security, how to educate users and
2943160	2948980	give them simple guides on how to avoid scams, how to give them tools to quickly protect them
2948980	2954140	against going to bad websites like Google browser style. Like this is dangerous, don't send to this
2954140	2960860	address. One thing that I will be covering later in a separate talk on attacking and defending
2960860	2966440	blockchain nodes is I'm trying to create an OWASP top 10 style listing of what you can do to secure
2966440	2972940	your node infrastructure. But I invite all of you to pick out any one of those items in the list,
2972940	2980420	or if you imagine that you have more things to contribute to this field, and start writing
2980420	2985820	documentation, start writing tools. There's an entire field available that you can develop and
2985820	2992800	work with. On the community side, well, here we are at the Blockchain Village. There are three other
2992800	2998080	conferences which are also available that you can attend, hopefully virtually, throughout the year.
2999000	3005040	But I wonder if there should be more. I imagine that as the community grows and this field grows,
3005040	3011780	we're going to see more and more of these. We have our own competitions. So we have this year,
3011780	3018780	I believe, Victor is hosting a blockchain investigation competition. Last year, we had the
3018780	3024080	Capture the Coin and Chain Heist. There are some challenges which are ongoing, such as OpenZeppelin's
3024080	3030280	excellent EtherNOT. So this is great. On the knowledge sharing side, we have a variety of
3030280	3036040	resources. So you can go on Telegram, Reddit, Discord here for DEF CON, and you can talk about
3036040	3042060	blockchain security. Some newsletters that are also working on distributing, disseminating
3042060	3047540	knowledge. So the one that I'm running is Blockchain Threat Intelligence, where I try to
3047540	3053000	cover every piece of news that is related to this field. Not just related to smart contracts,
3053000	3060280	but just holistically. Exchange security, malware, user scams, and all of that. Consensus Diligence,
3060280	3064200	they're running an excellent smart contract security newsletter. So if you want to raise
3064200	3071680	focus on Ethereum and Layer 2 security, this is the resource to subscribe to immediately.
3072600	3078240	We even have our own shitty movies. So we have Crypto, where we have an AML officer
3078240	3083700	hunting down and investigating blockchains to bring down Russian mafia, and the Money Plane.
3083700	3088960	I'm not sure exactly what's happening there. I think the plot is they're hacking crypto on a
3088960	3094620	plane, which is a fortress and a casino. Point is, we have our movies, we have our media. We
3094620	3101520	made it officially. This is great. So some community insights. We're still a very small,
3101520	3107420	but growing community with unique competitions, gatherings, chat rooms, challenges, tools,
3107420	3113800	projects, and so on. Our community should and will continue growing. What's exciting to see is
3113800	3119520	blockchain security or BlockSec becoming a career option. Even today, you can look on the internet,
3119520	3124400	you can find jobs to do smart contract security testing if you want to. You can do blockchain
3124400	3130120	security engineering, so building projects, securing projects. Cryptocurrency forensic
3130120	3135880	analysis is going to be even more in demand after the Twitter hack. More people will try to
3136900	3142440	exercise this new skill set. So I'm hoping this will grow in the future.
3143800	3148540	The point is, I want to invite you. I want to invite you to contribute to this field.
3148720	3153500	So if you enjoy learning about the nitty gritty technical details, consensus negatives, smart
3153500	3158600	contracts, great. Join BlockSec, contribute to this field. There's plenty of things to explore
3158600	3163920	and do here. If you're a security professional, and you're just tired of finding yet another XSS
3163920	3170800	or SQL injection bug, you want to find some cool new things which are just not fully explored yet,
3170800	3175020	basically be able to define the field. Great, join BlockSec. There are plenty of bugs that
3175020	3181200	need to be found and patched by you. Are you an investigator who is trying to hunt down the
3181200	3187240	fraudsters, wants to understand how the hell do we track down fraud and bad guys on the blockchains?
3187240	3191840	Great, join BlockSec. There are plenty of blockchain analytics companies out there.
3192460	3197800	There's a growing body of investigators who are now capable of doing those tasks.
3197800	3203340	Join them. This is very interesting. Finally, if you're a developer, and you're just looking for
3203340	3208040	an exciting new project, and you really want to make an impact on the open financial system,
3208040	3214820	making that system more secure, contributing it to be more trustworthy by the people using it,
3214820	3222580	is a good way to help bring it about. So with that, join BlockSec, and thank you very much for your time.
