Decentralized Cryptocurrency Wallet Audit (Part 1)

iBitcome
iBitcome
Sep 4, 2018 · 4 min read

Here is Part 1 of a Decentralized Cryptocurrency Wallet Audit written by our lead engineer. Part 2 will soon be published!

Foreword

With the rapid development of blockchain technology, it has gradually brought cryptocurrency into the public eye. At the end of 2017, as the cryptomarket bull run reached a fever pitch it stimulated the traditional financial and technological market. Large number of cryptocurrency transactions spawned the development of cryptocurrency wallet. Depending on the network status when the wallet is in use, wallets are divided into a hot wallet and a cold wallet.

With the birth of various cryptocurrency wallet, in order to facilitate users to record addresses and private keys, the project official will also release a full-node wallet, such as Bitcoin Core, Parity wallet. Some third-party companies that want to further improve a wallet’s user experience developed Bitpie, imToken, AToken, Bixin, and other wallet apps, these wallets do not synchronize all the block data, so it is called a light wallet, both of these type of wallets are hot wallets. Cold wallets are usually hardware wallets. Common cold wallets include, Ledger NanoS, Trezor, Kushen etc. Since the private key never touches the network, the security of the wallet is relatively higher. However, due to the rapid iteration of the business scenario and the need for promotion, there are some security risks that will be overlooked regardless of the hot wallet or the cold wallet.

1.Status Quo of Wallet Security

The decentralized wallet is commonly called an on-chain wallet, and the private key is in the user’s control and assets are stored on the blockchain. If the private key is lost, the wallet will not be able to help the user to recover the private key and therefore the funds will be permanently lost. One major advantage of a decentralized wallet is the difficult to be attacked by hackers, and the user does not have to worry about the wallet provider having control of it’s funds.

The main security risks currently facing decentralized wallets are as follows:

Security risks in the operating environment: Encrypting the core file of the cryptocurrency wallet — the private key/seed phrase is stored on the terminal device. If the terminal device is insecure, it has a very high security risk for the private key/seed phrase.

Security risks of network transmission: Whether the network transmission uses a secure transmission protocol and certified verification. If not, it can cause a middleman to attack and steal the transmitted content.

Application security risks: The application’s own security risks are mainly concentrated on the security protection of the application installation package itself.

Security risks on file storage: For the private key/seed phrase of the cryptocurrency wallet, the storage method of the terminal device is safe is an important factor affecting the decentralized wallet.

Security risks of data backup: If the mobile application can be backed up, the private key/seed phrase can be brute-forced attacked using a more powerful machine.

2. Wallet Security Audit Items

Based on the analysis of the current status of cryptocurrency wallet apps, we have summarized the security items that need to be audited into four parts:

• Operating environment security

• Protocol interaction security

• Data storage security

• Functional design security

Wallet client APP security audit

Operating environment safety inspection

• Root Environmental Detection

The wallet APP does not perform root detection on the mobile phone environment, which will cause the APP to run on the root mobile phone, so that the APP-related core execution process is reversely debugged and analyzed. By installing the app on the root phone and to determine if the device has been rooted.

• Simulator environment detection

The wallet APP does not perform simulator detection on the mobile phone environment, which will causes the APP to run on the simulator mobile phone. Therefore any APP related core execution process can be reversely debugged and analyzed. By installing the APP on a simulator, we can determine whether is device has been simulated.

• APP Integrity Check

The wallet APP did not do an integrity test, will cause hackers to be able to repackage the APP with malicious code, steal sensitive information, such as user mnemonics and private keys, and use the tools such as apktool to repackage the APP, and modify the verification mechanism to determine whether the vulnerability can be taken advantage of or not.

• Network Proxy Detection

When the APP is running, if it does not detect what proxies is used, which can cause the network data to be intercepted by the hacker during the protocol interaction. Use burpsuite, fiddler and other tools to check if the app has proxy detection.

• Network Security Detection

The wallet APP does not detect whether it is safe to use the DNS of the current network. There will be a possibility of it being hijacked, and some data being returned by the network can be maliciously modified by the hacker. The hacker attack can be simulated by technical means to confirm whether it is safe.

iBitcome

Written by

iBitcome

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade