优惠论坛
Well123
注册
找回密码 |
天策评选的优秀公司,所有会员与公司发生的问题我们将负责尽力协助处理。
收起/展开
新晋公司
 

新晋公司具有驻站代表,并不在论坛纠纷服务范围内,请会员自行判断选择

  • 356
S级信誉公司
ManBetX万博
YZ
乐投
taptap(点点)
E世博
瑞丰国际
A级信誉公司
吉祥坊
星宝合营
乐动体育
B级信誉公司
bet365
C级合作公司
CMP
金星
LOKI
平博
  • 推荐主题
  • 热门活动
  • 币圈快讯
  • 商城动态
重要通知
 
论坛搜索
              搜索
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] => 27336 [posts] => 435812 [todayposts] => 194 [yesterdayposts] => 476 [rank] => 3 [oldrank] => 2 [lastpost] => 2761495 币圈系列:meme币能投吗?这3个真相,普通人必须知道 1756665726 mxsj2016k [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] => )
打印 上一主题 下一主题
卷土重来?黑客获利约130万美元,FEGexPRO合约被攻击事件分析
[复制链接]
avatar
跳转到指定楼层
1#
2022年5月16日,成都链安链必应-区块链安全态势感知平台舆情监测显示,Ethereum和BNB Chain上FEGtoken项目的FEGexPRO合约遭受黑客攻击,黑客获利约3280 BNB 以及144 ETH,价值约130万美元。成都链安技术团队对事件进行了分析,结果如下。
5 i+ E& b' k! m3 Y9 x5 x% w+ Y/ X/ t' u8 |% \; M; C* i$ z! @

* `2 N; \* s. A
8 P! m6 {; x2 F2 g
. F3 @( w+ Q3 [/ R0 a8 j
" N: i7 r: ~) R3 ]#1 事件相关信息" T7 ?3 [- q6 M2 \

9 ?. A7 Z7 g% A% A. r# ]; u5 Z9 Y2 L( x( D, r3 S- w

! `6 S1 _) ]* A本次攻击事件包含多笔交易,部分交易信息如下所示:. b# U3 j& h3 C% i

2 v+ M7 Y- u; z3 M% u0 t( ^6 B$ \) k( S; l* R2 b

! ~5 O+ V( X( y, ?攻击交易 (部分)3 ]) e! y& h/ `2 b/ j& s# J) [

0 W+ d9 b9 z) r& k0x77cf448ceaf8f66e06d1537ef83218725670d3a509583ea0d161533fda56c063 (BNB Chain)
. s3 [0 R9 X8 l' G. S8 C  d. F7 Q" K7 r9 T8 L2 j8 o% j
0x1e769a59a5a9dabec0cb7f21a3e346f55ae1972bb18ae5eeacdaa0bc3424abd2 (Ethereum)
# H/ K) N8 t9 b5 |. R+ R" c6 {6 ?. ~' K9 L& V0 P7 I: M
; p7 p! p2 ]4 |3 v

$ M+ g- |% h: d  d. t# R$ o攻击者地址  @  `8 U  U7 w7 n! i2 t

% G, q3 F! X' B0 f/ _7 r9 K0x73b359d5da488eb2e97990619976f2f004e9ff7c
3 M. S1 `8 f( C* a. \1 |+ h: I1 f# c  R3 I* u. r( h* c/ M

' y7 I- ?3 ~0 V7 ^0 W
* f. h, E7 _! Z9 N* t攻击合约
7 E) V$ S) S& ?3 o* A" f8 G
1 s6 P/ B: d4 G- N/ r  f0 E6 a0x9a843bb125a3c03f496cb44653741f2cef82f445+ Q0 l! W7 Y% d( k3 {3 A- T

9 x/ t, i& B0 F; v6 p4 t6 `) Z3 o; T* B! Y7 J- p( ]

3 p3 R. t6 l0 z6 c8 X被攻击合约(部分)
+ _5 A2 @4 r: T6 ?# Q8 T( \- j: x& B4 S3 \" s
0x818e2013dd7d9bf4547aaabf6b617c1262578bc7 (BNB Chain)) V& H9 d- D2 l8 S7 g

9 I# S- W) Z9 U. w; f3 [0xf2bda964ec2d2fcb1610c886ed4831bf58f64948 (Ethereum)- \6 _2 h! z# m- q

& y; p4 {2 v2 F8 b# s* D* A6 }. B, {# m) [- w" k6 @
; N+ z) z# I$ w  ?- p# j/ x5 d
#2 攻击流程
8 H3 x: T* l/ ~7 |& ~4 t; M5 h- \$ [2 d4 |5 s

! B  w+ I$ M6 ?3 f0 a- p" ~$ w6 E  XEthereum和BNB Chain上使用攻击手法相同,以下分析基于BNB Chain上攻击:! e( U# x' ^8 i8 o
% |& u$ W1 Y  p# B* z4 K
' U6 A" E% Z: d6 n1 q

! K, M6 l- }, T- f1. 攻击者调用攻击合约(0x9a84...f445)利用闪电贷从DVM合约(0xd534...0dd7)中借贷915.84 WBNB,然后将116.81 WBNB兑换成115.65 fBNB为后续攻击做准备。6 m2 e( q7 i- ]

5 w9 y9 N$ C9 ?+ Y) [7 o) \
/ c3 T* U9 {- p) V
& R9 z: a4 M; ]) J7 m, a5 S2. 攻击者利用攻击合约创建了10个合约,为后续攻击做准备。
  E3 u* P; E/ W6 M0 t( t1 Q% J  u6 b: J- o, _- {) j

8 X/ Z. |( Y) v, T: U! r4 C9 X% F
6 N  @8 z+ D; V0 I3 E
2 u# M2 ]  M7 r& C1 ]& A
3. 攻击者接下来将兑换得到的fBNB代币抵押到FEGexPRO合约(0x818e...8bc7)中。: D0 q  b$ p8 Q/ ]# w

  W/ H8 X( d8 {. i9 t4 D  c9 o2 M' d6 }' i
5 y" o9 ]2 e% J8 w
4. 然后攻击者重复调用depositInternal和swapToSwap函数,让FEGexPRO合约授权fBNB给之前创建好的其他攻击合约。
' w/ S/ A) P  _4 y! ^
$ B  P: ]) k7 U% s. B  _. Q# D; @: F
6 q& S. N8 t! H% R2 ~0 u) u! @3 T. n6 K5 ?' O& ]% b; \; g
) ^" F- Y! {9 ?

9 e0 y6 U% U6 k& q) W5. 然后利用其他攻击合约调用transferFrom函数将FEGexPRO合约中fBNB全部转移到攻击合约(0x9a84...f445)中。, K) r+ o" L$ [9 l8 i8 T
7 P3 e! ]/ n. H" ]

& L7 H' a) T; v6 j' L# a9 c5 a+ a3 `- m; f

/ \7 \$ E& e+ O1 l6 c) p+ l8 T1 j; {9 [8 I0 a7 n
6. 接下来又在LP交易对合约(0x2aa7...6c14)中借贷31,217,683,882,286.007211154 FEG代币和423 WBNB。
, T4 P, D1 P) P! P9 Y* W( G) V* V6 X6 V3 u: \* w3 r+ }, i

4 [1 A7 z* G0 x+ A3 n. ]
* U- @4 g8 u7 t: `' m7. 然后重复3、4、5步骤的攻击手法,将FEGexPRO合约中大量FEG代币盗取到攻击合约中。
5 j2 |( ~1 Q. E) j7 E/ X4 Y0 A5 q7 O
! Q+ s5 R8 f1 n# M( e( J

+ F/ A3 v, p) B2 _& k( ?5 f! ?) c, {3 |6 h$ a1 ^, }2 V2 M' I, |1 U# A8 U

9 W& @% a, Q, F. P- w
" F# V. N/ ~+ `# b
" `% @( ?" o% |, [. ]5 e8. 然后归还闪电贷,将获得的WBNB转入攻击合约中完成此笔攻击。
- H( C: _$ `3 e3 l
3 G8 i9 F1 j1 `; j; V8 U- [1 V) y  ?* ]! G! A

5 y; _! t1 S- m
- t& D' Y; K- p, j  {
6 b+ h2 G# ^- }8 e' e5 _9. 此后,又利用相同的原理,执行了50余笔相同的攻击,最获利约144 ETH和3280 BNB。
6 @) x2 p3 I/ H0 M0 ]
! \0 p7 n" }9 v
) D& w5 ]# u; j  ~. a! c0 X9 R9 L2 x6 e% Y9 K9 Z0 G. \3 E! H

6 ]" O3 L$ v( {& Y+ c
7 L6 c+ y9 d9 Q0 S3 W% P& I
+ ?% M( j& I5 \$ x' j8 g" ^, [  A; v1 l
8 s2 v! i6 d6 V$ ~8 v9 C( R5 R
: T; N( ^: @+ A4 M$ `
#3 漏洞分析
3 ~1 a( n& ]4 c; p7 j: Z9 Y
, B& ^* \7 U$ E5 `
1 x4 v7 B5 _- M, r* u本次攻击主要利用了FEGexPRO合约中swapToSwap函数中path地址可控且合约中未对path地址进行有效性校验的漏洞。由于合约中depositInternal函数中更新用户余额时依赖于合约中当前代币余额,攻击者通过传入一个恶意的path地址,调用swapToSwap函数时合约中代币余额并未发生变化,导致攻击者可以反复重置攻击合约在FEGexPRO合约中记录的代币数量,从而让FEGexPRO合约将自身代币反复授权给攻击者所控制的多个恶意合约。4 p/ d0 u7 _9 I; i5 i1 r3 d1 m

2 r6 C! _# n& Y1 |6 d+ P: p1 j7 a0 r' A: q2 f. g5 E
3 U# U& }" t* ^

2 G$ E. @- J& X+ X6 K! r( ]
( `) I( H9 Y" Z/ s  H" V6 Q8 y3 M; c1 A8 V6 L8 m
: }7 h. s- ?5 C1 y
#4 资金追踪. {9 B  U: y& u+ Q* h7 m, ?" i  _
8 i( ~; O. i+ {' U/ A1 x2 M
" A0 v( T( M: r. v/ V4 U7 j) B
截止发文时,被盗资金仍在攻击者地址(0x73b3...ff7c)中并未转移。9 H/ q, W1 s9 J  B9 i" v

- g6 i; n) S3 G# e! @1 u: |& N+ n  c

$ [( G/ x) ~+ V+ ^! m9 b5 o3 @3 `2 t1 R/ ^9 s" Q7 i0 K

. J! \: D1 j( L2 y' f9 ~: p% c8 x! h+ V9 Q7 [

  ?/ y/ ~+ m$ Q
2 }" N# L: w) N! d. D* m7 o. a$ p! k  k) U  d; R, c6 g! g/ `; J
, M+ t/ ^$ G- i1 W6 v

& d) c) n8 A" J4 P$ f5 K% t#5 总结
8 c6 u, O. O8 g, o3 r8 r  m
2 ~8 Y( l, N0 x- D3 r  u2 C0 ?7 ]6 |
- Q) y1 l4 h9 r# N: h针对本次事件,成都链安技术团队建议:
' C7 m# ]4 e/ U' s) Z* m6 X+ W# [) D8 D/ ]7 k, h
2 x: E$ @, Z9 Y* Q2 m7 o

) Q* ]; l7 I$ Q& N" _/ S8 ]( l项目开发时,应该注意与其他合约交互时可能存在的安全风险,尽量避免将关键参数设置为用户可控。如果业务需求如此,则需要严格判断用户输入的参数是否存在风险。此外建议项目上线前选择专业的安全审计公司进行全面的安全审计,规避安全风险。
# W. p" z" ^4 ], U5 ^' j0 _2 M; k; h
avatar
16#
看来它还是挺引人注目的公司
avatar
15#
黑客,真厉害,无所不在啊,这是
avatar
14#
黑客的火力的那么多啊
avatar
13#
黑客真的是牛逼哄哄了的哦。
avatar
12#
这些黑客果然也是很厉害了
avatar
还是需要有技术才能够赚钱呢。
avatar
这也是要有技术的才能做到了
avatar
有门技术肯定是比较好赚钱的事
avatar
8#
黑客很厉害啊,又是赚到了不少的钱的咯
avatar
7#
以后还是立志去干黑客比较赚钱
avatar
6#
这类新闻适当看一看就可以了
avatar
5#
主题回复处广告图案-天策传媒
那你还赶紧的去出手赢个几百万的
avatar
如果是行业内的人可以分析一下
avatar
开始发新闻了,也是一堆吧
avatar
2#
黑客也是厉害啊,又是赚到很多。
您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

:) :( :D :'( :@ :o
:P :$ ;P :L :Q :lol
:loveliness: :funk: :curse: :dizzy: :shutup: :sleepy:
:hug: :victory: :time: :kiss: :handshake: :call:
{:8_286:} {:8_287:} {:8_288:} {:8_289:}
{:8_290:} {:8_291:} {:8_292:} {:8_293:}
{:8_294:} {:8_295:} {:8_296:} {:8_297:}
{:8_298:} {:8_299:} {:8_300:} {:8_301:}
{:8_302:} {:8_303:} {:8_304:} {:8_305:}
{:8_306:} {:8_307:} {:8_308:} {:8_309:}
{:8_310:} {:8_311:} {:8_312:}
{:8_313:} {:8_314:} {:8_315:} {:8_316:}
{:8_317:} {:8_318:} {:8_319:} {:8_320:}
:) :( :D :'( :@ :o
:P :$ ;P :L :Q :lol
:loveliness: :funk: :curse: :dizzy: :shutup: :sleepy:
:hug: :victory: :time: :kiss: :handshake: :call:
:) :( :D :'( :@ :o
:P :$ ;P :L :Q :lol
:loveliness: :funk: :curse: :dizzy: :shutup: :sleepy:
:hug: :victory: :time: :kiss: :handshake: :call:
:hug: :victory:
:) :( :D :'( :@ :o
:P :$ ;P :L :Q :lol
:loveliness: :funk: :curse: :dizzy: :shutup: :sleepy:
:hug: :victory: :time: :kiss: :handshake: :call:
:hug: :victory: :time: :kiss: :handshake: :call:
:hug: :victory: :time: :kiss: :handshake: :call:
:hug: :victory: :time: :kiss: :handshake: :call:
:hug: :victory: :time: :kiss: :handshake: :call:
:hug: :victory: :time: :kiss: :handshake:
未有绑定记录
 


Powered by 天策论坛   © 2007-2025 天策论坛 | 小黑屋 | 手机|
1717 : 0