当前位置:网站首页>NFT流动性市场安全问题频发—NFT交易平台Quixotic被黑事件分析
NFT流动性市场安全问题频发—NFT交易平台Quixotic被黑事件分析
2022-07-04 15:21:00 【SharkTeam】
7月1日,Optimism生态最大NFT交易平台Quixotic智能合约出现漏洞,黑客利用该漏洞盗取了大量用户的资产

近期NFT流动性市场安全问题频发。SharkTeam第一时间对此事件进行了技术分析,并总结了安全防范手段,希望后续项目可以引以为戒,共筑区块链行业的安全防线。

一、 事件分析
攻击者地址:0x0a0805082ea0fc8bfdcc6218a986efda6704efe5,简记为0x0a08
攻击合约地址:0xbe81eabdbd437cba43e4c1c330c63022772c2520,简记为0xbe81
被攻击合约地址:0x065e8a87b8f11aed6facf9447abe5e8c5d7502b6,简记为0x065e

攻击者在创建了攻击合约后,通过攻击合约发起了大量的攻击交易,攻击了很多用户,盗取的资产以WETH和Optimism (OP)为主。以第一笔攻击交易为例进行分析,分析内容如下:
txHash: 0xfdee36012cbeb26d37a857a4bb1937ce0b30379a25198735089c75cfd3ea799a

该交易中,攻击者盗取了0.0975 WETH,调用的函数与参数如下:

交易由攻击者地址0x0a08发起,调用了被攻击合约0x065e中的fillSellOrder函数,其中参数contractAddress实际攻击合约地址0xbe81。
fillSellOrder函数如下:

validateSellerSignature函数如下:

这里_validateSellerSignature并没有校验参数sellOrder中的contractAddress,因此攻击者传入的是自定义的合约地址,即攻击合约地址
_fillSellOrder函数如下:

这里在转移NFT时,调用了参数contractAddress对应的NFT合约中的转移函数,在调用该函数前必须要用户进行授权,攻击者完全可以自定义该函数将用户授权的所有代币提取到自己的账户,包括ERC721、ERC1155、ERC20等多种类型。这里攻击者只能提取用户授权的代币。
综上所述,本次安全事件发生的根本原因在于合约本身存在漏洞,用户的过度授权给了黑客可乘之机。
二、安全建议
引发本次安全事件的根本原因是合约对于地址型参数缺少校验以及用户的过度授权。因此,我们建议无论是项目方还是用户都要提高安全意识,尽可能的避免合约漏洞。在代币授权的时候要谨慎而行,尽可能地将授权的代币种类和数量降低到最小。
三、关于我们
SharkTeam的愿景是全面保护Web3世界的安全。团队成员分布在北京、南京、苏州、硅谷,由来自世界各地的经验丰富的安全专业人士和高级研究人员组成,精通区块链和智能合约的底层理论,提供包括智能合约审计、链上分析、应急响应等服务。已与区块链生态系统各个领域的关键参与者,如Huobi Global、OKC、polygon、Polkadot、imToken、ChainIDE等建立长期合作关系。
Telegram:https://t.me/sharkteamorg
Twitter:https://twitter.com/sharkteamorg
Reddit:https://www.reddit.com/r/sharkteamorg
更多区块链安全咨询与分析,点击下方链接查看
D查查|链上风险核查 https://m.chainaegis.com
边栏推荐
- Go language loop statement (under Lesson 10)
- 时序图数据建模与产业链分析
- Detailed process of DC-2 range construction and penetration practice (DC range Series)
- ~89 deformation translation
- Oracle监听器Server端与Client端配置实例
- egg. JS learning notes
- .Net 应用考虑x64生成
- Solution du système de gestion de la chaîne d'approvisionnement du parc logistique intelligent
- Years of training, towards Kata 3.0! Enter the safe container experience out of the box | dragon lizard Technology
- Inside and outside: flow chart drawing elementary: six common mistakes
猜你喜欢

智慧物流园区供应链管理系统解决方案:数智化供应链赋能物流运输行业供应链新模式

第十八届IET交直流输电国际会议(ACDC2022)于线上成功举办

Kunming Third Ring Road Closure project will pass through these places. Is there one near your home?

overflow:auto与felx结合的用法

Analysis of abnormal frequency of minor GC in container environment

PingCode 性能测试之负载测试实践

Go micro tutorial - Chapter 2 go micro V3 using gin and etcd

Principle and general steps of SQL injection

Solution of commercial supply chain coordination system in the mineral industry: build a digital intelligent supply chain platform to ensure the safe supply of mineral resources

51 single chip microcomputer temperature alarm based on WiFi control
随机推荐
PingCode 性能测试之负载测试实践
Visual studio 2019 (localdb) mssqllocaldb SQL Server 2014 database version is 852 and cannot be opened. This server supports 782
基于wifi控制的51单片机温度报警器
Go micro tutorial - Chapter 2 go micro V3 using gin and etcd
如何实现一个延时队列 ?
Linear time sequencing
从数数开始
Embedded software architecture design - function call
egg. JS learning notes
Hash table
7 RSA密码体制
js中的数组筛选fliter
~89 deformation translation
世界环境日 | 周大福用心服务推动减碳环保
Redis 的内存淘汰策略和过期删除策略的区别
Implement graph data construction task based on check point
Research Report on plastic recycling machine industry - market status analysis and development prospect forecast
【云原生】服务网格是什么“格”?
C# 更加优质的操作MongoDB数据库
S2b2b solution for lighting industry: efficiently enable the industrial supply chain and improve the economic benefits of enterprises