All Projects → fergarrui → Ethereum Security

fergarrui / Ethereum Security

Licence: gpl-3.0
Security issues in Ethereum demonstrated in mocha tests. The fix is also demonstrated

Programming Languages

javascript
184084 projects - #8 most used programming language
solidity
1140 projects

Projects that are alternatives of or similar to Ethereum Security

Ion
General interoperability framework for trustless cross-system interaction
Stars: ✭ 122 (-1.61%)
Mutual labels:  ethereum, smart-contracts
Remix Ide
Documentation for Remix IDE
Stars: ✭ 1,768 (+1325.81%)
Mutual labels:  ethereum, smart-contracts
Rico
The Responsible Initial Coin Offering Framework
Stars: ✭ 83 (-33.06%)
Mutual labels:  ethereum, smart-contracts
District0x Network Token
Smart Contracts and web app for district0x contribution
Stars: ✭ 119 (-4.03%)
Mutual labels:  ethereum, smart-contracts
Eden Smart Contracts
EDEN - EDN Smart Token & Smart Contracts
Stars: ✭ 109 (-12.1%)
Mutual labels:  ethereum, smart-contracts
Ethnode
Run an Ethereum node (Geth or Openethereum) for development
Stars: ✭ 74 (-40.32%)
Mutual labels:  ethereum, smart-contracts
Smart Contract Sanctuary
🐦🌴🌴🌴🦕 A home for ethereum smart contracts. 🏠
Stars: ✭ 99 (-20.16%)
Mutual labels:  ethereum, smart-contracts
Web3studio Bootleg
The Shared Royalty Non-Fungible Token (a.k.a Bootleg) is an open source project started by the ConsenSys Web3Studio team. The purpose of the Shared Royalty Non-Fungible Token (SRNFT) is to make any royalty business model, from the oil and gas industry to entertainment, easy to manage with the Ethereum blockchain .
Stars: ✭ 65 (-47.58%)
Mutual labels:  ethereum, smart-contracts
Ergo
The Language for Smart Legal Contracts
Stars: ✭ 108 (-12.9%)
Mutual labels:  ethereum, smart-contracts
Truffle
A tool for developing smart contracts. Crafted with the finest cacaos.
Stars: ✭ 11,909 (+9504.03%)
Mutual labels:  ethereum, smart-contracts
Smart Contracts
Ethereum smart contracts for security and utility tokens
Stars: ✭ 1,187 (+857.26%)
Mutual labels:  ethereum, smart-contracts
Ethereum Smart Contracts Security Checklist
Ethereum Smart Contracts Security CheckList From Knownsec 404 Team
Stars: ✭ 114 (-8.06%)
Mutual labels:  ethereum, smart-contracts
Robonomics contracts
Robonomics network infrastructure based on Ethereum Blockchain.
Stars: ✭ 72 (-41.94%)
Mutual labels:  ethereum, smart-contracts
Supply Chain
Supply chain management on blockchain using Angular 4 + Truffle + IPFS + Ethereum
Stars: ✭ 76 (-38.71%)
Mutual labels:  ethereum, smart-contracts
Ico Contracts
🎉 ICO Contracts of the ALIS.
Stars: ✭ 69 (-44.35%)
Mutual labels:  ethereum, smart-contracts
Indy Leaderboard
Example game leaderboard dApp utilizing EbakusDB on Ebakus blockchain
Stars: ✭ 103 (-16.94%)
Mutual labels:  ethereum, smart-contracts
Scribble
Scribble instrumentation tool
Stars: ✭ 60 (-51.61%)
Mutual labels:  ethereum, smart-contracts
Uniflash
A simple and decentralized protocol for flash loan. https://t.me/Uniflash
Stars: ✭ 64 (-48.39%)
Mutual labels:  ethereum, smart-contracts
Learn Solidity With Examples
A repo full of smart contracts written in Solidity
Stars: ✭ 106 (-14.52%)
Mutual labels:  ethereum, smart-contracts
Awesome Solidity
A curated list of awesome Solidity resources
Stars: ✭ 111 (-10.48%)
Mutual labels:  ethereum, smart-contracts

ethereum-security

❗️ ⚠️ DO NOT USE THE CONTRACTS IN THIS REPOSITORY. THEY ARE VULNERABLE TO SECURITY BUGS. ⚠️ ❗️

Repository with some Ethereum security bugs. The bugs and fixes are demonstrated using Mocha tests.

Bugs added so far:

  • Overflow
  • Underflow
  • Reentrancy (DAO hack)
  • Delegatecall (Parity hack style)
  • DOS (e.g. stay as an Auction leader forever)
  • DOS (unbounded array loop)
  • Force ether (relying on the invariant this.balance == 0)
  • Tx.origin
  • Unchecked send() output
  • Storage override (commonly used in honeypots - or genuine bugs)
  • Array storage override (length underflow - storage override)
  • extcodesize bypassed when used to check if the caller is a contract

Run:

truffle test

To debug or run the test suite in more detail:

  1. Modify truffle.js with:
module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*", // Match any network id
      gas : 4000000
    }
  }
};

This will run the tests in a local test blockchain. Then testrpc & truffle console or just truffle develop can be run to have an interactive console and be able to see the RPC methods that have been called in the process, and therefore, the transaction hashes (if there was a transaction).

Once you know the transaction hash you want to inspect in more detail, it can be debugged running truffle debug <tx_hash>. See the transaction with web3.eth.getTransaction("<tx_hash>") or the transaction receipt: web3.eth.getTransactionReceipt("<tx_hash>")

Also, an individual test can be run using: truffle test test/<test_folder>/<test_name>.js

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].