Hiding Malicious Code in Smartcontract Solidity
What is solidity? Solidity is an object-oriented, high-level language for implementing smart contracts. Smartcontracts are programs which govern the behaviour of accounts within the Ethereum state.
Why did we need to hide our malicious code? this is because anyone can see your smartcontract source code by using etherscan including your malicious code, Since everyone can see your code, so you have to hide your malicious code to prevent someone read your malicious code.
for this demonstration, I will make a simple smartcontract script below
Now our goal is to change
info.print() function to do evil stuff, then I create another smartcontract file
in this Post I will just log the
evil code string which will be executed by
Token smartcontract. now we can compile
our smartcontract and passing our
Mal smartcontract address to
now we can just click
infoVersion() function and these function will execute
log.print() function from