ETH Exchange ETH Exchange
Ctrl+D ETH Exchange

First release | Dry goods sharing: Exploitation and analysis of encrypted wallet vulnerabilities



With the rapid development of blockchain technology, encrypted assets have gradually become one of the investment methods for the public. The rapid growth of the scale of global encrypted assets makes the wallet an indispensable asset management tool for every encrypted asset owner. In the field of encryption, digital wallets are closely related to funds, and more and more people realize the importance of digital wallet security. On August 9, 2020, Peiyu Wang and Minzhi He, security engineers of CertiK, delivered a speech at the DEF CON Blockchain Security Conference on the topic: Exploit Insecure Crypto Wallet (encrypted wallet vulnerability utilization and analysis) theme report. A crypto wallet is a device, program or service that stores private and/or public keys. Because cryptocurrencies are virtual, encrypted wallets cannot be used to store real coins. But when we make a transaction, the encrypted wallet can use the user's private key to sign the transaction and broadcast it on the blockchain. There are different kinds of crypto wallets, such as software wallets and hardware wallets. This talk will focus on web wallets and desktop wallets. This is a typical web wallet interface, which is our CertiK Deepwallet wallet. Users can see the account balance and the option to send currency in this interface. Because this is a COSMOS-based wallet, it has a delegation function. When we talk about web application security, the top ten security vulnerabilities of the Open Web Application Security Project (OWASP) come to mind first. Here are some statistics on the top 10 security vulnerabilities of the "OWASP Top 10" among 27 web wallets surveyed by CertiK security engineers. CertiK security engineers found cross-site scripting attacks (XSS) in 3 wallets, and 2 cases are selected here for case study. LBank Blue Shell launched BOSON at 01:00 on April 10, and opened USDT trading: According to the official announcement, at 01:00 on April 10, LBank Blue Shell launched BOSON (Boson Protocol) and opened USDT trading at 23:00 on April 9 Open deposit at 00, and open withdrawal at 16:00 on April 12. Open the recharge transaction BOSON at the same time as going online to share 10,000 USDT. At 01:00 on April 10th, LBank Blue Shell opened the deposit transaction BOSON to share 10,000 USDT. The user's net recharge amount is not less than 1 BOSON, and the user can get a USDT reward equivalent to 1% of BOSON according to the net recharge amount; the trading competition will be ranked according to the user's BOSON transaction volume, and the top 30 can be divided according to the proportion of personal transaction volume USDT. For details, please click the official announcement. [2021/4/7 19:54:33] We found a SqI injection vulnerability in a decentralized wallet. But its database only contains transaction data. Since the transaction data in the blockchain has been made public, it does not make sense to use Sql injection to steal data. Since there is no way to use SqI injection to achieve background code execution, in this case, this SqI injection attack has little practical impact. In addition, there is a loophole in the access authority of an API in this decentralized wallet. Unauthorized users can tamper with other people's 2FA settings, but there is no way to use this loophole to steal assets in other people's accounts. Many web wallets lack security headers, such as Content Security Policy (CSP) and "X-Frame-Options" headers, which can make the wallet vulnerable to clickjacking (Clickjacking) attacks. Some wallets still use outdated JavaScript libraries and Nginx/Apache servers with CVEs, and these vulnerabilities cannot be directly exploited. CertiK security engineers have not found any wallets that process data in XML format, nor have they found any wallets that have performed any deserialization operations, so no XXE and deserialization-related vulnerabilities have been found. Regarding logs and monitoring, there is no more information for the time being. ①Case 1: DOM XSS vulnerability of decentralized web wallet This is a case of DOM XSS vulnerability of decentralized web wallet. This wallet supports a single protocol and has all the basic functions of a web wallet. First Release | Canaan Announces Strategic Cooperation with Northern Data in AI, Blockchain and Other High-Performance Computing Fields: According to official news, on February 17, 2020, Canaan Announced a partnership with Blockchain Solutions and Data Center The service provider Northern Data AG reached a strategic cooperation. The content-ethexc of this cooperation covers high-performance computing fields such as AI, blockchain, and data center operation and maintenance. Canaan has rich experience in the development of ASIC chips for high-performance computing. Northern Data AG focuses on the construction of high-performance computing infrastructure such as blockchain and data centers. Through this strategic cooperation, the two parties will further release growth potential in emerging fields such as AI and blockchain. [2020/2/19] Vulnerable function This application will save the last access location: after the user unlocks the wallet with the password, it will jump back to the page before unlocking. The following figure is the code to realize this function. If you have experience testing web applications, you know that there is a high chance of DOM XSS vulnerabilities in this case, which is the case in this case. DOM XSS requires Source and Sink. The Source is where the application receives untrusted data (user input), which it then passes on to the Sink. When a user visits this link, "" will return  "?returnTo=/validators", and then "{returnTo}" will contain "/validators". Sink is where untrusted data from Source is processed, so Sink is here: "window.location.href", if the user enters "returnTo=/validators". The wallet returns to "/validators", i.e. goes to the validators page. If you enter "returnTo=javascript:alert(1)", an alert window will pop up in the browser. First release | Vice President of Global Business of Huobi Group: Supervision will determine the speed of blockchain technology and cryptocurrency landing: On January 21, Ciara Sun, Vice President of Global Business of Huobi Group, said at the Davos World Economic Forum 2019 is an important year for the regulatory attitude of blockchain and digital currency. In the United States, by the end of 2019, there were 21 bills aimed at cryptocurrency and blockchain policy, these bills include tax issues, regulatory structure, tracking functions and ETF approval, which federal agencies regulate digital assets, etc. The European Union (EU) implemented a new law on January 10, 2020, requiring cryptocurrency platforms to adopt stricter anti-money laundering practices. Switzerland, Japan, Lithuania, Malta and Mexico have passed laws requiring exchanges to be licensed according to KYC and AML guidelines. Countries like China, Turkey, Thailand, and others are planning their own central bank digital currencies (CBDC). Regulation will determine the speed at which blockchain technology and cryptocurrencies will be implemented. [2020/1/22] Keystore and Password are decentralized web wallets. After a user creates an account or imports an account, both Keystore and Password are stored in local storage. Reading Local Storage Using JavaScript JavaScript can read information in local storage. In this case, the key-value data appears as "Hello World" stored in local storage. JavaScript can execute LocalStorage.getItem("Hello") to get "World". Using DOM XSS How to use the discovered DOM XSS vulnerability to steal Keystore and Password in local storage? In this URL below, it can read the content-ethexc of Keystore and Password and send it to the hacker's server. In the hacker's server log, you can directly see the Keystore content-ethexc and Password. Once in possession of this information, it is equivalent to controlling the user's account, can log in to their wallet and transfer money out. First release | DVP: Vulnerabilities in the Bitstamp exchange can lead to a large amount of KYC and other information being leaked: Golden Finance News, recently, DVP received a vulnerability in the world-renowned exchange Bitstamp submitted by security personnel. Attackers can use this vulnerability to view a large number of user IDs, Sensitive information such as bank cards poses a serious threat to user information security. In order to avoid the vicious incident of KYC leakage, the DVP security team notified the platform to repair it as soon as possible after receiving the vulnerability, but did not receive a response. DVP reminds relevant users to pay attention to personal information security to avoid losses. [2019/8/13] Repair method The repair method of the web wallet manufacturer is that whenever the user unlocks the wallet, the web wallet will always be redirected to the personal homepage, so as not to give the attacker any chance to insert malicious code. ②Case 2: Reflected XSS vulnerability in a hosted web wallet The second case study is about a reflected XSS vulnerability in a hosted web wallet. Hosted web wallets are servers that manage all private keys. To log into the wallet app, the user receives a one-time password via email. The wallet in this case supports 16 different currencies, has all the basic functions of the wallet, and an additional function called "twitter giving". API Operation The URL format of the API is similar to "/API/{endpoint}", for example, the API for obtaining user transaction information is "/apiUser/cloudTrans". If you access a non-existent API endpoint, such as "/api/test", the server will return a page with an error message, as shown in the figure below "Unable to parse the request". In addition, we found that the content-ethexc in the link appeared in the page returned by the server. This represents a signal: If there is no processing or encoding of user input in the background, it may be attacked by Reflected XSS. First Release | Antminer S17 Performance Exposure Using new heat dissipation technology and global optimization and customization solutions: Jinjin Finance News, a few days ago, Bitmain’s upcoming Antminer S17 performance exposure. According to Moments, the product manager of Antminer S17, the new product will adopt a new generation of heat dissipation technology and global optimization and customization solutions. It is understood that the heat dissipation technology may refer to the packaging technology of the chip, or it may be the heat dissipation structure design of the machine. As for the "global optimization and customization" plan of the S17 product, no details were disclosed. There are voices commenting that this may be a preparation for the decisive battle of the wet season. [2019/3/22]alert(document.domain) Add the following content-ethexc after the API request of this wallet: <svg+onload=alert(document.domain)>”The application will pop up. This is a hosting For web wallets, the private key is managed by the server, so it is impossible to directly steal user information like the first case. In this case, our plan is to try to use this vulnerability to hijack the user account. After the cookie user logs in, its session token The token is stored in the "PHPSESSID" cookie, and the special feature of this wallet is that the token does not have "HttpOnly". If the cookie is set to HttpOnly, the browser will prevent JavaScript from accessing this cookie. In other words, it can defend against attackers Steal the session token in the cookie through a cross-site scripting attack (XSS).Get the session token Since there is no HttpOnly in the session token in this case, you can read the cookie content-ethexc and send it to yourself through a cross-site scripting attack (XSS) After obtaining the session token, you can use it to log in to the victim’s account. Now that you have the session token, it’s time for a wave of looting. The ultimate goal of hacking into the wallet is in most cases to steal user funds. But there is still a problem, because 2FA verification is also required when conducting currency transactions. At this point, hackers can neither reset 2FA nor disable 2FA, so the attacker needs to find a way to bypass 2FA verification. As mentioned earlier, This wallet has a Twitter gift function: when the user enters this function interface, it will ask the user what type of currency they want to give away, how much currency they want to give away, and how many people they want to give away. As you can see from this screenshot, users can give up to 2 Bitcoin. When the user has set up the gift event, other people need to click to follow, Aite 3 friends and repost this gift tweet, as long as these steps are completed, you can go to receive the prize. But the problem is that this function does not 2FA is required! The attacker can steal the victim’s session through reflective XSS, log in to the victim’s account, create a lot of gift activities, and then claim the reward by himself. In this way, all the balance of the victim’s account can be withdrawn. The manufacturer can output HTML encoding, which solves the XSS vulnerability. At the same time, set "HttpOnly" for the "PHPSESSID" cookie containing the session token. In this way, even if the application is attacked by cross-site scripting, the attacker cannot directly steal the account's session token. A desktop wallet is an application that runs on Apple operating systems, Windows and Linux. What framework do desktop wallets use? CertiK security engineers have studied 18 desktop wallets, including QT (C++), Dot Net (C#), One each in Java, and the remaining 15 use Electr on frame. This part of the case study will explore the server remote code execution vulnerability of the Dot Net desktop wallet, and the client remote code execution vulnerability of the Electron wallet. Case 1: The server remote code execution vulnerability of the Dot Net desktop wallet The following analyzes a remote code execution vulnerability found in the desktop wallet.


Ethereum Price
5 must-read articles in the evening | DeFi last week's data list 6 major indicators to understand the real Bitcoin market

Pantera partner: AMPL that automatically adjusts supply is a better BitcoinPaul Veradittakit, a partner of Pantera Capital, an early investor in Ampleforth.

Eth1.x: New idea of stateless Ethereum "reGenesis"

This week we will update the tech tree to add some new major milestones for Ethereum 1.x development, these milestones are not a complete implementation of stateless Ethereum.

Web Wallet and Desktop Wallet Vulnerability Exploitation and Analysis

With the rapid development of blockchain technology.

Golden DeFi Daily | The total market value of DeFi is 1.1992 billion US dollars.

1. The total market value of DeFi: 11.992 billion US dollars Countdown to BTC Halving | Golden Finance Mining Earnings Report: According to Jinse Finance, according to OKEx mining pool data.

Jiang Guofei of Ant Group: On-chain will become the norm, and cross-chain technology will help the alliance chain grow into a larger local area network

Blockchain is defined as "new technology infrastructure", but in the eyes of industry leaders, its value is far more than technology.On August 20, Jiang Guofei.

8.16 Evening Quotes: What to Buy Next

The article is contributed by Biquan Beiming, the columnist of Jinse Finance and Economics, and his remarks only represent his personal views.