mythril.interfaces.cli [ERROR]: Invalid detection module: reentrancy
joedakwa opened this issue · 8 comments
Trying to run this command on my smart contract:
myth analyze -m reentrancy contract.sol and i get the self-entitled error message.
I also, as a trial ran the module "ether_thief", but still got the same error message.
When i ran Myth Analyze contract.sol, it returned an integer underflow/overflow severity.
I then tried to insert the "integer" command instead for example
myth analyze -m integer.py (i also just used integer here) contract.sol
And the same error returned. Can someone advise me on what us happening here with the modules?
Thanks
Do i need to install these modules separately at all?
Hi @joedakwa . You can find a list of all detectors using
myth list-detectors
command
The detector name for integer module is the following:
myth analyze file.sol -m IntegerArithmetics
Just a heads up, it's not worth using IntegerArithmetics
module on files with recent solidity version, since all integer arithmetic edge cases are directly handled by solc.
Hi @joedakwa . You can find a list of all detectors using
myth list-detectors
command The detector name for integer module is the following:myth analyze file.sol -m IntegerArithmetics
Just a heads up, it's not worth usingIntegerArithmetics
module on files with recent solidity version, since all integer arithmetic edge cases are directly handled by solc.
This is really helpful. Quick question; i am running an audit on a smart contract however that uses 0.6.11, rather than the recent Solc version, which takes care of integer overflow/underflow issues. I guess it would be worth running in this instance?
Yes, mythril autodetects the pragma of a solidity file. Although in some cases it might fail and raise an Exception, in such cases you can use --solv v0.6.11
arg to set the solc version to 0.6.11
.
When solc version >=0.8.0 is used, integer module is not used. (although that doesn't currently happen when the version is autodetected).
Yes, mythril autodetects the pragma of a solidity file. Although in some cases it might fail and raise an Exception, in such cases you can use
--solv v0.6.11
arg to set the solc version to0.6.11
. When solc version >=0.8.0 is used, integer module is not used. (although that doesn't currently happen when the version is autodetected).
I was going to say, because when i ran Myth on the contract, a high severity issue popped up surrounding integer overflow, but the contract uses safeMath. I presume this is taken care of with 0.8.0 version, but seems to be flagged with the 0.6.11 version the contract is using? Is this something worth investigating?
. I presume this is taken care of with 0.8.0 version, but seems to be flagged with the 0.6.11 version the contract is using?
You can look where this issue pops up. Sometimes, the compiler intentionally uses overflows and underflows for optimisation.
Right ok gotcha
Thanks for your input