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

This Investor Day, SanDisk's 'Stunning Numbers' Shook the Market

SanDisk's Investor Day Shocks Market with "Explosive" Long-Term Targets SanDisk stunned the market at its 2026 Investor Day by unveiling an extremely aggressive long-term financial model. The company targets **mid-to-high double-digit revenue growth** for fiscal years 2028-2030. More impressively, it forecasts non-GAAP gross margins of approximately **80%** and operating margins around **75%** during that period, with an adjusted free cash flow margin of about 50%. A key strategic shift is SanDisk's focus on profitability over sheer output volume. The company clarified it will **flexibly adjust salable bit output based on profit optimization needs**, not simply chase bit shipment growth. This approach aims to avoid oversupply, especially during technology node transitions. SanDisk also committed to returning **100% of excess cash to shareholders** after funding business growth. Confidence in these targets is bolstered by new business model (NBM) agreements with eight major clients, covering roughly **50% of FY2027 and two-thirds of FY2028 bit shipments**, aiming to reduce cyclical volatility. The company sees massive tailwinds from AI, particularly the shift from training to inference, which is reshaping data center memory hierarchies. It estimates the enterprise flash TAM could reach **1.2 zettabytes by 2030**. SanDisk is advancing technologies like its CMOS Bonded Array (CBA) strategy and High Bandwidth Flash (HBF) for AI inference workloads. The announcement triggered a sharp rally, with SanDisk's stock soaring nearly 18% intraday and lifting the broader storage sector.

marsbit3m ago

This Investor Day, SanDisk's 'Stunning Numbers' Shook the Market

marsbit3m ago

Bitwise Chief Investment Officer: Revenue Reigns Supreme, The Valuation Logic for Crypto is Being Rewritten

The valuation logic of crypto assets is shifting from speculative models to a focus on real revenue and earnings, according to Bitwise CIO Matt Hougan. For years, a key criticism was that crypto tokens lacked fundamental value as they didn't generate cash flows for holders, partly due to a restrictive regulatory environment. This changed following the 2023 Ripple lawsuit and subsequent regulatory shifts, allowing projects to direct protocol revenues to token holders. Hyperliquid pioneered this model, using ~99% of its fee revenue to buy back and burn its HYPE token, creating a direct link between network activity and token value. Its success has inspired widespread adoption. Uniswap now uses all fee revenue to burn UNI, Aave has implemented automated buybacks, and new platforms like shturl.c and Lighter have built revenue-sharing mechanisms from inception. Even layer-1 blockchains like Solana and Aptos are adjusting fee models to benefit token holders. Hougan draws a parallel to early internet companies that eventually monetized their user bases. He argues that top crypto platforms possess significant pricing power and that the market undervalues them because many investors, both inside and outside crypto, have not yet recognized this fundamental shift. While tokens carry different risks than equities (e.g., governance-based revenue rights), the growing alignment of revenue with token value could lead to a significant re-rating of crypto asset valuations in the coming 12-24 months.

marsbit11m ago

Bitwise Chief Investment Officer: Revenue Reigns Supreme, The Valuation Logic for Crypto is Being Rewritten

marsbit11m ago

Shanghai Automotive Chip 'Little Giant' to IPO, Aiming to Raise 3.489 Billion Yuan

"Shanghai-based auto chip 'Little Giant' Gatsland Aims for IPO, Seeking to Raise 3.489 Billion CNY" Gatsland Microelectronics, a Shanghai-based automotive-grade millimeter-wave radar and ultra-wideband (UWB) chip company recognized as a national-level "Little Giant" specializing in core technologies, has filed for an IPO on Shanghai's STAR Market. Founded in 2014, the company is a key player in China's automotive semiconductor sector. It achieved a milestone in 2017 by mass-producing the world's first automotive-grade 77GHz mmWave radar RF front-end single-chip using CMOS process technology, breaking the industry's reliance on GaAs and SiGe multi-chip solutions. Gatsland claims to be the fourth-largest global and second-largest domestic supplier of automotive mmWave radar chips, and a leader in CMOS-based solutions. Financially, Gatsland has shown strong revenue growth, with figures rising from 206 million CNY in 2023 to 632 million CNY in 2025. However, the company remains unprofitable, reporting net losses for the reported periods, including a loss of 193 million CNY in 2025. Despite this, it maintains high gross margins, averaging around 47%, which are notably above industry peers. Over 97% of its recent revenue comes from automotive mmWave radar chips. The company's products, including its Alps and Kunlun platform chips, are used in advanced driver assistance systems (ADAS), autonomous driving, and in-cabin sensing. Its chips have been adopted by major Chinese automakers like BYD, Geely, and NIO, and it has begun supplying European Tier 1 suppliers and international OEMs including Volvo and Rivian. Gatsland's customer base is highly concentrated, with its top five direct clients accounting for over 99% of sales in recent periods. Its supply chain also relies significantly on overseas partners for wafer fabrication, packaging, and EDA tools. Notably, the National Integrated Circuit Industry Investment Fund Phase II ("Big Fund II") is among its shareholders. The management team, including founder and CEO Chen Jiashu, holds strong academic and industry backgrounds from institutions like UC Berkeley and companies such as Texas Instruments. For its IPO, Gatsland plans to raise approximately 3.489 billion CNY to fund R&D and production projects for next-generation mmWave radar and high-precision UWB chips, as well as a new innovation center. The company operates in a highly competitive landscape dominated by international giants like Infineon, NXP, and TI. While it has gained significant market share in China, Gatsland acknowledges it still faces gaps in comprehensive R&D strength and global customer reach compared to these established players.

marsbit12m ago

Shanghai Automotive Chip 'Little Giant' to IPO, Aiming to Raise 3.489 Billion Yuan

marsbit12m ago

Tether Finally Gets Audited by a Big Four Firm, But USDT's Transparency Issues Are Far From Over

Tether announced that KPMG U.S. has completed its first independent audit of Tether International's financial statements as of December 31, 2025, issuing an unqualified opinion—the highest level of assurance. The audit confirms Tether's assets exceeded liabilities by $6.814 billion at that date, with physical verification of gold bars and examination of underlying records. This represents a significant step beyond the quarterly reserve attestations Tether previously received, moving to a full financial statement audit that examines internal controls, transaction sampling, and accounting policies. However, the article highlights several ongoing transparency questions. The full KPMG audit report has not been publicly released, preventing independent verification of details like asset classification or related-party transactions. The audit covers a specific entity, "Tether International, S.A. de C.V.," leaving the scope concerning Tether's complex corporate structure unclear. Furthermore, the $6.8 billion excess reserves confirmed for end-2025 had shrunk to approximately $4.1 billion by Q2 2026. Risks within the reserve composition, particularly concerning secured loans, persist even with an audit. The audit's data is also already 8 months old, while USDT's circulation has grown rapidly. Strategically, the audit is seen as a move to bolster Tether's position amid U.S. regulatory developments like the GENIUS Act, which mandates audits for stablecoin issuers but leaves a path for foreign entities like Tether. While the KPMG opinion is a strong credibility signal, the article concludes that full transparency and regulatory compliance require further steps, starting with the publication of the complete audit report.

marsbit42m ago

Tether Finally Gets Audited by a Big Four Firm, But USDT's Transparency Issues Are Far From Over

marsbit42m ago

Trading

Spot

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.3k 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.

活动图片