Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

avatar
余YU
6 years ago
This article is approximately 2064 words,and reading the entire article takes about 3 minutes
The security issues of blockchain ecology cannot be handled by one company.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

On September 5, at the POD Conference Security Forum hosted by Odaily and co-organized by 36Kr Group Strategy, Wu Jiazhi, vice president of RD of PeckShield, delivered a speech entitled Blockchain Smart Contract and Public Chain Security.

In his speech, Wu Jiazhi pointed out that the security issues in the entire blockchain ecosystem include smart contracts, infrastructure, wallet issues, mining pool issues, etc.

He also said that because there are many blockchain-related project parties, there are various public chains, public chains have various implementations, and smart contracts also have various implementations. These security issues cannot be solved by one company, and more people are needed. To do this well together, so PeckShield and BCSEC under White Hat Exchange jointly established the DVP vulnerability platform. The platform was launched on July 24th, and has received more than 1,700 vulnerabilities. There are already 705 related vendors, and a total of more than 10,000 white hats have been registered. PeckShield hopes to cooperate with all relevant parties to make the whole ecology better.

The following is the full text of Wu Jiazhis speech, enjoy:

Good afternoon, ladies and gentlemen, I am Wu Jiazhi, and I would like to share the research results of PeckShield. Our company started blockchain research at the beginning of this year, and it has been almost half a year since now. The earliest research on blockchain-related information started from the code, and now the research scope has expanded to all aspects of the entire blockchain ecosystem. Everyone knows that our name may have started with the exposure of smart contract issues. Later, we also made a lot of public chain-related vulnerability disclosures, and also did research on data analysis as mentioned by the previous guest. We sent some news related to data. There are vulnerability analysis related to popular games and so on.

One of our goals is to hope that the entire ecology can operate in a safe state. We believe that the blockchain will replace some human economic behaviors to a certain extent, and what is very different from previous economic behaviors is decentralization. Therefore, there is no such institution to guarantee the safety of your funds. If you lose your money, there is no way to find a court or bank to recover it for you. In such an environment, the entire ecological security issue is very important.

Let me introduce myself first. I was in school before, and came to Beijing to work in 360 in 2015. If you have Android phones from 2013 to 2015 and 2016, there may be some code I wrote in them. Before this year, I was doing some things as a white hat of system security research, and then I started to do blockchain-related security research.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

I am also doing some data analysis recently, and this is a relatively large trend graph. This is the first time I saw how this picture is so big. You can see that we are here now, at the beginning of September, and last year. There are two lines. The blue ones are the monthly additions we monitor. You can see the fluctuations in the number of contracts in blue, and the green is the number we monitored. You can see that there was a decline at this time last year. You should know the reason for this. By the end of the year, there are various types including Ether Cat, which has a climb at this point in time. It rebounded a little in July, and it got a little colder last month, and everyone understands that.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

The picture just now is a relatively simple data. Lets count the amount every month to see how his situation is. The picture below is more interesting, let me explain. Homestead, this stage is 1.55 million blknum, one circle represents 10,000 blocks, so there are 115 circles on this graph. Next is the X coordinate, which means that there are more than one transaction in the 10,000 blocks. For example, this block may be almost 8200, and about 82% of the 10,000 blocks are not empty blocks. So you can understand that if the circle is on the right side of the graph, it means that the network is fully loaded.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

Let’s look at the Y coordinate again, which is the average number of TXs in these 10,000 blocks. The maximum value is more than 200. Why is this value? The reason is that each block has a gas upper limit. You can understand it as the TX carried by each block. The number is limited. At the beginning, the dots are all at a very low place, but there is a growth to the right. At the beginning, many of them may be empty blocks, such as the creation block in the lower left corner, but there is no TX , Entering the next stage, you can see that this graph starts to grow upwards, but also to the left, which still belongs to a situation where the network is not too congested.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

At the time of Byzantium, there are more and more circles to the right, and the entire network becomes more crowded.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

Since the last year, it has basically been posted to the far right. It may be due to various phenomenal games, including hacker attacks, so now, a phenomenon-level incident may happen randomly, including games such as Fomo3D , may lead to this result. This is some phenomenon we observed from the data of PeckShield.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

Next, we will talk about some security issues of the entire blockchain ecology at several levels. You can see here, such as smart contracts, infrastructure, and other links such as wallet issues. We have some research.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

First of all, let me talk about the problem of smart contracts. This is a similar problem to the US chain incident that everyone first knew about PeckShield. The code is here. After these values ​​are added together, an overflow number will appear, which will cause the amount check to be bypassed. Lets look at the case on the right side of the screen. You can see the appearance of two mobile phones on the right side. Next to it is the process of my attack. You will see the update on the right side and I will create two large numbers out of thin air. Countless, in this way, we generate two different addresses, which are the wallet addresses of the two mobile phones, causing this place to overflow, and then this check is bypassed, which is equivalent to seeing a place where many digital assets are generated , that is, in the place of balance += value, empty glove white wolf, this is a very serious problem.

There is a relatively recognized solution to such a problem, that is, in this place, it is a relatively rigorous calculation function library called Safemath.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

Here is an allowance operation, which can guarantee that you will not overflow, so why do you see that my title says Unsafemath? We recently discovered a very interesting phenomenon. On your right hand side, in the implementation of safeSub here, assert is used to ensure that B is less than or relative to A, that is to say, you cannot subtract a relatively large number from a relatively small number. The assert method can ensure that when you make a mistake, your gas will be burned out, and the TX will end. This is also the details of the attack that Mr. Guo just mentioned. That is to say, there is such a mechanism in the original architecture, but in his safeMath implementation, an additional assert function is added, which returns directly when an error occurs. So be careful when choosing your security library.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

Let me talk about the research on infrastructure again. The screenshot on the left is the website of the bug bounty program. PeckShield is currently ranked fifth. Currently, there are three vulnerabilities submitted to the foundation in the early stage, all of which are related to the public chain. I will briefly introduce one of them today. It has been fixed. Don’t worry, if you upgrade Geth to the latest version, this vulnerability does not exist.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

Let’s briefly talk about this vulnerability. We named it EPoD. Just send a data packet to you. Now your laptop runs a client. I know your IP and send it to you directly. After you receive it, your client will Crash, this crash sounds like nothing, but when I directly broadcast this data department, it just dies. In fact, you can easily think of this as an attack that can be used for computing power.

I don’t talk too much about the details of the code. Simply put, I make a certain data negative 1. The code implementation here is to add this number + 1. When you want to allocate memory size, negative 1 + 1 is zero, and I go to access again. Negative 1 The position of this place will eventually lead to out-of-bounds access, and the program will crash.

Lets just look at the case directly.

Wu Jiazhi, Vice President of RD at PeckShield: More people are needed to cooperate to solve blockchain ecological security issues | Blockchain POD Conference

The one on the right is the client I am running. Let me first prove that my client is downloaded from the official website. I guarantee that this client is not modified by me, but downloaded directly from the official website. Wait a moment and after checking, two windows will appear on the left. The upper left corner is the running status of the attack code, and the lower left corner is a picture of capturing packets. I just did an operation, which is to turn off the gateway first to ensure that the machine is no longer connected to the Internet. , all the data packets measured on the network are packets from the local machine. Seeing that the Geth client has already taken the lead on the far right, here is the UDP packet I just captured. If you know, this kind of packet does not need to establish a connection. I can spread my attack on the gateway or somewhere else , the upper left corner is my attack code, the target of my attack is 127.0.0.1, which is our local IP, this is the attack packet, so as long as the Golang client below a certain version receives this packet, it will crash.

In fact, we have a whole series of such vulnerabilities, and this is the first one to be made public. We will talk about it at tomorrows Internet Conference, and there will be several cases like this in the whole series.

The above are two simple cases I made for the security issues of the public chain and smart contracts. You can understand it. If you really want to see the code, you can pay attention to the official website of PeckShield.

Finally, I would like to say that it is a project we recently cooperated with BCSEC under Baimaohui. We feel that there are too many blockchain-related project parties. There are various public chains, various implementations of public chains, and various smart contracts. This kind of implementation, so we began to feel that this security problem is not something that our company can handle. We need more people to do this better at the same time, so we set up a platform called DVP Vulnerability Platform. On the far right is the status of vulnerability submissions. Simply put, we use a crowd-testing method to gather all researchers or white hats with security capabilities, and let the project party offer rewards for their projects on our platform. For example, if I want to test version 1.0 now, what kind of reward will you get if you find a vulnerability of what level, so as to encourage white hats to help us make the whole ecology better. This platform was launched on July 24th. So far, more than 1,700 vulnerabilities have been received, and there are 705 related manufacturers, with a total of more than 10,000 registered white hats. These are the manufacturers that have settled on this platform, including our own company website, which also puts rewards on it.

PeckShield actually hopes to cooperate with all project parties to make the whole ecology better. I also mentioned this matter at the beginning. The far right is our company’s official website. We will release our latest research results on it from time to time. You can Pay attention.

The above is my sharing today, thank you.

Original article, author:余YU。Reprint/Content Collaboration/For Reporting, Please Contact report@odaily.email;Illegal reprinting must be punished by law.

ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

Recommended Reading
Editor’s Picks