header-langage
简体中文
繁體中文
English
Tiếng Việt
Scan to Download the APP
Partnered With:

Web3 mobile wallet unique Phishing attack method: Modal Phishing

Read this article in 16 Minutes
New phishing technique that can be used to mislead a victim about the identity of a connected decentralized application (DApp).
原文标题:《 一茬接一茬,Web3.0 移动钱包又现独特钓鱼攻击手法:Modal Phishing 》
原文来源: CertiK


图片


We have recently identified a new type of phishing technique that can be used to mislead victims about the identity of a connected decentralized application (DApp).


We named this new phishing techniqueYou do Modal Phishing.


The attacker can send fake information to the mobile wallet posing as a legitimate DApp and trick the victim into approving the transaction by displaying misleading information in the modal window of the mobile wallet. This phishing technique is widely used. We spoke with the appropriate component developers and confirmed that they would release a new validation API to mitigate this risk.


What is Modal Phishing?


In CertiK's security research on mobile wallets, we noted that certain user interface (UI) elements of Web3.0 money wallets could be controlled by attackers to conduct phishing attacks. We call this a Modal Phishing technique,This is because the attacker mainly targets at the mode window of the encrypted wallet for phishing attacks.


Modes (or modal Windows) are often used in mobile applicationsUI elements.Modes are usually displayed at the top of the main application window. Such a design is often used to facilitate quick actions by users, such as approving/rejecting transaction requests for Web3.0 money wallets.


A typical modal design on a Web3.0 money wallet typically provides the necessary information for the user to check a request such as a signature, as well as buttons to approve or reject the request.


图片

Comparison between real transaction approval mode and phishing transaction approval mode


In the screenshot above, we show how a regular transaction approval modal window appears on Metamask.


The wallet is displayed when a new transaction request is initiated by the connected decentralized application (DApp)A new modal window and asks the user for manual confirmation.


As shown on the left side of the figure above, the modal window usually contains the identity of the requester, such as the website address (localhost in this case), the icon, and so on. Some wallets, such as Metamask, also display key information about the request, and in the example we saw UI elements marked "Confirm" to indicate to the user that this is a regular transaction request.


However, these user interface elements can be controlled by an attacker for a Modal Phishing attack. In the screenshot to the right, we can see that an attacker can change the details of a trade and disguise the trade request as a "Security Update" request from a "Metamask" to trick the user into approving it.


As the screenshot shows, an attacker can manipulate multiple UI elements.


So in this article we will share two typical examples and identify the UI elements that an attacker can control.


Details are as follows:


1. If the Wallet Connect protocol is used, an attacker can control the DApp information UI elements (names, ICONS, etc.).

2. An attacker can control the smart contract information UI elements in some wallet applications.


图片


Examples of Modal and associated information sources (DApp information and method names) controlled by an attacker


Example 1: A DApp phishing attack using Wallet Connect


The Wallet Connect protocol is a popular open source protocol for connecting users' wallets to DApps via QR codes or deep links. Users can use the Wallet Connect protocol to connect their wallet to the DApp and then make transactions or transfer money with the protocol.


During the matching process between the Web3.0 money wallet and the DApp, we noticed that the Web3.0 money wallet would display a modal window,Displays the meta information for the incoming pairing request-- Include the DApp's name, website address, icon, and description. The Web3.0 wallet displays this information and the way it is displayed varies according to the DApp name, icon, and website address for users to view.


But this information is provided by the DApp,The wallet does not verify that the information it provides is legitimate and true.In a phishing attack, for example, a Sprite can be pretended to be a Sprite (both Dapps) and then tricked into connecting to the user before the user initiates a transaction request.


Friends can copy link [https://www.youtube.com/watch?v=x6muJmDBC3o] to the browser view CertiK to do a little test.


In the video, CertiK shows how the attackers "tricked" Uniswap DApp --The attackers claimed to be Uniswap DAppAnd connect to the Metamask wallet to trick the user into approving the incoming transaction.


During the pairing process, the modal window displayed in the wallet presents the name of the compliant Uniswap DApp, the website address, and the website icon.


Due to the https scheme used in the URL, a padlock icon is also displayed to make the modal window more realistic and legal. During the matching process, as long as the victim wants to conduct a transaction operation on the fake Uniswap site, the attacker canReplace the transaction request parameters(such as destination address and transaction amount) to steal the victim's money.


Note that although the modal design varies from wallet to wallet,But an attacker can always control the meta-information.


The following figure shows what the paired approval mode looks like when we connect ZenGo and the 1Inch Wallet to the phishing site's DApp.


图片


Modal Phishing: Fake Dapps that connect to Zengo and 1Inch wallets


Now that we know that pairing and trading modal Windows can be manipulated by attackers, such attacks can be used to convince users that trade requests are coming from legitimate Dapps.


As shown in the screenshot below, we created a fake DApp claiming to be "Metamask" and started a phishing smart contract. An attacker can impersonate Metamask or Uniswap's DApp in the transaction approval mode.


图片


As shown in the example above, the Wallet Connect protocol is widely usedThe validity of the paired DApp information was not verified.The manipulated meta information is further used by the wallet application and presented to the user, which can be used to perform Modal Phishing. As a potential solution, the Wallet Connect protocol can verify the validity and legitimacy of DApp information in advance. The developers at Wallet Connect have acknowledged being aware of the problem and are working on a solution.


Example 2: Smart contract information phishing with MetaMask


You may have noticed that under the icon or site name of the Metamask approved mode, there is another view that shows an amorphous string such as "Confirm" or "Unknown Method". This UI element was designed by Metamask,Used to identify the corresponding transaction type.


When the transaction approval mode is rendered, Metamask reads the signature byte of the smart contract and queries for the corresponding method name using the on-chain method registry, as shown in the following code. However, this also creates another UI element on the mode that can be controlled by the attacker.


图片

  The MetaMask source reads the function name of the smart contract through the signature byte



图片

  MetaMask Smart Contract method name description


We can see that there is a transaction request mode on Metamask that is labeled "Security Update." The attacker sets up a phishing smart contract with a SecurityUpdate that has the payment function function and allows the victim to transfer funds into the smart contract.


The attacker also uses SignatureReg to register the method signature in the human-readable string "SecurityUpdate". As mentioned earlier, when Metamask parses this phishing smart contract, it queries the corresponding function method using the function signature byte and presents it to the user in the approval mode.


This particular phishing smart contract has been running for over 200 days, as can be seen from the trading of this smart contract.


图片


Combining these controllable UI elements, an attacker can create a very convincing transaction request that appears as a "SecurityUpdate" request from a "Metamask" seeking approval from the user.


图片

Fishing transaction approval mode


In the example above, we show how the UI elements on the wallet associated with smart contract information can be manipulated by a phishing attacker.


While we're using Metamask as an example here, other wallets could have similar vulnerabilities. Wallet app developers should always monitor what content is presented to users and take precautions to filter out words that could be used in phishing attacks.


Write at the end


In this article, we show you a common UI component that you should not blindly trust on Web3.0 money wallets -- modal Windows.


Certain UI elements in modal Windows can be manipulated by attackers to create very "realistic and convincing" phishing traps. So we named this new phishing technique Modal Phishin (Modal phishing attack).


The root cause of this attack is that the wallet application does not thoroughly verify the validity of the presented UI elements.


For example, the Wallet application directly trusts metadata from the Wallet Connect SDK and presents it to the user. The Wallet Connect SDK also does not validate incoming metadata, which in some cases allows the presented metadata to be controlled by an attacker. In Metamask, we can see that a similar attack principle is abused by attackers to display fraudulent smart contract function method names in modal Windows.


Overall, we believe that wallet app developers shouldAlways assume that incoming external data is untrustworthy.Developers should choose carefully what information to present to users,And verify the validity of the information.In addition, users should maintain their security by being suspicious of every unknown transaction request.


Original link   


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit