ZenGo uncovers dApp vulnerability

Luisa Crawford  Mar 22, 2023 17:04  UTC 09:04

0 Min Read

ZenGo, a crypto wallet developer, has discovered a security vulnerability in decentralized applications (dApps) called the "red pill attack." This vulnerability allowed malicious dApps to steal user assets using opaque transaction approvals. ZenGo conducted research that revealed that many leading vendors, including Coinbase Wallet, were vulnerable to such attacks. However, ZenGo stated that all vendors were receptive to their reports, and most of them were quick to fix their faulty implementations.

The vulnerability is possible due to a programming oversight in "Special Variables" among smart contracts storing general information on the blockchain functionality, such as timestamp of the current block. During simulations, there is no correct value for Special Variables, and developers "take a shortcut" and set them to an arbitrary value. This vulnerability is where the "red pill attack" derives its name from the iconic "red pill" scene from The Matrix movie series. "If malware is able to detect it's actually being executed in a simulated environment or living in the matrix, it can behave in a benign manner, thus deceiving the anti-malware solution, and reveal its true malicious nature only when actually executed in a real environment."

ZenGo demonstrated in a video how a smart contract simulation on Polygon (MATIC) could be compromised using this method. ZenGo showed that when the user sends the transaction on-chain, COINBASE is filled with the non-zero address of the current miner, and the contract just takes the sent coins.

ZenGo said the fix for the vulnerability was straightforward. Instead of populating these vulnerable variables with arbitrary values, the simulations need to populate them with meaningful values. ZenGo presented redacted screenshots of bug bounties, apparently awarded by Coinbase, for solving the issue. The Ethereum Foundation has also awarded ZenGo a $50,000 grant for its research on transaction simulations.

Decentralized applications or dApps are an essential part of the blockchain ecosystem. They operate on decentralized networks, where there is no central authority, and transactions are recorded on the blockchain. The advantage of dApps is that they provide users with a more secure and transparent way to transact without a central authority. However, as with any technology, there are vulnerabilities that need to be addressed. The discovery of the "red pill attack" vulnerability by ZenGo underscores the importance of security in the blockchain ecosystem.

In conclusion, ZenGo's discovery of the "red pill attack" vulnerability in dApps is a significant development in the blockchain ecosystem. The vulnerability, which allowed malicious dApps to steal user assets, highlights the importance of security in the blockchain ecosystem. ZenGo's research has shown that many leading vendors were vulnerable to such attacks, but they were quick to fix their faulty implementations. The fix for the vulnerability is straightforward, and ZenGo has urged developers to populate vulnerable variables with meaningful values.

Read More