×
Array
(
[fid] => 6974
[description] => 专注于币圈最新最快资讯,数字货币应用及知识普及
[password] =>
[icon] => b1/common_6974_icon.png
[redirect] =>
[attachextensions] =>
[creditspolicy] => Array
(
[post] => Array
(
[usecustom] => 1
[cycletype] => 1
[cycletime] => 0
[rewardnum] => 5
[extcredits1] => 1
[extcredits2] => 1
[extcredits3] => 0
[extcredits4] => 0
[extcredits5] => 0
[extcredits6] => 0
[extcredits7] => 0
[extcredits8] => 0
[rid] => 1
[fid] => 6974
[rulename] => 发表主题
[action] => post
[fids] => 32,52,67,447,1120,1151,1156,6750,6762,6763,6766,6769,6772,6773,6787,6796,6808,6809,6810,6813,6814,6820,6829,6830,6846,6856,6864,6865,6827,6930,6931,6776,6858,6880,6764,6932,6871,6758,6905,1116,6788,6812,6798,6736,6759,6842,6966,6767,6828,6924,6935,6936,6938,6940,6941,6826,6909,6803,6919,6911,6908,6881,6920,6912,6913,6921,6925,6922,6789,6818,6819,6872,6928,6969,6889,6888,6917,6939,6947,6961,6937,6943,6970,6869,6900,6902,6783,6817,1111,6870,6821,6876,6952,6954,6960,6942,6910,6949,6962,6963,6964,6927,6926,6973,6728,6929,6874,6894,6896,6885,6857,6868,1113,6778,56,6844,6878,6802,6933,6811,6923,6877,6875,6918,6892,6757,6832,6833,6795,6793,6848,6837,6849,6850,6851,6852,6853,6854,6863,6882,6836,6790,6838,6794,6791,6873,555,6934,6958,6944,6945,6907,6779,6886,6950,6904,6956,6862,6957,6855,6955,6959,6914,6965,6971,6972,6953,6976,6824,6815,6891,6866,6979,6977,6765,6903,6948,6980,6981,6983,6799,6982,6951,6984,6975,6895,6845,6879,1121,6974
)
[reply] => Array
(
[usecustom] => 1
[cycletype] => 1
[cycletime] => 0
[rewardnum] => 0
[extcredits1] => 0
[extcredits2] => 1
[extcredits3] => 10
[extcredits4] => 0
[extcredits5] => 0
[extcredits6] => 0
[extcredits7] => 0
[extcredits8] => 0
[rid] => 2
[fid] => 6974
[rulename] => 发表回复
[action] => reply
[fids] => 32,52,67,447,1120,1151,1156,6750,6763,6766,6769,6772,6773,6787,6796,6808,6809,6810,6813,6814,6820,6829,6830,6846,6856,6864,6865,6827,6930,6931,6776,6858,6880,6764,6932,6871,6758,1116,6788,6812,6798,6736,6759,6842,6966,6767,6828,6924,6935,6936,6938,6940,6941,6826,6909,6803,6919,6911,6908,6881,6920,6912,6913,6921,6925,6922,6789,6818,6819,6872,6928,6969,6889,6888,6917,6939,6947,6961,6937,6943,6970,6869,6900,6902,6783,6817,1111,6870,6821,6876,6952,6954,6960,6942,6910,6949,6962,6963,6964,6927,6926,6973,6728,6929,6874,6894,6896,6885,6857,6868,1113,6778,56,6844,6878,6802,6933,6811,6923,6877,6875,6918,6892,6757,6832,6833,6795,6793,6848,6837,6849,6850,6851,6852,6853,6854,6863,6836,6790,6838,6794,6791,6873,555,6934,6958,6944,6945,6907,6779,6886,6950,6904,6956,6862,6957,6855,6955,6959,6914,6965,6971,6972,6953,6976,6824,6815,6891,6866,6979,6977,6765,6903,6948,6980,6981,6983,6799,6982,6951,6984,6975,6895,6845,6879,1121,6974
)
)
[formulaperm] => a:5:{i:0;s:0:"";i:1;s:0:"";s:7:"message";s:0:"";s:5:"medal";N;s:5:"users";s:0:"";}
[moderators] => 实习版主1
[rules] =>
[threadtypes] => Array
(
[required] => 1
[listable] => 1
[prefix] => 1
[types] => Array
(
[1590] => 论坛公告
[1752] => 公司优惠
[1603] => 虚拟币交流
[1753] => 数字钱包
[1754] => 虚拟币存提
[1755] => 交易所
[1655] => 虚拟币资讯
[1756] => 银行卡
[1757] => 第三方支付
[1760] => 币圈大佬
[1758] => 科技前沿
[1759] => 天策嗨聊
[1661] => 入驻合作
)
[icons] => Array
(
[1590] =>
[1752] =>
[1603] =>
[1753] =>
[1754] =>
[1755] =>
[1655] =>
[1756] =>
[1757] =>
[1760] =>
[1758] =>
[1759] =>
[1661] =>
)
[moderators] => Array
(
[1590] => 1
[1752] =>
[1603] =>
[1753] =>
[1754] =>
[1755] =>
[1655] =>
[1756] =>
[1757] =>
[1760] =>
[1758] =>
[1759] => 1
[1661] =>
)
)
[threadsorts] => Array
(
)
[viewperm] => 9 26 22 11 12 13 14 15 27 43 44 60 61 62 63 64 19 31 67 68 69 73 75 76 83 84 87 90 91 92 33 38 57 58 65 66 74 77 79 80 85 86 1 2 3 7 8
[postperm] => 22 11 12 13 14 15 27 43 44 60 61 62 63 64 19 67 68 69 73 75 76 83 84 87 90 91 92 33 38 57 58 65 66 74 77 79 80 85 86 1 2 3
[replyperm] => 26 22 11 12 13 14 15 27 43 44 60 61 62 63 64 19 67 68 69 73 75 76 83 84 87 90 91 92 33 38 57 58 65 66 74 77 79 80 85 86 1 2 3
[getattachperm] => 26 22 11 12 13 14 15 27 43 44 60 61 62 63 64 19 67 68 69 73 75 76 83 84 87 90 91 92 33 38 57 58 65 66 74 77 79 80 85 86 1 2 3
[postattachperm] => 26 22 11 12 13 14 15 27 43 44 60 61 62 63 64 19 67 68 69 73 75 76 83 84 87 90 91 92 33 38 57 58 65 66 74 77 79 80 85 86 1 2 3
[postimageperm] => 26 22 11 12 13 14 15 27 43 44 60 61 62 63 64 19 67 68 69 73 75 76 83 84 87 90 91 92 33 38 57 58 65 66 74 77 79 80 85 86 1 2 3
[spviewperm] =>
[seotitle] =>
[keywords] =>
[seodescription] =>
[supe_pushsetting] =>
[modrecommend] => Array
(
[open] => 0
[num] => 10
[imagenum] => 0
[imagewidth] => 300
[imageheight] => 250
[maxlength] => 0
[cachelife] => 0
[dateline] => 0
)
[threadplugin] => Array
(
)
[replybg] =>
[extra] => a:2:{s:9:"namecolor";s:0:"";s:9:"iconwidth";s:2:"60";}
[jointype] => 0
[gviewperm] => 0
[membernum] => 0
[dateline] => 0
[lastupdate] => 0
[activity] => 0
[founderuid] => 0
[foundername] =>
[banner] =>
[groupnum] => 0
[commentitem] =>
[relatedgroup] =>
[picstyle] => 0
[widthauto] => 0
[noantitheft] => 0
[noforumhidewater] => 0
[noforumrecommend] => 0
[livetid] => 0
[price] => 0
[fup] => 6729
[type] => forum
[name] => 虚拟币讨论大厅
[status] => 1
[displayorder] => 3
[styleid] => 0
[threads] => 22528
[posts] => 341872
[todayposts] => 12
[yesterdayposts] => 322
[rank] => 2
[oldrank] => 2
[lastpost] => 2690941 trx今天最高都涨到0.18美元以上了 1731472726 22301
[domain] =>
[allowsmilies] => 1
[allowhtml] => 1
[allowbbcode] => 1
[allowimgcode] => 1
[allowmediacode] => 0
[allowanonymous] => 0
[allowpostspecial] => 21
[allowspecialonly] => 0
[allowappend] => 0
[alloweditrules] => 1
[allowfeed] => 0
[allowside] => 0
[recyclebin] => 1
[modnewposts] => 2
[jammer] => 1
[disablewatermark] => 0
[inheritedmod] => 0
[autoclose] => 0
[forumcolumns] => 3
[catforumcolumns] => 0
[threadcaches] => 0
[alloweditpost] => 1
[simple] => 16
[modworks] => 1
[allowglobalstick] => 1
[level] => 0
[commoncredits] => 0
[archive] => 0
[recommend] => 0
[favtimes] => 0
[sharetimes] => 0
[disablethumb] => 0
[disablecollect] => 0
[ismoderator] => 0
[threadtableid] => 0
[allowreply] =>
[allowpost] =>
[allowpostattach] =>
)
[虚拟币资讯]
创宇区块链|小缺陷大损失 GYM Network 何至于此
[复制链接]
|
当前离线
经验:
天策币:
活跃币:
策小分:
总在线: 分钟
本月在线: 分钟
|
|
前言北京时间 2022 年 6 月 8 日,知道创宇区块链安全实验室 自动数据监测工具监测到 BSC 链上 NFT 项目 GYM Network 因 "Public depositFromOtherContract" 权限控制问题被攻击,损失包括 7475 枚 BNB,共计约 216W 美元,目前已将兑通过 DEX 换 70W 美元的 ETH 通过 Celer 跨链到以太坊,2000 枚BNB 利用 BSC-Tornado 进行混币,余下 3000 枚 BNB 在攻击者地址。 知道创宇区块链安全实验室 第一时间跟踪本次事件并分析。 基础信息被攻击合约 :0x0288fba0bf19072d30490a0f3c81cd9b0634258a 攻击者地址:0xB2C035eee03b821cBe78644E5dA8B8eaA711D2e5 攻击合约:0xcD337b920678cF35143322Ab31ab8977C3463a45、0x68b5f1635522ec0e3402b7e2446e985958777c22 tx:0xfffd3aca0f53715f4c76c4ff1417ec8e8d00928fe0dbc20c89d875a893c29d89 GymSinglePool 代理合约: 0xa8987285e100a8b557f06a7889f79e0064b359f2 漏洞分析项目方在 GymSinglePool 合约中实现过程中对于 0x0288fba0bf19072d30490a0f3c81cd9b0634258a#depositFromOtherContract 函数缺少了权限控制,导致攻击者能够通过该函数调用内部 _autoDeposit 函数实现零消耗质押: 对于应该开放给用户的质押内部函数是 _deposit 函数,该函数实现了对于token 的审批传入,如下图所示: 对应的 _autoDeposit 函数则实现了"特权"质押,即不需要转入 Token 进行质押。同时该函数直接暴露给了用户,函数对比如下: 攻击流程攻击者为了防止链上 MEV 和抢跑机器人,将合约进行了分步部署执行,同时部署/调用了多次以完成对 GymNetwork 合约 (0x3a0d9d7764FAE860A659eb96A500F1323b411e68) 中的 GYMNET Token 完全抽离,以其中一笔部署调用为例: 1. 部署合约后调用 depositFromOtherContract 实"特权"质押,对应0xfd4a2266 方法: 内部调用细节如下: 2. 调用 0x30649e15 实现对上一步特权质押的 Token 回撤: 3. 利用 0x1d111d13 函数售出获取到的的 GYM-Token: 重复多次"特权"质押--回撤--售出步骤,攻击者最终获取到 7475 枚 BNB : 为了抑制抢跑,攻击者将添加质押和回撤进行了步骤分离,两个步骤均为核心操作,同时刻意提高添加部分步骤的 Gas Price 为 15/20gwei, 可见攻击者是有意为之。 溯源处置本次攻击原因是项目方实现的特权函数权限控制不当,在攻击发现的 1 小时后项目方将 GymSinglePool 代理合约的逻辑合约进行了多次修改,为其添加了权限控制: 并在 20 分钟后对逻辑合约添加了紧急账户处置函数: 而对于项目方 Deployer 地址分析,其部署的多个 GymSinglePool 合约根据追踪仅在两天前部署的 GymSinglePool 合约中存在漏洞,4 天前的合约则不存在此函数: 同时代理合约对应的逻辑合约被升级为漏洞合约的事件发生在在 2 days 13 hrs ago: 攻击者的资金准备 (From Tornado) 则在约 6 小时以前,攻击者的身份也值得令人深思。 总结虽然只是一处小的控制缺陷,却导致了数百万美元的损失。项目方的处置虽较为及时,漏洞导致的损失却难以挽回。该类型漏洞在审计过程中很容易被发现并将归纳到逻辑缺陷/不安全的外部调用,各项目方在开发和审计流程上切莫大意。 来源:金色财经 |
|
|
|
|
|
|