Connection | |
---|---|
Attacker address | |
Attacker pkey |
Generate random transactions | Number of transactions: |
---|---|
Regular transaction |
From (pkey): To: Value (Wei): |
Remix IDE |
https://remix.ethereum.org To deploy the contract on your Hardhat network: "Deploy and run transactions" (fourth item from the top left) > "Environment" > "Hardhat provider". |
Deploy smart contract |
JSON interface (ABI): Bytecode: Constructor arguments (comma separated - leave blank if void): Output: |
Pseudorandom number generation on the blockchain is generally unsafe. There are a number of reasons for this, including:
Contract address | |
---|---|
Contract methods | |
Call contract (no state alter) |
Method name (w/o parentheses): Args (comma-separated): |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
(ATTACKER!) Contract address | |
---|---|
(ATTACKER!) Contract methods | |
(ATTACKER!) Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
(ATTACKER!) Contract output |
In certain circunstances, contracts can be forced to receive ether without triggering any code. This should be considered by the contract developers in order to avoid breaking important invariants in their code.
Contract address | |
---|---|
Contract methods | |
Call contract (no state alter) |
Method name (w/o parentheses): Args (comma-separated): |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
(ATTACKER!) Contract address | |
---|---|
(ATTACKER!) Contract methods | |
(ATTACKER!) Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
(ATTACKER!) Contract output |
A contract interface defines functions with a different type signature than the implementation, causing two different method id's to be created. As a result, when the interfact is called, the fallback method will be executed.
Contract address | |
---|---|
Contract methods | |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
It is possible to cause add and sub to overflow (or underflow) on any type of integer in Solidity.
Contract address | |
---|---|
Contract methods | |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
A state variable is changed after a contract uses call.value. The attacker uses a fallback function—which is automatically executed after Ether is transferred from the targeted contract—to execute the vulnerable function again, before the state variable is changed.
Contract address | |
---|---|
Contract methods | |
Call contract (no state alter) |
Method name (w/o parentheses): Args (comma-separated): |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
(ATTACKER!) Contract address | |
---|---|
(ATTACKER!) Contract methods | |
(ATTACKER!) Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
(ATTACKER!) Contract output |
Certain Solidity operations known as "external calls", require the developer to manually ensure that the operation succeeded. This is in contrast to operations which throw an exception on failure. If an external call fails, but is not checked, the contract will continue execution as if the call succeeded. This will likely result in buggy and potentially exploitable behavior from the contract.
Contract address | |
---|---|
Contract methods | |
Call contract (no state alter) |
Method name (w/o parentheses): Args (comma-separated): |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
(ATTACKER!) Contract address | |
---|---|
(ATTACKER!) Contract methods | |
(ATTACKER!) Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
(ATTACKER!) Contract output |
Missing (or incorrectly used) modifier on a function allows an attacker to use sensitive functionality in the contract.
Contract address | |
---|---|
Contract methods | |
Call contract (no state alter) |
Method name (w/o parentheses): Args (comma-separated): |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
Variable shadowing occurs when a variable declared within a certain scope (decision block, method, or inner class) has the same name as a variable declared in an outer scope.
Contract address | |
---|---|
Contract methods | |
Call contract (no state alter) |
Method name (w/o parentheses): Args (comma-separated): |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |
A function intended to be a constructor is named incorrectly, which causes it to end up in the runtime bytecode instead of being a constructor.
Contract address | |
---|---|
Contract methods | |
Call contract (no state alter) |
Method name (w/o parentheses): Args (comma-separated): |
Send to contract (alters state) |
Method name (w/o parentheses): Args (comma-separated): Value (Wei): |
Contract output |