avatar
Articles
110
Tags
11
Categories
0

Home
Archives
Tags
About
何方圜的博客
Home
Archives
Tags
About

何方圜的博客

CTF-SVip
Created2024-11-30
CTF-SVip首先先看题目代码 // pragma solidity 0.4.24; //这是原来的版本,很奇怪不知道为啥无法在foundry编译,所以换成以下版本pragma solidity ^0.8.13;contract SVip { // 一个地址记录一个分数 mapping(address => uint) public points; // 查看某地址是不是超级VIP mapping(address => bool) public isSuperVip; uint256 public numOfFree; // 用户成为超级VIP需要999分数 function promotionSVip() public { require(points[msg.sender] >= 999, "Sorry, you don't have enough points"); isSuperVip[msg.sender] = true; ...
CTF-TrusterLenderPool
Created2024-11-30
CTF-TrusterLenderPool这个题很经典。又是假装还款的存在 有用到swap交换,而且还是address(this)来检查token0的地址,所以就更加可以用来假装还款了 题目源码: // SPDX-License-Identifier: MITpragma solidity ^0.8.0;import "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "@openzeppelin/contracts/utils/Address.sol";import "@openzeppelin/contracts/security/ReentrancyGuard.sol";contract Cert is IERC20 { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private ...
sherlock-Superfluid Locker System 审计报告
Created2024-11-25
一SummaryDue to the lack of access control on the stopFunding function, anyone can monitor the blockchain, identify a program with an active funding process, and maliciously call the stopFunding function to stop the program, resulting in improper fund allocation.I know you have already described ithttps://github.com/sherlock-audit/2024-11-superfluid-locking-contract-HeYuan-33?tab=readme-ov-file#q-please-discuss-any-design-choices-you-madeBut can you be sure that the participant is not an attacker ...
sherlock-2024-11-debita Finance V3 审计报告
Created2024-11-24
一SummaryThere is no verification of the incentives recipient, which allows anyone to impersonate other borrowers and claim their incentives. Root CauseVulnerable code: 2024-11-debita-finance-v3-HeYuan-33/Debita-V3-Contracts/contracts/DebitaIncentives.sol Line 203 in 1465ba6 IERC20(token).transfer(msg.sender, amountToClaim); Using msg.sender to send rewards to the caller without performing a check allows an attacker to impersonate a borrower and claim their incentives . Additiona ...
Palmswap攻击事件的分析
Created2024-11-23
攻击介绍Palmswap由于其蹩脚的业务逻辑,导致了价格被黑客操控,导致被黑客盗取了大约$900K 攻击分析我们通过phalcon来分析。 通过调用栈发现,攻击者先贷了3,000,000的USDT,然后质押1,000,000的USDT来获得大约996,324的PLP,然后用剩下的2,000,000的USDT,去购买了USDP,然后攻击者销毁了持有的所有的PLP,但得到了大约1,947,570的USTD。最后卖出USDP,大约得到1,947,570的USDT。 显然,攻击者在通过购买USDP操纵了PLP的价格。 function getPrice(bool _maximise) external view returns (uint256) { uint256 aum = getAum(_maximise); uint256 supply = IERC20Upgradeable(plp).totalSupply(); return (aum * PLP_PRECISION) / supply; } funct ...
CTF-Factorial
Created2024-11-21
题目源代码: // SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.13;contract Factorial { bool public solved = false; function run(uint256 number) internal view returns (uint256) { uint256 res = 1; for (uint256 index = 0; index < number; index++) { (, bytes memory data) = msg.sender.staticcall(abi.encodeWithSignature("factorial(uint256)", number)); res = res * abi.decode(data, (uint256)); } return res; &# ...
CTF-BabyOtter
Created2024-11-21
CTF-BabyOtter题目源代码: // SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.13;contract BabyOtter { bool public solved = false; function solve(uint x) public { unchecked { assert(x * 0x1337 == 1); } solved = true; }} 这个题,有个unchecked 它是一个不对溢出进行的一个检查unchecked 是一个特殊的关键字,表示在代码块中进行运算时不进行溢出检查。这意味着即使在某些情况下会发生溢出,也不会触发 Solidity 默认的溢出检查错误。 那么就很容易想到溢出来解决这个题了攻击代码: // SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.13;interfa ...
CTF-AdultOtter
Created2024-11-21
CTF-AdultOtter题目源代码: // SPDX-License-Identifier: UNLICENSEDpragma solidity ^0.8.13;contract AdultOtter { bool public solved = false; function pwn(uint[16] memory code) public { uint[16] memory a; uint[16] memory b; for (uint i = 0; i < 16; i++) { assert(1337 * i < code[i] && code[i] < 1337 * (i + 1)); } for (uint i = 0; i < 16; i++) { a[i] = i**i * code[i]; } for (uint i = 1; i < 16; i++) ...
sherlock-2024-11-VVV审计报告
Created2024-11-17
一SummaryIf the admin records the investment using the investment token instead of the stablecoin, it will lead to an error. Root CauseVulnerable code: 2024-11-vvv-exchange-update-HeYuan-33/vvv-platform-smart-contracts/contracts/vc/VVVVCInvestmentLedger.sol Lines 268 to 277 in c1e47db for (uint256 i = 0; i < _kycAddresses.length; i++) { address kycAddress = _kycAddresses[i]; uint256 investmentRound = _investmentRounds[i]; uint256 amountToInvest = _amountsTo ...
Untitled
Created2024-11-17
攻击介绍2023年7月11日,Arbitrum链上的Rodeo Finance: Pool由于价格预言机操纵,而被黑客盗取了472 ETH。 攻击分析攻击者利用了预言机的缺陷控制了unshETH与ETH之间的兑换比率,预言机使用 ETH 与 unshETH 的准备金比率来检查价格。同时攻击者能够通过具有未配置策略地址的 earn 函数强制平台将 USDC 兑换为 unshETH。由于价格预言机存在缺陷,滑点控制无法生效。(具体可见Meth为0x7b37c42b的交易)。 function earn(address usr, address pol, uint256 str, uint256 amt, uint256 bor, bytes calldata dat) external loop returns (uint256){ if (status < S_LIVE) revert WrongStatus(); if (!pools[pol]) revert InvalidPool(); if (strategies[str] == addres ...
1…345…11
avatar
何方圜
夫孰异道而相安
Articles
110
Tags
11
Categories
0
Follow Me
Announcement
CTF的更新
Recent Post
MOVE漏洞总结2025-08-29
move 学习2025-07-28
Notional Exponent 审计2025-07-28
GMX协议遭受重入攻击损失4200万美美金2025-07-11
关于OPE2025-06-19
Tags
test 基础知识 审计报告 CTF 题解 链接 Solana 课程学习 协议 攻击事件分析 基本知识
Archives
  • 八月 20251
  • 七月 20253
  • 六月 20257
  • 五月 20252
  • 四月 20252
  • 三月 20252
  • 十二月 202411
  • 十一月 202421
Info
Article :
110
UV :
PV :
Last Update :
©2020 - 2025 By 何方圜
Framework Hexo|Theme Butterfly