2022上半年Web3黑客常用的攻击方式有哪些?

成都链安Published on 2022-08-25Last updated on 2022-08-25

Abstract

今天,我们就2022上半年Web3黑客常用的攻击方式展开分析,看看在所有被利用的漏洞中,哪些频率最高,以及如何防范。

今天,我们就2022上半年Web3黑客常用的攻击方式展开分析,看看在所有被利用的漏洞中,哪些频率最高,以及如何防范。

上半年因漏洞造成的总损失有多少?

据成都链安鹰眼区块链态势感知平台监控显示,2022上半年共监测到因合约漏洞造成的主要攻击案例42次,约53%的攻击方式为合约漏洞利用。

通过统计,2022上半年共监测到因合约漏洞造成的主要攻击案例42次,总损失达到了6亿4404万美元。

在所有被利用的漏洞中,逻辑或函数设计不当被黑客利用次数最多,其次为验证问题、重入漏洞。

哪些类型的漏洞曾导致重大损失?

2022年2月3日,Solana跨链桥项目Wormhole遭到攻击,累计损失约3.26亿美元。黑客利用了Wormhole合约中的签名验证漏洞,这个漏洞允许黑客伪造sysvar帐户来铸造wETH。

2022年4月30日,Fei Protocol官方的Rari Fuse Pool遭受闪电贷加重入攻击,总共造成了8034万美元的损失。本次攻击对项目方造成了无法挽回的损失,8月20号,官方表示项目正式关闭了。

Fei Protocol事件回顾:

由于漏洞出现在项目基本协议中,攻击者不止攻击了一个合约,以下仅分析一例。

攻击交易

0xab486012f21be741c9e674ffda227e30518e8a1e37a5f1d58d0b0d41f6e76530

攻击者地址

0x6162759edad730152f0df8115c698a42e666157f

攻击合约

0x32075bad9050d4767018084f0cb87b3182d36c45

被攻击合约

0x26267e41CeCa7C8E0f143554Af707336f27Fa051

#攻击流程

1. 攻击者先从Balancer: Vault中进行闪电贷。

2. 将闪电贷的资金用于Rari Capital中进行抵押借贷,由于Rari Capital的cEther实现合约存在重入。

攻击者通过攻击合约中构造的攻击函数回调,提取出受协议影响的池子中所有的代币。

3. 归还闪电贷,将攻击所得发送到0xe39f合约中

本次攻击主要利用了Rari Capital的cEther实现合约中的重入漏洞,被盗资金超过28380 ETH(约8034万美元)。

审计过程中最常出现的漏洞有哪些?

在审计过程中最常见出现的总体来说分为四大类:

1.ERC721/ERC1155重入攻击:

在通过链必验形式化验证平台检测合约时不乏存在ERC721 / ERC1155标准相关的业务合约,在ERC721中,ERC1155中存在分别存在一个onERC721Received()/onERC1155Received()函数用于转账通知,类似于以太坊转账的fallback()函数,在相关的业务合约中使用ERC721/ERC1155标准中的_safeMint(),_safeTransfer(),safeTransferFrom()进行铸币或者转账时都会触发转账通知函数。如果在转账的目标合约中的onERC721Received()/onERC1155Received()中包含了恶意代码,就可能形成重入攻击。除此之外在相关业务函数未严格按照检查-生效-交互模式设计,上述两点共同导致了漏洞的产生。

2.逻辑漏洞:

1) 特殊场景考虑缺失:

特殊场景往往是审计最需要关注的地方,例如转账函数设计未考虑自己给自己转账导致无中生有。

2)设计功能不完善:

存放费用的合约没有提取功能,借贷合约不含清算功能等。

3.鉴权缺失:

铸币、设置合约特殊角色、设置合约参数的相关函数没有鉴权,导致三方地址也可以调用。

4.价格操控:

Oracle价格预言机未使用时间加权平均价格;

未使用价格预言机,直接使用合约中两种代币的余额比例作为价格等。

实际被利用的漏洞有哪些?哪些漏洞能在审计阶段发现?

根据成都链安鹰眼区块链安全态势感知平台所感知的安全事件统计,审计过程中出现的漏洞几乎都实际场景中被黑客利用过,其中合约逻辑漏洞利用仍然为主要部分。

通过成都链安链必验-智能合约形式化验证平台检测和安全专家人工检测审计,以上漏洞均能在审计阶段被发现,并且可由安全专家在做出安全评估后提出相关安全修补建议供客户作为修复参考。

Trending Cryptos

Related Reads

Financing Weekly Report | 11 Public Financing Events, Stablecoin Payment Infrastructure Company Trace Finance Completes $32 Million Series A Round Led by CoinFund

Financing Weekly Report | 11 public funding events recorded, with a total scale exceeding $264 million. The stablecoin payment infrastructure sector remains a hot spot. Key Deals: - Trace Finance, a stablecoin payment infrastructure firm, raised $32 million in a Series A round led by CoinFund to expand in Latin America and Asia-Pacific. - Galaxy Ventures co-led a $140 million Series A round for Karta, a US credit card provider for global travelers without requiring an SSN. - Instant payment platform Interchecks completed a $50 million Series C round. - Paradigm led a $9 million Series A for Latin American cross-border payment app El Dorado. - Range, a stablecoin compliance startup, raised $8.3 million in an oversubscribed Series A. - RWA infrastructure project Renaiss raised $1.5 million to expand its on-chain collectibles platform. Sector Breakdown: - Infrastructure & Tools: 6 deals, including the above-mentioned Trace Finance, Range, and Renaiss. - Centralized Finance (CeFi): 3 deals, led by Karta's $140 million round. - DeFi: 1 deal – reinsurance protocol Re secured strategic investment from Coinbase Ventures. - Prediction Markets: 1 deal – K25.ai completed a $10 million Pre-A round from NewGen. Other notable transactions include digital asset depository RDC raising $7 million, ad-tech startup EarnOS securing $6 million, and a $1 million strategic investment in LitVM, a ZK Layer 2 for Litecoin. The report highlights sustained investor interest in stablecoin payment infrastructure, compliant on-chain finance, and real-world asset (RWA) tokenization.

marsbit39m ago

Financing Weekly Report | 11 Public Financing Events, Stablecoin Payment Infrastructure Company Trace Finance Completes $32 Million Series A Round Led by CoinFund

marsbit39m ago

When Transfers Become Truly Frictionless: How Sui Uses 'Zero Gas' to Become the Underlying Infrastructure for Stablecoin Payments

Title: Sui Launches Zero-Gas Stablecoin Transfers to Become the Foundation for Stablecoin Payments Sui has introduced a zero-gas fee feature for peer-to-peer stablecoin transfers, eliminating the need for users or businesses to hold separate SUI tokens to pay transaction costs. This innovation, built on a new underlying account architecture called Address Balances, significantly reduces validator processing costs for eligible transactions. Currently, the feature applies to a whitelist of stablecoins for transfers meeting a minimum amount, effectively preventing spam. This development aims to unlock mainstream payment use cases for stablecoins—such as everyday purchases, remittances, and subscriptions—by removing cost and complexity barriers. It is also positioned to benefit high-frequency micro-payments for AI agents and institutional B2B payments, reducing operational friction. Major custody provider Fireblocks has already announced support. The move follows Sui processing over $1 trillion in stablecoin transfer volume since August 2025. Looking ahead, Sui plans to enhance this infrastructure with protocol-level confidential transactions later in 2026, aiming to provide scalable, free, and privacy-preserving payments. Together, these advancements strengthen Sui's goal of becoming the default settlement layer for stablecoin payments.

marsbit41m ago

When Transfers Become Truly Frictionless: How Sui Uses 'Zero Gas' to Become the Underlying Infrastructure for Stablecoin Payments

marsbit41m ago

Ethereum Is Retracing the Path of the Internet and Linux: No One Yields, and the Neutral Party Ultimately Prevails

This article argues that Ethereum is following the historical path of open, neutral systems like the Internet and Linux, which eventually triumphed over proprietary, centrally-controlled alternatives. Major financial institutions like JPMorgan, Stripe, and Circle are building their own proprietary blockchains or networks (e.g., Tempo, Arc), but will never agree to build on a competitor's controlled infrastructure. This creates the perfect opportunity for Ethereum as the only neutral, credibly neutral settlement layer that no single entity controls. The piece draws parallels to the 1990s, when experts like Bill Gates predicted proprietary networks (from Microsoft, Oracle) would win over the open Internet, and when Sun Microsystems' Unix lost to the open-source "bazaar" development model of Linux. This model, described in Eric Raymond's "The Cathedral and the Bazaar," thrives on permissionless innovation where countless contributors improve the system, outpacing any centralized competitor. Ethereum embodies this through its decentralized development, broad validator distribution, and credible neutrality—rules that are transparent, equally applied, hard to change, and open to all. This has attracted over a million developers and major institutions like Coinbase, BlackRock, and JPMorgan, who choose Ethereum for its security, ecosystem, and sovereignty (the inability of any single party to change the rules). While proprietary chains offer initial speed and control, they inherit the downsides of both centralization and decentralization without the long-term innovation benefits. The article concludes that, just as open systems historically win, Ethereum is poised to become the foundational, neutral settlement layer for global finance.

marsbit50m ago

Ethereum Is Retracing the Path of the Internet and Linux: No One Yields, and the Neutral Party Ultimately Prevails

marsbit50m ago

Kalshi's Biggest Rival is Not Polymarket

Kalshi's CEO Tarek Mansour has identified the company's primary competitors not as the crypto-based prediction market Polymarket, but as established financial and gaming giants: CME Group, Robinhood, and DraftKings. This reflects a shift in the prediction market landscape, where the 2026 FIFA World Cup is expected to bring massive new trading volume. Traditional platforms are increasingly integrating prediction markets as a feature within their existing ecosystems. Robinhood has seen rapid growth with its prediction markets, contributing significantly to its "other transaction revenue." Similarly, Interactive Brokers (IBKR) integrates contracts from Kalshi and CME Group, while DraftKings and FanDuel (via CME) have launched their own prediction products. This allows these firms to leverage their vast user bases and infrastructure at low marginal cost, turning prediction markets from standalone apps into embedded functionalities. In response, prediction market platforms are evolving along two paths. First, they are expanding into new event categories like sports (e.g., the World Cup) and financial data to reduce reliance on election cycles. Second, they are moving towards becoming infrastructure and liquidity providers for distribution platforms. Kalshi's lead over Polymarket in trading volume is partly attributed to this channel strategy, integrating with brokers like Robinhood, Coinbase, and Webull. However, this strategy faces a challenge as distributors like Robinhood begin building their own in-house prediction market capabilities (e.g., Rothera), potentially threatening the value of pure infrastructure providers. The situation parallels historical tech battles, such as Zoom competing with Microsoft Teams and Google Meet, where embedded features in larger platforms reshape market dynamics. The future of standalone prediction market leaders like Kalshi and Polymarket will depend on their ability to navigate this new competitive landscape dominated by integrated financial and gaming titans.

链捕手57m ago

Kalshi's Biggest Rival is Not Polymarket

链捕手57m ago

Trading

Spot
Futures

Hot Articles

How to Buy BAL

Welcome to HTX.com! We've made purchasing Balancer (BAL) simple and convenient. Follow our step-by-step guide to embark on your crypto journey.Step 1: Create Your HTX AccountUse your email or phone number to sign up for a free account on HTX. Experience a hassle-free registration journey and unlock all features.Get My AccountStep 2: Go to Buy Crypto and Choose Your Payment MethodCredit/Debit Card: Use your Visa or Mastercard to buy Balancer (BAL) instantly.Balance: Use funds from your HTX account balance to trade seamlessly.Third Parties: We've added popular payment methods such as Google Pay and Apple Pay to enhance convenience.P2P: Trade directly with other users on HTX.Over-the-Counter (OTC): We offer tailor-made services and competitive exchange rates for traders.Step 3: Store Your Balancer (BAL)After purchasing your Balancer (BAL), store it in your HTX account. Alternatively, you can send it elsewhere via blockchain transfer or use it to trade other cryptocurrencies.Step 4: Trade Balancer (BAL)Easily trade Balancer (BAL) on HTX's spot market. Simply access your account, select your trading pair, execute your trades, and monitor in real-time. We offer a user-friendly experience for both beginners and seasoned traders.

3.0k Total ViewsPublished 2024.03.29Updated 2026.06.02

How to Buy BAL

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of BAL (BAL) are presented below.

活动图片