People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!
delegateCall to the implementation code. The delegateCall is used in order for the proxy to have the storage of the contract be decoupled from the code. The original proxy did not have the ability to upgrade though.constructor will only run on deployment. So, if we set a new implementation, we need a way to initialize or update the state of new variables.selfdestruct then redeploys the contract to the same address. Honestly, this pattern makes the most sense to me for user engagement. $tmpname with the actual value in a catch clause.handleException() processing as a result of this. Now, an attacker can use any method to raise a host exception. Then, using the context of the host, access objects higher in the hierarchy to get code execution outside the sandbox. /*{ url: 'https://example.com' }*/ is used within the parameters. In order to prevent code injection, they call quote to escape single and double quotes. https://example.com?q=*/.../* would escape the comment to add arbitrary content to the JavaScript. In particular, this appears to be a NodeJs environment.
Injection point:
page.waitForNavigation(/*{ url: '
https://example.com'}*/),
Payload:
https://example.com?q=*/require(child_process)
.exec(touch$IFS/tmp/haxx)/*
Executed code:
page.waitForNavigation(/*{ url: '
https://example.com?q=*/require(`child_process`)
.exec(`touch$IFS/tmp/dee-see`)/*' }*/),
loanCollateral was being subtracted when it was zero and the loanAmount could still be subtracted from.require was ran on a non-truncated value and the actual usage was done on the truncated value. CREATE and CREATE2. CREATE uses the addresses incrementing nonce in order to determine the address. CREATE2 takes in a user controlled value in order to determine where to place the contract. Quest when called. This contract used the CREATE in order to send this transaction.CREATE2 opcode instead. Overall, a weird finding that I'm sure could be reported more.