개인적으로 시간을 좀 많이 소비한 문제이다.// SPDX-License-Identifier: MITpragma solidity ^0.8.0;contract GatekeeperOne { address public entrant; modifier gateOne() { require(msg.sender != tx.origin); _; } modifier gateTwo() { require(gasleft() % 8191 == 0); _; } modifier gateThree(bytes8 _gateKey) { require(uint32(uint64(_gateKey)) == uint16(uint64(_gateKey)), ..
분류 전체보기
// SPDX-License-Identifier: MITpragma solidity ^0.8.0;contract Privacy { bool public locked = true; uint256 public ID = block.timestamp; uint8 private flattening = 10; uint8 private denomination = 255; uint16 private awkwardness = uint16(block.timestamp); bytes32[3] private data; constructor(bytes32[3] memory _data) { data = _data; } function unlock(bytes16 _key..
// SPDX-License-Identifier: MITpragma solidity ^0.8.0;interface Building { function isLastFloor(uint256) external returns (bool);}contract Elevator { bool public top; uint256 public floor; function goTo(uint256 _floor) public { Building building = Building(msg.sender); if (!building.isLastFloor(_floor)) { floor = _floor; top = building.isLastFloor(..

아 Foundry 코드짜는거가 익숙치가 않아서 너무 시간을 많이 잡아 먹었다.// SPDX-License-Identifier: MITpragma solidity ^0.6.12;import "openzeppelin-contracts-06/math/SafeMath.sol";contract Reentrance { using SafeMath for uint256; mapping(address => uint256) public balances; function donate(address _to) public payable { balances[_to] = balances[_to].add(msg.value); } function balanceOf(address _who) pub..

이번에 Hspace Discord 방에서 숭실대 CTF를 한다길래 참가했다.하필 설날이라 풀참가는 못하고 친척집 올라가는 버스에서 잠깐 풀었다.웹은 총 4문제 나왔는데 문제 퀄리티가 꽤 좋다 생각해서 Writeup까지 작성한다.Web3문제도 하나 풀었었는데 얘는 너무 쉬운거라 제외시키겠다.1. HellOphp";}?>SESSION값에 flag를 담고 hash_file로 원하는 파일의 해쉬값을 알 수 있다.처음 봤을 때, haval224,5 해쉬값에 취약점이 있는지 확인했는데 딱히 그런 거 같지도 않고 막막했다.근데 구글링을 하다가 아래 문서를 발견할 수 있었다.https://github.com/synacktiv/php_filter_chains_oracle_exploit?tab=readme-ov-file ..