×
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] => 27391
[posts] => 437258
[todayposts] => 3
[yesterdayposts] => 467
[rank] => 2
[oldrank] => 2
[lastpost] => 2762262 特朗普家族加密币首秀受挫,其本人仍大赚36亿美元(转) 1756915571 jackcool1011
[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] =>
)
[虚拟币资讯]
重入攻击 + 管理漏洞:2000 万枚 OP 被盗事件分析
[复制链接]
|
当前离线
经验:
天策币:
活跃币:
策小分:
总在线: 分钟
本月在线: 分钟
|
|
2022 年 6 月 9 日消息,据 Optimism 与加密货币做市商 Wintermute 透露,2000 万个 Optimism 代币被黑客盗取。6 月 9 日,Optimism 基金会向 Wintermute 授予了 2000 万枚 OP 代币。 
交易发送完成后,Wintermute 发现无法访问这些代币,因为提供的地址是他们尚未部署到 Optimism/L2 的 Ethereum/L1 多签地址。该 Optimism/L2 多签地址由黑客部署,2000 枚 OP 代币也被黑客盗取。 
一、事件分析5 月 27 日,Optimism 基金会通过多签合约分两次向 Wintermute 的多签合约地址转账 2000 万 OP 代币,并且在 26 日转账 1 枚 OP 代币,3 笔交易如下: 
根据交易时间以及交易中 OP 代币数量,我们分析,在 26 日,Optimism 基金会向 Wintermute 多签合约地址转账 1 枚 OP 代币作为测试,Optimism 基金会在 Wintermute 确认收到代币后将 2000 万枚 OP 代币通过连续的两笔交易发送给 Wintermute 多签合约地址。接收地址是 Wintermute 在 Ethereum/L1 上已部署的多签合约地址,因此 Wintermute 仅仅验证是否接收到了代币,但并没有验证该地址在 Optimism/L2 上的所有权,而此时在 Optimism/L2 上并没有实际部署多签合约,这才给了黑客可乘之机。 以上转账交易中的相关地址如下: (1)Optimism 基金会在 Optimism/L2 上的多签合约地址: 0x2501c477d0a35545a387aa4a3eee4292a9a8b3f0(简记为0x2501) (2)Wintermute 在 Ethereum/L1 上的多签合约地址(Wintermute Exploiter Multisig): 0x4f3a120E72C76c22ae802D129F599BFDbc31cb81(简记为0x4f3a) 同时,Optimism/L2 上的 0 x4 f3 a 也是黑客部署的多签合约地址。 接下来,我们将从链上交易的角度详细分析一下黑客的攻击行为以及原理。 首先,我们看一下 Optimism/L2 上的 0 x4 f3 a 合约部署交易: txHash是0x00a3da68f0f6a69cb067f09c3f7e741a01636cbc27a84c603b468f65271d415b 
注意到,该合约部署时间是 6 月 5 日,其中 Wintermute/OP Exploiter 是黑客的一个地址,简记为 0 x60 b2。 该交易是如何准确生成 0 x4 f3 a 合约地址的呢? 黑客重放了 3 笔交易,尤其是最后的 Gnosis Safe: Proxy Factory 1.1.1 合约创建的交易,如下所示: (1)Ethereum/L1 上的交易如下: 
(2)Optimism/L2上的交易: 
通过重放交易,黑客在 Optimism/L2 上面创建了跟 Ethereum/L1 上完全相同(地址与合约代码相同)的 Gnosis Safe: Proxy Factory 1.1.1 合约,其中创建代理合约函数如下: 
Gnosis Safe: Proxy Factory 1.1.1 合约使用的是 0.5 版本的 Solidity,使用 new 来创建合约时使用的是 create 命令,而不是 create2。使用 create 命令创建合约,合约地址是 msg.sender 以及 nonce 来计算的。在 Ethereum/L1 上面,创建多签合约 0 x4 f3 a 的 msg.sender 就是 Gnosis Safe: Proxy Factory 1.1.1 的地址,黑客在 Optimism/L2 通过重放交易来创建于 Gnosis Safe: Proxy Factory 1.1.1 合约的主要目的就是为了保证在 Optimism/L2 上创建合约 0x4f3 a 的 msg.sender 与在 Ethereum/L1 上一致,那么黑客可以很方便的通过智能合约(合约 0 xe714)调用 createProxy 函数来创建出地址是 0 x4 f3 a 的合约。在该交易中创建过程如下所示: 
另外,合约0xe714的部署是在6月1日的以下交易中完成的: txHash: 0x69ee67800307ef7cb30ffa42d9f052290e81b3df6d3b7c29303007e33cd1c240 
发起交易地址是0x8bcfe4f1358e50a1db10025d731c8b3b17f04dbb(简记为0x8bcf),这也是黑客所持有的地址。同时,这笔交易也是0x8bcf发起的第一笔交易,资金来源于Tornado: 
整个过程从时间上看, (1)5 月 27 日,Optimism 地址 0 x2501 向 Optimism/L2 上的 0 x4 f3 a 地址转账 2000 万 OP,0 x4 f3 a 地址在 Ethereum/L1 上是 Wintermute 的多签合约地址,但此时在 Optimism/L2 上面并没有部署合约; (2)6 月 1 日,黑客地址 0 x8 bcf 部署合约 0 xe714。 (3)6 月 5 日,黑客通过重放 Ethereum/L1 上的交易创建了 Gnosis Safe: Proxy Factory 1.1.1 合约,其地址与 Ethereum/L1 上一样;然后地址 0x60b2 通过合约 0 xe714 部署了多签合约 0 x4 f3 a,合约所有权归黑客所有,因此 5 月 27 日转入的 2000 万 OP 被黑客盗取。 (4)6 月 5 日,多签合约 0 x4 f3 a 在接收到 2000 万 OP 后,将 100 万 OP 转账给黑客地址 0 x60 b2,然后将 100 万 OP 兑换成了 720.7 Ether。 


(5)6月9日,合约0x4f3a将其中的100万OP转账给了账户地址0xd8da, 
其他的1800万OP仍然在合约0x4f3a中。 
二、安全建议引发本次安全事件的根本原因是交易重放、Solidity旧版本漏洞以及主链和侧链交易签名验证等综合因素,并不是因为项目方合约代码存在漏洞。 另外,针对本次事件,项目方反应不及时、对合约管理不严格等也给了黑客可乘之机;从攻击时间线和攻击准备上看,也不排除OP内部有内鬼串通作案的可能。 来源:金色财经 |
|
|
|
|
|
|