state internet financial security technology expert committee: overview of blockchain technology security (attached)

Posted by tetley at 2020-02-27


1、 Brief introduction

2、 Basic network security risk

2.1 data layer: information attack and encryption algorithm attack

2.2 network layer: risk of node propagation and verification mechanism

2.3 solutions and suggestions

3、 Platform level security risk

3.1 consensus layer: Security comparison of common consensus mechanisms

3.2 incentive layer: risk of issuance and distribution mechanism

3.3 security risks related to the contract layer

3.4 solutions and suggestions

4、 Application layer security risk

4.1 common security problems of nodes

4.2 security comparison of encrypted asset Wallet

4.3 common security problems of encrypted asset trading platform

5、 Summary

The national Internet Financial Security Technology Expert Committee continues to track the development of blockchain technology, conducts in-depth research on blockchain security, blockchain + AI, blockchain + supply chain and other fields, and will launch a series of reports. This report focuses on "blockchain technology security" and is jointly launched by Shanghai zhenchain company, with a view to becoming the research basis for industry development.

1、 Brief introduction

The development of blockchain technology is in the ascendant at present, most of the technology and application are in the experimental stage, most of the current security events are concentrated in the field of encryption assets, which has caused great economic losses to users, and its security issues are increasingly concerned by the industry.

At the same time, once the blockchain smart contract is deployed in the distributed and decentralized network, it is difficult to change. On the one hand, this hard to change property prevents data manipulation and establishes a trust mechanism based on encryption algorithm. But on the other hand, when blockchain faces security attack, it also lacks effective correction mechanism and is hard to reverse.

This paper mainly discusses the security of blockchain industry, as well as the corresponding solutions and suggestions. In this paper, blockchain applications are divided into three layers: basic network, platform layer and application layer. The three levels interact with each other. The security problems in each link will bring more security problems to the next link. Therefore, in the process of blockchain project development, from design to implementation, from verification to response, it is not only necessary to consider the security of a single link, but also need to put it into the overall level to judge the possible risk points.

2、 Basic network security risk

The basic network is composed of data layer and network layer, which is the basic part of the blockchain. This part encapsulates the underlying data of the blockchain, uses asymmetric encryption for the data of the blockchain, uses P2P network and sets up the propagation and verification mechanism. At present, it mainly faces the following security problems.

2.1 data layer: information attack and encryption algorithm attack

(1) Data block information attack risk: on the one hand, it is difficult to delete the information written into the blockchain, and lawbreakers write some harmful information, virus signature, obscene information, etc. into the blockchain, affecting the ecological environment of the blockchain. On the other hand, a large number of spam transaction data attacks will block the blockchain, making effective transactions and information unable to be processed.

(2) Security risk of encryption algorithm: SHA-1, which was widely used in the early years, was proved to be insufficient in security by Wang Xiaoyun, Yin Yiqun and Yu Hongbo in February 2005. A group of collisions can be found with less than 69 power of calculation complexity. In addition, SHA-2 algorithm is basically similar to SHA-1. Although there is no effective attack at present, its security has been seriously questioned. At present, other encryption algorithms, such as sha-224, SHA-256, sha-384, sha-512, have no public evidence to show that they have loopholes, but they are not perfect under the rapid development of quantum computing. At present, the main attacks against encryption algorithms are: exhaustive attack, collision attack, length extension attack, backdoor attack, quantum attack, etc.

2.2 network layer: risk of node propagation and verification mechanism

(1) P2P network risk: blockchain information dissemination adopts P2P mode. Information dissemination between nodes will send information containing their own IP addresses to neighboring nodes. Due to the uneven security of nodes, poor nodes are vulnerable to attacks. At present, the ways to attack include eclipse attack, eavesdropping attack, BGP hijacking attack, node client vulnerability, denial of service (DDoS) attack, etc. For example, in March 2018, the "eclipse attack" broke out on the Ethereum network.

(2) Risk of broadcasting mechanism: nodes are linked with each other, and one node broadcasts information to other nodes. These nodes confirm the information before broadcasting to more nodes. In the broadcast mechanism, there are two common attack modes: double flower attack and transaction extensibility attack. Double blossom attack means that the same encrypted asset is spent many times, which is more likely to happen when the merchant accepts the 0 confirmation transaction payment or through the 51% computing power attack. The trade extensibility attack is also called malleability, that is, the same thing has no change in nature, and its shape has changed. The attacker modifies the original trade input signature by using the characteristics of the trade signature algorithm, and generates the same new trade of input and output, resulting in the original trade not being confirmed to form a double flower.

(3) Risk of validation mechanism: the process of updating validation mechanism is easy to be bypassed. Once there is a problem, it will lead to data confusion, and it will involve fork problems, so it is necessary to ensure the rigor of the mechanism.

2.3 solutions and suggestions

As the bottom layer of blockchain, the security of basic network is particularly important.

Keep pace with the times and pay attention to the latest progress in technology security. With the rapid development of quantum computing, the encryption system can only keep away from hacker attack if it is constantly developed and updated.

Accept professional code audit and understand relevant safety code specifications. In order to increase the credibility and transparency of most blockchain projects, open-source management of their project code is carried out. However, this also makes the project more vulnerable to attack. Accepting professional code audit and focusing on security coding can effectively avoid potential risks.

3、 Platform level security risk

The platform layer is composed of consensus layer, incentive layer and contract layer, which is the bridge between basic network and application service layer. This part encapsulates the consensus algorithm, distribution mechanism, allocation mechanism, script and smart contract of network nodes.

3.1 consensus layer: Security comparison of common consensus mechanisms

Consensus mechanism is an algorithm to reach consensus on the sequence of transactions in a time window. Blockchain can support different consensus mechanisms. Currently, there are consensus mechanisms such as pow, POS, dpos, pool verification pool mechanism, BFT, etc. This article introduces the security of three common consensus mechanisms:

3.2 incentive layer: risk of issuance and distribution mechanism

(1) Risk of issuance mechanism: at present, there is no exposure of security risk events, but there are security risks in the issuance mechanism of incentive layer.

(2) Risk of allocation mechanism: a large number of small computing power nodes are easily added to the ore pool, which threatens the decentralization trend.

3.3 security risks related to the contract layer

The contract layer mainly encapsulates various scripts, algorithms and smart contracts of blockchain. At first, blockchain can only be used for trading, and the emergence of contract layer enables many fields to use blockchain technology. Turing's complete representative is Ethereum, whose contract layer includes two parts: Ethereum virtual machine and smart contract. At present, the following attacks may occur in the contract layer to threaten the security of the blockchain: solidity vulnerability, escape vulnerability, short address vulnerability, stack overflow vulnerability, reentry attack, transaction order dependency attack, timestamp dependency attack, integer overflow attack, etc. For example: on July 19, 2017, an escape exploit source code for VMware virtual machine appeared on GitHub; on June 17, 2016, Dao hackers took away Ethereum worth 50 million US dollars by using reentry vulnerability; on April 22, 2018, hackers took advantage of mechanism vulnerability to transfer out a large number of tokens, resulting in overflow of calculation results, and completed the issuance of tokens. A large number of certificates are issued by BEC out of nothing, and the value is almost zero.

3.4 solutions and suggestions

At present, the existing consensus mechanisms are not perfect. We need to explore and design a more secure and faster consensus mechanism.

Before the development of smart contract, it is necessary to prevent the existing loopholes.

Before the smart contract is released, sufficient security testing is required.

Pay attention to relevant information, and professional personnel optimize the code in time.

Conduct code audit regularly, including but not limited to: transaction security review, access control review, etc

Abnormal operation monitoring, monitoring the abnormal behaviors of deployed contracts, and reducing losses.

4、 Application layer security risk

As a practical landing scenario of blockchain technology, the application layer is also the most frequently and most frequently affected by security events in all architectures of blockchain industry. The attack targets are mainly concentrated in the fields related to encrypted assets, such as user nodes, digital asset wallets and trading platforms, and the actual loss caused by each security event can reach tens of millions to hundreds of millions of dollars.

4.1 common security problems of nodes

(1) Puppet network refers to the behavior that malware developers or operators mine encrypted assets without the knowledge of the other party by infecting the victim's systems and devices.

Hackers mainly occupy users' computing power and electric power by installing Trojans in web pages, game assistant programs and system background, and use them in mining for illegal gains. The supercomputers of Harvard University and the national foundation of the United States have been attacked in a similar way before, and there are often related events in China, such as web pages being modified in series or applications being implanted into mining Trojans.

Under the premise that mining needs a lot of computing power, the computing power of a single equipment can not meet the demand of mining. So the attacker expanded the scope of the attack target equipment, especially the Internet of things equipment which is vulnerable to attack became the main target, which also formed a larger scale puppet network mining. At present, the main infected objects include digital video cameras, routers, surveillance cameras, print servers, game consoles, etc. Common attacks are:

Cross site scripting

Exploit of Remote Code Execution Vulnerability in Microsoft

Command buffer overflow exploit

SQL injection

Blacknurse denial of service attack

Figure 3: Statistics of some puppet network attack events in 2017 (data source: trendlabs)

(2) Solutions or suggestions

These malware may threaten the availability, integrity and security of the system, and make the end users and enterprises face the risk of information stealing, hijacking and infecting other malware. There is no one-off solution for these malware, but the risk of infection can be mitigated by:

Regularly updating devices with the latest patches helps prevent attackers from exploiting system vulnerabilities.

Change the device default credentials and enable the device firewall, especially when using a home router.

Disable unnecessary components in the router, or reconfigure the router, such as changing subnet address, using random IP address, enforcing SSL, etc.

If the IOT home device is linked to a mobile device, only legitimate apps are used through the official / trusted store.

Consult with IT administrators and security experts to develop countermeasures and monitoring processes to prevent or mitigate advanced threats, such as application whitelists or similar security mechanisms.

4.2 security comparison of encrypted asset Wallet

(1) Blockchain wallets are mainly used to store address and private key files of blockchain assets. Currently, they are divided into different types of digital asset wallets according to different usage scenarios, mainly including:

Centralized Wallet: log in with user name / password, and you can trade multiple passes in multiple chains.

Multiple wallets: you can save certificates on different chains through the same private key.

Network Wallet: through the Chain Wallet hosted by the network, some need to store the private key after the password, while others need to store the private key and upload it before performing any operation on the account.

Local Wallet: locally installed software used to perform operations on a specific blockchain. The private key still needs to be stored in a place accessible to the wallet.

Hardware Wallet: cold wallet, stored in a physical offline device such as hard disk, USB, only connected to the network when in use.

(2) At present, the main factors affecting wallet security include:

Phishing: simply to get the information needed to access the account by cheating. For example: a fake link sent by email that requires a private key or account password to be entered.

Malicious tripartite program: wallet with background program vulnerability downloaded from unofficial address.

Computer hacker: track the operations performed on the computer. The key or password will be stolen.

Lost password / key: Lost stored key, password or mnemonic.

(3) Security problems faced by different digital asset wallets

Different from other applications, wallets do not have a unified solution at present due to their different purposes and properties. Users can judge the appropriate encrypted asset wallets through their applicability. From the perspective of users, there are mainly the following expansion functions:

Private key control: it means that you can use other software to obtain the private key and access digital assets at any time, or even interact directly on the chain.

Account recovery: when the password is forgotten or the private key is lost, the service can be used to recover the access rights.

Access to airdrop / forks: when a hard fork occurs or a pass is airdropped to another pass holder, only the private key can be used to access these new passes.

Store certificates on different chains: use the same account to store certificates on different chains.

4.3 common security problems of encrypted asset trading platform

(1) Encrypted assets are an important part of the digital economy, but frequent network attacks against the transaction platform of encrypted assets continue to impact on users' trust in digital assets. In recent months, people have witnessed several attacks on trading platforms. For example, coincheck, Japan's crypto asset trading platform, was invaded in January 2018, with a loss of more than $500 million. The Korean trading platform coinrail also confirmed that it was hacked in June 2018, with an invasion loss of 36.9 million US dollars.

At present, there are six kinds of common hidden dangers and loopholes in the encrypted asset trading platform, namely denial of service attack, phishing event, hot wallet protection problem, internal attack, software loopholes, and trading forgeability.

Denial of service attack: the attacker makes the trading platform inaccessible through denial of service attack, which is also the most important attack against the trading platform at present. Because users can not accurately distinguish the degree of attack, they will often cause panic asset transfer, which will bring losses to the trading platform.

Phishing incident: at present, even the best technical measures cannot protect the encrypted asset trading platform from phishing attacks. Fraudsters often confuse the victims with fake domain names or fake pages. If the victims can't distinguish the authenticity of the trading platform, they will suffer from the loss of assets.

Hot wallet protection problem: many trading platforms use a single private key to protect the hot wallet. If criminals can access a single private key, they will be able to crack the hot wallet related to the private key. A typical example of private key attack is the attack of yapizon in Seoul stock exchange in 2017. The attacker twice stole the hot wallet from the trading platform in a year, which resulted in nearly 50% of the assets loss of the trading platform, and ultimately led to the bankruptcy of the trading platform.

Internal attack: due to the lack of perfect risk isolation measures or the lack of supervision on the authority of employees, some employees with platform operation authority use internal trust to steal. For example, in 2016, when shapeshift employees stole BTC, they caused a loss of 230000 US dollars to the trading platform before and after stealing and reselling sensitive information to others.

Software vulnerability: including single sign on vulnerability, OAuth protocol vulnerability, etc. Countries have laws requiring banks or other financial institutions to implement information security measures to protect customers' deposits. However, due to the fact that the blockchain field is still in its infancy, there is a lack of such specifications applicable to encrypted assets. Therefore, it is no accident that many trading platforms have a large number of loopholes under the condition of lack of security regulations.

Trade malleability: backers of blockchain technology often believe that blockchain transactions are highly secure because they are recorded on allegedly unchangeable records. But each transaction needs to be signed accordingly, and the record can be temporarily forged before the final confirmation of the transaction. "Mt. GOx event" is one of the largest attacks in the history of encryption assets, which has caused a total loss of 473 million US dollars. This attack was carried out by hackers submitting code changes to public account books before the initial transaction was released.

(2) Solutions and suggestions

Continue to invest in technology development, resist the increasing hacker attacks, and effectively enhance the security of the system.

Ensure that employees protect login credentials related to software applications installed on professional work computers or personal computers, and improve security training and security awareness.

Regular safety test and establish perfect emergency response mechanism.

Network security isolation and careful service port opening.

Select service providers with perfect protection ability.

The industry needs a unified governance mechanism, the introduction of third-party supervision and cooperation, and timely coordination with the outside in case of problems.

Five, summary

The above content outlines the possible security problems in the three architecture layers of blockchain. In general, first, in architecture design, due to the highly autonomous nature of blockchain applications, once the smart contract runs, it cannot be reversed, so the initial security design specifications are particularly important. Second, in the specific development stage, the code quality, development tools and application platform maturity of some blockchain developers need to be improved and improved continuously. Third, in terms of the extension of blockchain issues, in view of the fact that the security issues are always non-static, we pay attention to the security issues of the underlying technologies of blockchain. At the same time, the security issues of blockchain also extend to the traditional fields of personal information security protection, infrastructure security, network security, etc., whether in the concept of blockchain or in the practical application level, Both need long-term and effective correction mechanism.

The national Internet financial security technology expert committee will continue to track the development of the industry, and will release more research reports in related fields in the future.

(source: website of mutual fund security committee)