Convex Finance Malicious DNS Hijack
Notice: This page is a new case study and some aspects have not been fully researched. Some sections may be incomplete or reflect inaccuracies present in initial sources. Please check the References at the bottom for further information and perform your own additional assessment. Please feel free to contribute by adding any missing information or sources you come across. If you are new here, please read General Tutorial on Wikis or Anatomy of a Case Study for help getting started.
Convex Finance is a tool to increase rewards for stakers and liquidity providers on the curve protocol. The service used NameCheap to host their primary domain where customers would interact with the service. On June 23rd, the Convex team was impersonated to NameCheap and a request was made to change the DNS settings on their domain name. This redirected the website to a phishing version, which looked identical to main version but requested approval on a new smart contract with a similar address. The new smart contract allowed the attacker to steal approved funds and was active on the site for a few hours, plus DNS propagation time. While at least 40 wallet addresses gave approvals, it appears that only a limited number of tokens were taken from those wallets. The Convex Finance team has agreed to reimburse all affected users from their treasury.
About Convex Finance
Convex Finance launched on April 15th, 2021[1][2], and quickly gained traction with over 17m CRV tokens staked in the first 2 weeks[3].
"Introducing Convex Finance, a platform built to boost rewards for CRV stakers and liquidity providers alike, all in a simple and easy to use interface. Convex aims to simplify staking on Curve, as well as the CRV-locking system with the help of its native fee-earning token: CVX."[4][5]
"Convex allows Curve.fi liquidity providers to earn trading fees and claim boosted CRV without locking CRV themselves. Liquidity providers can receive boosted CRV and liquidity mining rewards with minimal effort."[4][6]
"Deposit liquidity, earn boosted CRV and rewards." "Deposit your Curve LP tokens to earn Curve trading fees, boosted CRV and CVX tokens. Boost is pooled from CRV stakers so you do not need to worry about locking yourself."[4][7]
"If you’ve ever been a Curve LP, you know it is somewhat non-trivial to maximize your boost by depositing/maintaining your veCRV balance. If you’ve never been a Curve LP, it may be intimidating to do so without being a DeFi power user. Convex aims to make this process easy and bring the CRV boost ecosystem to everyone."[4][8]
"Convex Finance is a notable protocol, as it holds the majority of Curve Finance’s CRV tokens in circulation. Curve Finance—the leading stablecoin automated market maker—provides approximately one-tenth of the decentralized economy’s liquidity in terms of total locked value."[6]
The Convex Finance protocol was audited by MixBytes[9].
The Reality
While the smart contract operates in a decentralized manner, most users will tend to interact with the contracts using transactions generated by a centralized website. When a domain name is accessed on the internet, a service called DNS is used to point the domain name to an IP address[10].
The Convex Finance project used NameCheap for their registrar for their primary website[11]. The procedures at NameCheap were such that support team members were able to override the DNS of the website to point the domain name to a malicious server[12][13][14].
"Convex used NameCheap as it’s domain registrar for convexfinance.com."
NameCheap also offers a "Domain Vault" service for an additional monthly fee, which was fully launched on June 20th, 2022, coincident with the time of the attack[15][16][17].
"Usually we require a [PIN] code from customer. We also monitor all actions as well a[s] monitor a real time [VIP] list. In the end our [customer support] needs to be able to modify to help customers[,] especially when 99% don't understand [DNS]. If you want complete security use [Domain Vault]"
Despite having two-factor authentication and a strong password, Convex Finance was not enrolled in that service.
What Happened
The account of a customer support agent for NameCheap was believed to be hacked[18].
This allowed the attacker to modify the DNS settings for multiple high profile decentralized protocols with domain names registered there, including Convex Finance, Ribbon Finance, Defi Saver, and AllBridge[19]. The attacker was able to override any 2-factor authentication, passwords, and security alert settings.
The domain names were modified to point to a server with a similar front-end, which requested an approval for a smart contract which had the same first and last 4 characters as the official smart contract address of Convex Finance[20]. However, this smart contract would enable the attacker to drain all of the user's funds from their wallet.
"The attacker was able to access the NameCheap account, even with 2-factor authentication enabled, a strong password, and security alerts. Convex team still had access to the account; 2FA was still enabled, the password was the same, but the attacker was still able to access the account, change the DNS to point to the malicious website, and disable security alerts."
| Date | Event | Description |
|---|---|---|
| April 15th, 2021 6:04:00 AM | Convex Finance Launch | Convex Finance announces their launch on Twitter[2]. |
| March 22nd, 2022 | Domain Vault Announced | The first archived appearance of the "Domain Vault" service on NameCheap which costs $19.88/mo and is still "coming soon"[21]. |
| June 20th, 2022 2:02:01 AM MST | Funds Moved Into First Address | The attacker moves funds into their first ethereum address[22][23]. |
| June 20th, 2022 3:05:42 AM | First Malicious Contract | The very first smart contract is created by a wallet controlled from the attacker[24]. |
| June 20th, 2022 7:26:48 AM | Malicious Contract Creation | The malicious smart contract 0xF403a2c10B0B9feF8f0d4F931df5d86aD187AE31 is created[25][26], which is very similar to the "Convex Finance: Booster" smart contract normally at address 0xF403C135812408BFbE8713b5A23a04b3D48AAE31[27][28]. |
| June 20th, 2022 | Domain Vault Launches | The NameCheap "Domain Vault" service now switches from "Get early access" to "Get Domain Vault" with the price remaining at $19.88/mo[15][16]. |
| June 23rd, 2022 6:17:41 AM | Final Malicious Contract | The final malicious smart contract is created by the attacker[29]. |
| June 23rd, 2022 7:43:37 AM | Funds Moved To Third Address | The attacker moves their ethereum to a third address (presumably in response to flagging of previous addresses) and begins further attacks[30][31]. |
| June 23rd, 2022 12:39:13 PM | Fake CvxLockerV2 Smart Contract | A malicious smart contract 0x72a1A639C69F8002F035a7DC231d634D74e6b86E is created[32][33]. This is very close to the smart contract address of the Convex Locker 2 at 0x72a19342e8F1838460eBFCCEf09F6585e32db86E[34][35]. |
| June 23rd, 2022 1:02:00 PM | Alexintosh Tweet | The Twitter user @alexintosh reported an abnormal approval requested by the Convex Finance website, with a similar but not exact smart contract address[36][37][38]. |
| June 23rd, 2022 2:23:00 PM | Please Review Approvals | Convex Finance posts their very first announcement on Twitter, requesting users to "[p]lease review approvals while we evaluate a potential front end issue[39]." |
| June 23rd, 2022 3:46:00 PM | Additional Malicious Contracts | Twitter user @HarukoTech describes several malicious contracts which were created against different protocols and that "[t]he attacker seems to be generating similar addresses to well know[n] protocols"[40]. |
| June 23rd, 2022 3:54:00 PM | Bret Woods Suggestion | Twitter user Bret Woods (@fewture) posts that "[w]e're seeing hackers create addresses that match the first 4 and last 4 characters". His suggestion is to run the same transaction with "the gas SUPER LOW. Like 5 gwei. Your transaction won't go through, but it will populate on @etherscan where it is much easier to click through and make sure it's doing what you intended to do"[41]. |
| June 23rd, 2022 4:46:00 PM | Convex Preliminary | Convex Finance first posts on Twitter to announce the DNS hijacking. They list 5 addresses[42][43][44][45][46] which are affected, that investigation is still ongoing, and that the issue is "remediated"[47][38]. |
| June 23rd, 2022 5:03:47 PM | cvxCRV Token Theft | A blockchain transaction transfers 15,968.95655 cvxCRV tokens to the DNS phishing attacker's wallet[48]. |
| June 23rd, 2022 5:44:25 PM | CRV Token Theft | A blockchain transaction transfers 433.39359656 CRV tokens to the DNS phishing attacker's wallet[49]. |
| June 23rd, 2022 6:08:00 PM | Alternative Domains | Convex Finance posts on Twitter recommending users to use some alternative domain names to access the smart contract[50]. |
| June 24th, 2022 6:00:00 AM | Telegram Group Operating | A Telegram group has reportedly been set up for communication and coordination between the different affected protocols[51]. |
| June 24th, 2022 7:45:00 AM | Recommending Revoking | "As a precaution, it is recommended that all users who've interacted with the Convex website in the past week review their approvals as we continue to investigate. Use a tool like http://revoke.cash to remove any malicious or suspicious contracts[52]." |
| June 24th, 2022 10:01:00 AM | NameCheap Response | NameCheap's CEO responds on Twitter that they've "traced this down to a specific [customer support] agent that was either hacked or compromised somehow and have removed all access from this agent. This affected a few targeted domains but we will continue investigating."[53] |
| June 24th, 2022 10:03:00 AM | Free DomainVault Monitoring | NameCheap's CEO expands the original tweet to say that they "would like to offer [affected services their] Domain Vault service for free and [they] will also place all affected domains on the highest security monitoring"[54]. |
| June 24th, 2022 11:21:00 AM | NameCheap DomainVault | "Usually we require a pin code from customer. We also monitor all actions as well a monitor a real time vip list. In the end our [customer support] needs to be able to modify to help customers especially when 99% don't understand [DNS]. If you want complete security use [DomainVault]"[17] |
| June 24th, 2022 2:12:53 PM | Affected List Uploaded | The pastebin for the complete list of affected addresses is uploaded by Convex Finance[55]. |
| June 24th, 2022 2:46:00 PM | Restored Report | Convex Finance posts on Twitter to report that the original domain is back. Original "domain is back to normal operation. DNS is secured and actively monitored." They also share a list of affected addresses.[12][56]. |
| June 24th, 2022 4:16:00 PM | NameCheap Clarifies Hack | NameCheap responds that it "[l]ooks more like [their customer support] person was hacked."[18] |
| June 25th, 2022 | Domain Vault Discount | NameCheap lowers the price of their Domain Vault service from $19.88/mo[57] to $1.88/mo[58]. |
| July 1st, 2022 10:14:00 AM | Postmortem Released | Convex Finance releases a post-mortem report with further details of what happened, how much was lost, and their compensation plans[59][11]. |
| July 2nd, 2022 | Price Segmentation | NameCheap decides to offer two different Domain Vault services from "Silver" tier at $1.88/mo[60] to "Titanium" tier at $19.88/mo[61]. |
Total Amount Lost
Cryptonomist reports that as of June 24th, 2023, "the tally of what the hacker managed to steal is about 220 ETH[38]" however no further information is provided as to how that number was determined by Cryptonomist. The blockchain records of the attacker's known wallet show significantly fewer tokens being received in total[62].
Convex Finance described in their postmortem that only 3 of the 40 exploited addresses had funds taken from them, and the specific total was 15,968 cvxCRV and 433 CRV[11]. Matching blockchain transactions can be identified for 15,968.95655 cvxCRV[48] and 433.3936 CRV[49].
"As of today, there are 40 known addresses that approved malicious contracts as a result of this incident. In total, an estimated 15,968 cvxCRV and 433 CRV are suspected of being stolen from users. Only 3 of the 40 addresses listed had funds taken."
While the attacker's wallet does contain additional transactions, it is unclear which specific attack these belong to and most amounts are less substantial[62]. The closing market price of Curve on June 23rd, 2022 was $0.8308[8], while the closing market price of Convex's cvxCRV token was $0.8285[5]. Combining with the post-mortem information, this results in an estimated total loss of $13,589.22 USD.
Immediate Reactions
On June 23, 2022, the Twitter user @alexintosh reported an abnormal approval requested by the Convex Finance website, with a similar but not exact smart contract address[36][37].
"What is this unverified contract? 0xF403a2c10B0B9feF8f0d4F931df5d86aD187AE31. [The] @ConvexFinance website is asking for approval for that but the correct one is 0xF403C135812408BFbE8713b5A23a04b3D48AAE31. 4 Starting/Ending Characters are the same. DNS spoofing?"
The situation was initially reported and detailed by Twitter users @HarukoTech[40] and Bret Woods (@fewture)[41] . These users provided a complex analysis of the transactions and a guide on a work around to validate transactions on hardware devices by using smaller transaction fees[40][41].
A Telegram group was set up for communication between the different affected protocols[63].
Shortly after this, the Convex Finance team posted to announce that they had restored the domain name to the original settings and provided a list of affected users[47].
Investigation is still ongoing, but a quick update for the community:
- DNS for http://convexfinance.com was hijacked, prompting users to approve malicious contracts for some interactions on the site. - Funds on verified contracts are unaffected. - Issue is remediated at this time, but investigation is ongoing. Full post-mortem to follow.
At this time, 5 addresses seem to have approved malicious contracts (in the tweet below). If you are the owner of one of these addresses, please reach out via Twitter DM or Discord.
However, the nature of DNS is such that propagation of settings requires time and blockchain data shows that the most significant affected user thefts happened after this notice[48][49].
Ultimate Outcome
The NameCheap CEO ultimately responded on Twitter to explain that there was a hacked or compromised customer support agent and all access was removed from them[53]. He also offered completely free Domain Vault monitoring to all affected services[54].
"We've traced this down to a specific [customer support] agent that was either hacked or compromised somehow and have removed all access from this agent. This affected a few targeted domains but we will continue investigating." "In the meantime we would like to offer you our Domain Vault service for free and we will also place all affected domains on the highest security monitoring."
Convex Finance posted a finalized list of affected addresses on June 24th[12][55][56].
At this time, the addresses on this list (linked below) are suspected of having approved malicious contracts. Please note this list may or may not be complete.
There was strong criticism from user @flubdubster for Convex Finance using a standard domain registration which doesn't have advanced spoofing protection[64][65][66].
Total Amount Recovered
Convex Finance reported in their post-mortem that they would be covering all losses in full[11].
"Convex Finance will attempt to compensate losses stemming from the DNS hijacking from June 20–23, 2022, sourced from the treasury, and paid in CVX tokens equivalent to the USD values at time of loss. Funds will go directly to the addresses affected once approvals have been revoked to the malicious contracts."
It is assumed that Convex Finance followed their on their promises and all affected users were compensated fully.
Ongoing Developments
Funds were recovered out-of-pocket by the Convex Finance protocol. It remains to be seen whether such a small amount will be successfully located and recovered from the thieves.
Prevention Policies
The issue ultimately stemmed from a single customer support agent being compromised. A multi-signature requirement on DNS changes would have prevented this scenario entirely.
While NameCheap offers advanced protections on their domain names, this service had just launched two days prior to the DNS change, so it was unlikely to be a reasonable expectation that Convex Finance would have already signed up.
Users of platforms need to be careful and double check any new approval requested by any platform against the proper smart contract address. It is recommended to double check any new smart contract addresses being interacted with.
References
- ↑ Convex Finance Pre Launch Announcement - Medium (Aug 24, 2022)
- ↑ 2.0 2.1 @ConvexFinance - "Introducing Convex Finance! A new platform" - Twitter (Aug 24, 2022)
- ↑ @ConvexFinance - "we've been welcomed with open arms into the defi community" - Twitter (Aug 24, 2022)
- ↑ 4.0 4.1 4.2 4.3 https://www.convexfinance.com/ (Aug 23, 2022)
- ↑ 5.0 5.1 https://coinmarketcap.com/currencies/convex-crv/historical-data/ (Aug 24, 2022)
- ↑ 6.0 6.1 Convex for Curve.fi - ConvexFinance (Aug 23, 2022)
- ↑ @JustinCBram Twitter (Aug 24, 2022)
- ↑ 8.0 8.1 https://coinmarketcap.com/currencies/curve-dao-token/historical-data/ (Aug 24, 2022)
- ↑ platform/Convex Platform Security Audit Report.pdf at main · convex-eth/platform · GitHub (Aug 23, 2022)
- ↑ What is DNS? | How DNS works | Cloudflare (Feb 9, 2023)
- ↑ 11.0 11.1 11.2 11.3 Post Mortem Of Events June 23 - Convex Finance Medium (Aug 24, 2022)
- ↑ 12.0 12.1 12.2 @ConvexFinance - "domain is back to normal operation. DNS is secured and actively monitored" - Twitter (Aug 24, 2022)
- ↑ @DevanCollins3 Twitter (Aug 24, 2022)
- ↑ @LefterisJP Twitter (Feb 10, 2023)
- ↑ 15.0 15.1 Domain Vault Page on June 19th, 2022 - Namecheap (Feb 12, 2023)
- ↑ 16.0 16.1 Domain Vault Page on June 20th, 2022 - Namecheap (Feb 12, 2023)
- ↑ 17.0 17.1 @NamecheapCEO "If you want complete security use [Domain Vault]" - Twitter (Aug 24, 2022)
- ↑ 18.0 18.1 @NamecheapCEO - "[l]ooks more like [their customer support] person was hacked." - Twitter (Feb 11, 2023)
- ↑ DeFi Dapps DNS Attacked - TrustNodes (Feb 25, 2024)
- ↑ @StefanPatatu Twitter (Aug 23, 2022)
- ↑ Domain Vault Page on Mar 22nd, 2022 - Namecheap (Feb 9, 2023)
- ↑ First Attack Address "Fake_Phishing5851" - 0x56d3191ee65f1f76e4e902ec983c6420398d49c8 | Etherscan (Aug 23, 2022)
- ↑ Funds Moved Into First Attack Address "Fake_Phishing5851" - Etherscan (Mar 5, 2023)
- ↑ First Smart Contract Creation - EtherScan (Feb 23, 2023)
- ↑ Convex & Ribbon Phisher Address | Etherscan (Aug 23, 2022)
- ↑ Malicious "Convex Booster" Contract Created - Etherscan (Feb 15, 2023)
- ↑ Convex Finance Booster Contract - Etherscan (Feb 24, 2023)
- ↑ @Alexintosh - "I don't what's happening but be 100% certain you approve exactly" - Twitter (Feb 24, 2023)
- ↑ Final Malicious Contract Creation - EtherScan (Feb 23, 2023)
- ↑ Attacker's Third Address - 0xba63402bdf0e1b245333e5ef008baee69d669f2a | Etherscan (Aug 23, 2022)
- ↑ Attacker Moving Funds To Third Address - Etherscan (Mar 5, 2023)
- ↑ Malicious "CvxLockerV2" Contract Created - Etherscan (Feb 23, 2023)
- ↑ Malicious Smart Contract - Etherscan (Aug 23, 2022)
- ↑ martinkrung Reports Fake "CvxLockerV2" Contract - Twitter (Feb 23, 2023)
- ↑ Actual "CvxLockerV2" Smart Contract - Etherscan (Feb 23, 2023)
- ↑ 36.0 36.1 @Alexintosh - "What is this unverified contract ?" - Twitter (Aug 23, 2022)
- ↑ 37.0 37.1 Contract Addresses - ConvexFinance (Aug 24, 2022)
- ↑ 38.0 38.1 38.2 Convex: more info on the hack - Cryptonomist (Jul 2, 2022)
- ↑ @ConvexFinance - "Please review approvals while we evaluate a potential front end issue." - Twitter (Aug 23, 2022)
- ↑ 40.0 40.1 40.2 @HarukoTech - "[t]he attacker seems to be generating similar addresses to well know[n] protocols" - Twitter (Aug 24, 2022)
- ↑ 41.0 41.1 41.2 Bret Woods (@fewture) - ""[w]e're seeing hackers create addresses that match the first 4 and last 4 characters" - Twitter (Feb 22, 2023)
- ↑ Known Approval Address 0x496e53c32a69a79a82ed85d2913010dd2f9d1b4f | Etherscan (Feb 15, 2023)
- ↑ raspu.eth | Known Approval Address 0x4ffc5f22770ab6046c8d66dabae3a9cd1e7a03e7 | Etherscan (Feb 15, 2023)
- ↑ Known Approval Address 0x5b186c93a50d3cb435fe2933427d36e6dc688e4b | Etherscan (Feb 15, 2023)
- ↑ Known Approval Address 0x624301090700ea1e3c5b5224f89adfae405412c1 | Etherscan (Feb 15, 2023)
- ↑ Known Approval Address 0x92557b6ffa116b53cf2c3bc1d6d33f78d97ed4c9 | Etherscan (Feb 15, 2023)
- ↑ 47.0 47.1 @ConvexFinance - "Investigation is still ongoing, but...5 addresses seem to have approved malicious contracts" - Twitter (Aug 24, 2022)
- ↑ 48.0 48.1 48.2 Theft of 15,968.95655 cvxCRV - Etherscan (Feb 23, 2023)
- ↑ 49.0 49.1 49.2 Theft Of 433.3936 CRV - Etherscan (Feb 22, 2023)
- ↑ @ConvexFinance - "An alternate domain has been set-up as a precaution for Convex users." - Twitter (Aug 24, 2022)
- ↑ @0xLlam4 - "on TG, can add you into a group with affected protocols" - Twitter (Feb 27, 2023)
- ↑ @ConvexFinance - "it is recommended that all users who've interacted with the Convex website in the past week review their approvals" - Twitter (Aug 23, 2022)
- ↑ 53.0 53.1 @NamecheapCEO - "traced this down to a specific [customer support] agent that was either hacked or compromised" - Twitter (Aug 24, 2022)
- ↑ 54.0 54.1 @NamecheapCEO - "we would like to offer you our Domain Vault service for free and we will also place all affected domains on the highest security monitoring" - Twitter (Feb 24, 2023)
- ↑ 55.0 55.1 Known Approvals From Convex Finance - Pastebin.com (Aug 24, 2022)
- ↑ 56.0 56.1 @ConvexFinance - "the addresses on this list (linked below) are suspected of having approved malicious contracts" - Twitter (Aug 24, 2022)
- ↑ Domain Vault Page on June 24th, 2022 - Namecheap (Feb 13, 2023)
- ↑ Domain Vault Page on June 25th, 2022 - Namecheap (Feb 13, 2023)
- ↑ @ConvexFinance - "Important Update on Medium regarding the DNS hijacking events last weekend." - Twitter (Feb 18, 2023)
- ↑ Domain Vault Page on July 1st, 2022 - Namecheap (Feb 13, 2023)
- ↑ Domain Vault Page on July 2nd, 2022 - Namecheap (Feb 13, 2023)
- ↑ 62.0 62.1 Token's Received and Sent By The Attacker's Wallet - Etherscan (Feb 23, 2023)
- ↑ @0xLlam4 - "on TG, can add you into a group with affected protocols" - Twitter (Feb 27, 2023)
- ↑ @flubdubster Twitter (Aug 24, 2022)
- ↑ @flubdubster Twitter (Aug 24, 2022)
- ↑ @flubdubster Twitter (Aug 24, 2022)