Skip to content
KitploitKITPLOIT
ToolsBlog
Log in
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
SoliditySecurity — Solidity Security | Kitploit
Tools/GitHubGitHub/al1ex/soliditysecurity
Vulnerability AnalysisCode AnalysisLearning & EducationCurated Resources
GitHubal1ex/soliditysecurity

SoliditySecurity

Solidity Security

View Repository
35125 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

What's this

This post aims to be a relatively in-depth and up-to-date introductory post detailing the past mistakes that have been made by Solidity developers in an effort to prevent future devs from repeating history.

Table of Contents

1. Re-Entrancy

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: The DAO

2. Arithmetic Over/Under Flows

  • The Vulnerability
  • Preventative Techniques
  • Real-World Examples: PoWHC and Batch Transfer Overflow (CVE-2018-10299)

3. Unexpected Ether

  • The Vulnerability
  • Preventative Techniques
  • Real-World Examples: Unknown

4. Delegatecall

  • The Vulnerability
  • Preventative Techniques
  • Real-World Examples: Parity Multisig Wallet (Second Hack)

5. Default Visibilities

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: Parity MultiSig Wallet (First Hack)

6. Entropy Illusion

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: PRNG Contracts

7. External Contract Referencing

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: Re-Entrancy Honey Pot

8. Short Address/Parameter Attack

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: Unknown

9. Unchecked CALL Return Values

  • The Vulnerability
  • Preventative Techniques
  • Real-World Examples: Etherpot and King of the Ether

10. Race Conditions / Front Running

  • The Vulnerability
  • Preventative Techniques
  • Real-World Examples: ERC20 and Bancor

11. Denial Of Service (DOS)

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: GovernMental

12. Block Timestamp Manipulation

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: GovernMental

13. Constructors with Care

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: Rubixi

14. Uninitialised Storage Pointers

  • The Vulnerability
  • Preventative Techniques
  • Real-World Examples: Honey Pots: OpenAddressLottery and CryptoRoulette

15. Floating Points and Numerical Precision

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: Ethstick

16. tx.origin Authentication

  • The Vulnerability
  • Preventative Techniques
  • Real-World Example: Unknown

Ethereum Quirks

  • Keyless Ether
  • One Time Addresses
  • Single Transaction Airdrops

List of Interesting Crypto Related Hacks/Bugs

References / Further Reading List

  • Ethereum Wiki - Safety
  • Solidity Docs - Security Considerations
  • Consensus - Ethereum Smart Contract Best Practices
  • History of Ethereum Security Vulnerabilities, Hacks and Their Fixes
  • Decentralized Application Security Project (DASP) Top 10 of 2018
  • A Survey of attacks on Ethereum Smart Contracts
  • Ethereum Smart Contract Security
  • Lessons Learnt from the Underhanded Solidity Contest

1. Re-Entrancy

One of the features of Ethereum smart contracts is the ability to call and utilise code of other external contracts. Contracts also typically handle ether, and as such often send ether to various external user addresses. The operation of calling external contracts, or sending ether to an address, requires the contract to submit an external call. These external calls can be hijacked by attackers whereby they force the contract to execute further code (i.e. through a fallback function) , including calls back into itself. Thus the code execution "re-enters" the contract. Attacks of this kind were used in the infamous DAO hack.

For further reading on re-entrancy attacks, see Reentrancy Attack On Smart Contracts and Consensus - Ethereum Smart Contract Best Practices.

The Vulnerability

This attack can occur when a contract sends ether to an unknown address. An attacker can carefully construct a contract at an external address which contains malicious code in the fallback function. Thus, when a contract sends ether to this address, it will invoke the malicious code. Typically the malicious code executes a function on the vulnerable contract, performing operations not expected by the developer. The name "re-entrancy" comes from the fact that the external malicious contract calls back a function on the vulnerable contract and "re-enters" code execution at an arbitrary location on the vulnerable contract.

To clarify this, consider the simple vulnerable contract, which acts as an Ethereum vault that allows depositors to only withdraw 1 ether per week.

EtherStore.sol:

contract EtherStore {

    uint256 public withdrawalLimit = 1 ether;
    mapping(address => uint256) public lastWithdrawTime;
    mapping(address => uint256) public balances;

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

    function withdrawFunds (uint256 _weiToWithdraw) public {
        require(balances[msg.sender] >= _weiToWithdraw);
        // limit the withdrawal
        require(_weiToWithdraw <= withdrawalLimit);
        // limit the time allowed to withdraw
        require(now >= lastWithdrawTime[msg.sender] + 1 weeks);
        require(msg.sender.call.value(_weiToWithdraw)());
        balances[msg.sender] -= _weiToWithdraw;
        lastWithdrawTime[msg.sender] = now;
    }
 }

This contract has two public functions. depositFunds() and withdrawFunds(). The depositFunds() function simply increments the senders balances. The withdrawFunds() function allows the sender to specify the amount of wei to withdraw. It will only succeed if the requested amount to withdraw is less than 1 ether and a withdrawal hasn't occurred in the last week. Or does it?...

The vulnerability comes on line [17] where we send the user their requested amount of ether. Consider a malicious attacker creating the following contract,

Download Tool