被盗约 2700 万美元的加密资产,Penpie 为何被黑客「血洗」?

深潮2024-09-04 tarihinde yayınlandı2024-09-04 tarihinde güncellendi

9 月 4 日,建立在 Pendle 上的 DeFi 协议 Penpie 遭到黑客攻击,被盗取约 2700 万美元的加密资产。

撰文:Beosin

2024 年 09 月 04 日,据 Beosin Alert 监测显示,建立在 Pendle 上的 DeFi 协议 Penpie 遭到黑客攻击,被盗取约 2700 万美元的加密资产。Beosin 安全团队第一时间对事件进行了分析,结果如下。

Penpie 是一个与 Pendle Finance 集成的 DeFi 平台,专注于锁定 PENDLE 代币以获得 Pendle Finance 内的治理权和增强的收益收益。Penpie 旨在为 Pendle Finance 用户提供收益和 veTokenomics 提升服务。

事件相关信息

●攻击交易

0x56e09abb35ff12271fdb38ff8a23e4d4a7396844426a94c4d3af2e8b7a0a2813

●攻击者地址

0xc0Eb7e6E2b94aA43BDD0c60E645fe915d5c6eb84

●攻击合约

0x4aF4C234B8CB6e060797e87AFB724cfb1d320Bb7

●被攻击合约

0x6e799758cee75dae3d84e09d40dc416ecf713652

漏洞分析

本次事件主要是攻击者利用 market 合约中 claimRewards 函数重入质押以提高 staking 合约余额,再将 staking 合约中多余的代币和质押资产提取以获利。

攻击流程

攻击准备阶段:

1. 攻击者通过攻击合约调用用 Penpie 协议中的 Factory 合约创建了新的 market 以及 Yield,其中将 SY 设置为攻击合约。

0xfda0dde38fa4c5b0e13c506782527a039d3a87f93f9208c104ee569a642172d2

2.攻击者进行闪电贷了四种代币,为后续抵押资金作储备。并调用 staking 合约中的 batchHarvestMarketRewards 函数对新创建的 market 进行奖励更新。

3.在 batchHarvestMarketRewards 函数中,对 market 进行奖励更新时,会调用 market 合约中的 redeemRewards 函数。并且合约记录了 redeemRewards 函数前后的余额变化。

4.在 market 的 redeemRewards 函数中,会调用到 SY 合约中的 claimReward 函数。然而 SY 合约是攻击合约,攻击合约通过这个函数完成了对 Staking 合约的重入,将闪电贷的资金抵押到 Staking 合约,共 4 次。

5.这时回到 Staking,由于 redeemRewards 函数前后余额差明显,触发了_sendRewards 函数,_sendRewards 函数最后调用的_queueRewarder 会将多余的代币授权给 market 合约并记录为奖励。

6.攻击者领取记录的奖励。

7.攻击者将质押的资产通过 withdraw 函数提取,并归还闪电贷进行获利。

Pendle 随后发布攻击分析报告:发现漏洞后立即暂停合约,使 1.05 亿美元资产免受进一步损失。

资金追踪

截止发文时,被盗资金约 2700 万美元,Beosin Trace 追踪发现攻击者已将被盗资金全部转换为 ETH,资金先存放在 0x2f2dDE668e5426463E05D795f5297dB334f61C39 地址。

截止发文,Penpie 攻击者地址向 Tornado Cash 陆续转移了 2900 枚 ETH(价值约 690 万美元)。

目前,Penpie 项目方也通过链上向黑客喊话,希望与黑客进行沟通返还被盗资金,如果返还可以支付赏金。并附上了联系方式。

总结

针对本次事件,Beosin 安全团队建议:1.对合约的相关函数增加防重入修饰器;2.不使用白名单对传入代币进行校验的话,最好使用统一的包装合约重新生成代币;3.项目上线前,强烈建议选择专业的安全审计公司进行全面的安全审计,规避安全风险。

İlgili Okumalar

Anthropic Major Release: "The Founder's Playbook" - All 4 Stages of Entrepreneurship, Completely Reimagined with AI

**Anthropic Releases "The Founder's Playbook," Reimagining the Four Stages of Startups with AI** The logic of entrepreneurship is being fundamentally reshaped by AI. Anthropic's new handbook, "The Founder's Playbook: Building an AI-Native Startup," defines the AI-native startup as a new species: not a traditional company with AI tools, but a venture driven by AI from day one. The founder's role is transforming from a hands-on builder to a conductor or architect, orchestrating AI agents for execution while focusing on high-level judgment and strategy. Anthropic outlines a product matrix of Claude tools for different tasks: Claude Chat for interactive research, Claude Code for generating production-ready code, and Claude Cowork for automating knowledge-intensive workflows. The handbook structures the startup lifecycle into four stages, detailing core goals, pitfalls, and AI applications for each: 1. **Idea Stage**: Focuses on validating a real problem. The core challenge is avoiding confirmation bias. AI practices include using Claude as a "structured devil's advocate" to challenge assumptions and for automated market/competitor research. 2. **MVP Stage**: Aims to gather early signals of Product-Market Fit (PMF). Key risks are technical debt and scope creep due to rapid AI-assisted development. Recommended AI uses include maintaining project memory documents (e.g., CLAUDE.md), using Claude Code for structured coding, and automating user feedback analysis. 3. **Launch Stage**: Centers on establishing scalable growth, operations, and compliance. Challenges include accelerating technical debt and founders becoming bottlenecks. AI should be used to build an "operating system" for launch—automating routine tasks (scheduling, reporting, content) and code audits—freeing founders for critical decisions. 4. **Scale Stage**: Focuses on achieving sustainable business operations. The main challenge is delegating operational control. AI should be leveraged for differentiated marketing, operational optimization, and building competitive moats through data network effects. The handbook concludes that in the AI era, "Can we build it?" is no longer the primary constraint. The advantage shifts back to foundational strengths: **insight, judgment, and a deep understanding of a specific problem and audience.**

marsbit8 saat önce

Anthropic Major Release: "The Founder's Playbook" - All 4 Stages of Entrepreneurship, Completely Reimagined with AI

marsbit8 saat önce

İşlemler

Spot
Futures

Popüler Makaleler

PENDLE Nasıl Satın Alınır

HTX.com’a hoş geldiniz! Pendle (PENDLE) satın alma işlemlerini basit ve kullanışlı bir hâle getirdik. Adım adım açıkladığımız rehberimizi takip ederek kripto yolculuğunuza başlayın. 1. Adım: HTX Hesabınızı OluşturunHTX'te ücretsiz bir hesap açmak için e-posta adresinizi veya telefon numaranızı kullanın. Sorunsuzca kaydolun ve tüm özelliklerin kilidini açın. Hesabımı Aç2. Adım: Kripto Satın Al Bölümüne Gidin ve Ödeme Yönteminizi SeçinKredi/Banka Kartı: Visa veya Mastercard'ınızı kullanarak anında Pendle (PENDLE) satın alın.Bakiye: Sorunsuz bir şekilde işlem yapmak için HTX hesap bakiyenizdeki fonları kullanın.Üçüncü Taraflar: Kullanımı kolaylaştırmak için Google Pay ve Apple Pay gibi popüler ödeme yöntemlerini ekledik.P2P: HTX'teki diğer kullanıcılarla doğrudan işlem yapın.Borsa Dışı (OTC): Yatırımcılar için kişiye özel hizmetler ve rekabetçi döviz kurları sunuyoruz.3. Adım: Pendle (PENDLE) Varlıklarınızı SaklayınPendle (PENDLE) satın aldıktan sonra HTX hesabınızda saklayın. Alternatif olarak, blok zinciri transferi yoluyla başka bir yere gönderebilir veya diğer kripto para birimlerini takas etmek için kullanabilirsiniz.4. Adım: Pendle (PENDLE) Varlıklarınızla İşlem YapınHTX'in spot piyasasında Pendle (PENDLE) ile kolayca işlemler yapın.Hesabınıza erişin, işlem çiftinizi seçin, işlemlerinizi gerçekleştirin ve gerçek zamanlı olarak izleyin. Hem yeni başlayanlar hem de deneyimli yatırımcılar için kullanıcı dostu bir deneyim sunuyoruz.

364 Toplam GörüntülenmeYayınlanma 2024.12.12Güncellenme 2025.03.21

PENDLE Nasıl Satın Alınır

Tartışmalar

HTX Topluluğuna hoş geldiniz. Burada, en son platform gelişmeleri hakkında bilgi sahibi olabilir ve profesyonel piyasa görüşlerine erişebilirsiniz. Kullanıcıların PENDLE (PENDLE) fiyatı hakkındaki görüşleri aşağıda sunulmaktadır.

活动图片