Main Takeaways

  • Signing messages is an essential aspect of transacting on the blockchain, but if not handled with caution, it can expose users to considerable security risks.

  • The ‘eth_sign’ function, which enables users to sign arbitrary messages, is especially vulnerable to abuse, potentially allowing attackers to gain complete control over the victim's assets.

  • To safeguard yourself, always use trusted platforms, avoid signing unfamiliar messages, and stay informed about common scams.

For those exploring the Web3 space, message signing is essential for authorizing transactions, verifying identities, and interacting with decentralized applications (DApps). For instance, an airdrop platform may require a user to sign a message to prove ownership of a specific wallet address eligible for an airdrop. While this process enables many critical blockchain functions, it also introduces significant security risks.

In this article, we explore the potential dangers associated with signing messages on and off the blockchain, and highlight common scenarios where users can suffer financial losses as a result of signing malicious messages.

Message and Transaction Signing: Understanding the Difference

In the decentralized space, signatures are essential for both authorizing transactions and interacting with DApps. They come in two main types: on-chain (transaction) and off-chain (message) signatures.

On-Chain Signatures (Signing a Transaction) 

On-chain signatures are used to authorize actions that change the state of the blockchain, such as transferring funds or executing smart contracts. Here’s how it works:

On-chain signing and verification process workflow

  • Message Generation: When someone initiates a transaction on the blockchain, the network generates a unique message related to that transaction, which contains information about it, such as the sender and recipient's addresses, the amount to be transferred, and other relevant details.

  • Signing the Message: The user initiating a transaction "signs" this message with their private key. This process involves applying a cryptographic algorithm to the message and the user's private key, resulting in a digital signature.

  • Sending the Signed Message: The signed message, along with the original message, is sent to the network.

  • Verification: The network verifies the signature using the transacting user’s public key, which is derived from their private key but can be shared safely. If the signature matches the message and the public key, it confirms that the account holder has authorized the transaction.

  • Transaction Processing: If the signature is valid, the network processes the transaction. Otherwise, the transaction is rejected.

When you use a crypto wallet, the transaction signing process typically occurs automatically in the background. Most modern crypto wallets provide a user-friendly interface that abstracts away the technical details, so you don't see or directly interact with the process.

Off-Chain Signatures (Signing a Message)

Off-chain signatures, on the other hand, are used for actions that do not affect the blockchain’s state, such as verifying user identity, logging into a DApp, or pre-authorizing fund transfers. Here’s how it works:

  • Challenge Generation: The application generates a unique message that serves as a “challenge” – a request for the user to authenticate themself by proving that they own the address in question. This message may include specific details related to the login attempt, such as the timestamp or a random number.

  • Signature Creation: The user signs the message with their private key, creating a digital signature. This signature acts as proof that they own the private key associated with the wallet.

  • Signature Verification: The recipient verifies the signature using your public key. If the signature is valid, it confirms the user’s identity and grants them access.

It is off-chain signatures that Web3 users often get to interact with for various purposes – and it is this type of signature that has the potential to be abused by criminals. 

The Risk: Unintended Authorization

There are several methods for signing messages, including eth_sign, personal_sign, and eth_signTypedData. These functions have varying levels of security, and depending on the wallet you use, some methods may or may not be supported. 

  • The eth_sign function allows users to sign arbitrary messages with their private keys, which can potentially pose security risks. This method uses a raw, non-readable message format without any prefix or context. 

Because of this, users often do not understand the implications of what they are signing. The most severe risk is that signing a malicious message can grant the attacker full control over your assets.

  • The personal_sign method is designed to be more secure and user-friendly. It prefixes the message with a standard string before hashing and signing, making it clear that the message is intended for signing. This prefix helps protect against certain types of attacks, such as replay attacks, where a signed message could be reused in a different context.

  • The eth_signTypedData method is used to sign structured data, providing more context and clarity about what is being signed. It allows developers to define the structure of the data being signed, making it more transparent and easier to understand.

What is eth_sign Phishing?

At its core, eth_sign is a cryptographic mechanism that allows users to sign arbitrary messages. This signature serves as digital proof that the account owner has authorized the message's content. However, the problem arises when these signed messages can be interpreted and executed by smart contracts in ways that are not immediately apparent to the user. A message that appears to be a harmless string of characters can, in reality, authorize attackers to take full control of your account. Let's break down the mechanics of a typical eth_sign phishing attack:

1. The Setup: Attackers often create fake websites or applications that mimic legitimate platforms. These could be decentralized exchanges, NFT marketplaces, or other blockchain-based services.

2. The Bait: Users are enticed to connect to these fake platforms through various means – phishing emails, misleading ads, or even fake links in social media groups. Attackers often create a sense of urgency, claiming that the user needs to sign quickly to take advantage of a limited-time offer or to prevent some negative consequences.

3. The Hook: The attackers’ site requests the user to sign a message using eth_sign. However, the message the user signs is very different from what they think. It could grant permission to perform any malicious action the scammer wants.

The stages of an eth_sign phishing attack

Popular tactics to exploit message signing include fake airdrops; malicious DApps created to look legitimate but whose sole purpose is to steal funds; fake NFT minting services; phishing emails; impersonating customer support; and creating fake cross-chain bridge interfaces. All these nefarious tools serve the purpose of making users believe that they are signing a legitimate message while in fact, they give criminals access to their digital funds.

What makes these attacks particularly dangerous is that they exploit Web3 users’ conditioned behavior to sign messages to verify their identity or approve actions. Many users tend to sign such messages without fully understanding the implications. 

Real-Life Examples

The Fake NFT Airdrop

Scammers often manipulate their victims with the promise of unexpected rewards. A user in this real-life example received an unsolicited NFT airdrop in their wallet, with the senders claiming that the user had won a significant reward and only needed to convert their NFT voucher into money. 

To claim the prize, the user is transferred to a linked website to sign a message, which is presented in a non-readable hexadecimal format. Assuming this to be a standard part of the verification process, the user signs. However, this message is a cleverly disguised authorization that grants the scammer control over the user’s assets, resulting in unauthorized transfers from their wallet.

Shortly after, the user notices that a significant amount of tokens are being transferred out of their wallet without their consent, realizing too late that they had been scammed.

Key Takeaway: Beware of any unsolicited offers or airdrops, especially those that promise significant rewards. Always verify the legitimacy of the source before taking any further action.

Impersonation of a Well-Known Project

Scammers often impersonate reputed projects or accounts to create a sense of credibility. In this example, criminals created a fake account on X mimicking the official Baby Doge Coin account. The impersonator had obtained a gold verification badge to add a layer of credibility.

 

The fake account announced a new airdrop for Baby Doge Coin holders and included a link to a website where users could claim the new token. The post quickly gained traction, which added even more to its appearance of legitimacy. Users visited the provided link, connected their wallets, and signed a message to confirm their identity and claim the airdrop. 

What the victims didn’t know is that the signed message authorized the transfer of tokens from their wallets to the attacker’s address. Most users only realized it was a scam when they noticed their Baby Doge Coin tokens had disappeared from their wallets. 

Key Takeaway: Always verify the authenticity of social media accounts you interact with and exercise caution with any messages requesting your signature. Small discrepancies, like a slightly different or incorrect username, are key to telling real from fake. In this example, the X handle of the scammer’s account was subtly altered to read almost like the real one, with one vowel doubled at the end.

A Fake New Token Airdrop

Creating a sense of urgency is another tactic scammers use to push users into making hasty decisions. In this example, a user scrolling through their social media feed noticed a post from what appears to be a legitimate cryptocurrency project, announcing a new airdrop for a token called “Sunwaves.” The post claims that there is a limited 24-hour window to claim the airdrop.

Intrigued by the announcement, users visit the website mentioned in the post, which prompts them to connect their wallets and complete several verification steps, including signing a message to confirm their identity and claim the airdrop.

However, this signed message grants the scammer permission to transfer tokens from the user’s wallet. The user quickly notices that tokens, including valuable assets, have been transferred out without their consent.

Key Takeaway: Be skeptical of any offers that create a sense of urgency. Scammers often pressure users to act quickly to prevent them from taking the time to assess and verify the legitimacy of the offer.

How Binance Web3 Wallet Keeps You Safe

To eliminate the possibility of users falling for an Eth_sign scam, this function is banned in Binance Web3 Wallet. What this means in practice is that once the eth_sign is triggered for a transaction, users will be immediately prompted that this transaction is highly risky due to a potentially malicious signature request. Completing such a transaction will not be possible. 

Protecting Yourself From Scams

To avoid message signing scams in the Web3 space, it is essential to take precautionary measures: 

1. Use Trusted Platforms: Only sign messages on platforms that you trust. If a platform seems suspicious for any reason, it is best to avoid it.

2. Do Not Trust Unexpected Airdrops: Be cautious of unsolicited offers that seem too good to be true, especially those promising substantial rewards. 

3. Verify DApp URLs: Always check that the URL is legitimate before interacting with a decentralized application. Scammers often create URLs that look similar to real ones. 

4. Use Secure Wallets: Use reputable wallets that provide security measures against malicious messages. For example, Binance Web3 Wallet has banned the eth_sign function to prevent such attacks.

5. Stay Informed: Stay on top of the latest scam tactics and security best practices in the blockchain space.

Closing Thoughts

Exploring the decentralized space of Web3 services and applications can be a magnificent adventure. However, this environment has its own risks, requiring users to be vigilant and informed. Scammers can exploit tools like message signing and impersonation to carry out unauthorized transactions, resulting in significant financial losses. By being aware of these risks and adopting some straightforward security practices and habits, you can protect yourself. Always exercise caution and stay vigilant to ensure the security of your assets in the Web3 ecosystem.

Further Reading

Risk Disclaimer: Cryptocurrencies are subject to high market risk and price volatility. You should only invest in products that you are familiar with and where you understand the associated risks. You should carefully consider your investment experience, financial situation, investment objectives and risk tolerance and consult an independent financial adviser prior to making any investment. This material should not be construed as financial advice. Past performance is not a reliable indicator of future performance. The value of your investment can go down as well as up, and you may not get back the amount you invested. You are solely responsible for your investment decisions. Binance is not responsible for any losses you may incur. For more information, please refer to our Terms of Use and Risk Warning. This is a general announcement. Products and services referred to here may not be available in your region.