0

How can I instrument the EVM bytecode for runtime monitoring? Is there any technique or implementation for that?

5
  • we aren't using these words like "instrumentation" here, please translate what you mean by that
    – Nulik
    Feb 10 at 16:08
  • also define: monitoring
    – Nulik
    Feb 10 at 16:09
  • I want to do concolic testing for EVM bytecode. According to what I understand about a concolic testing, we have to instrument the code before analyzing it. So, I use the word instrumentation. And for monitoring I meant concolic testing based on the instrumented code and monitor for existing vulnerabilities. I would be glad to correct me If I am wrong about this concept .@Nulik
    – MARiiii
    Feb 10 at 16:41
  • I have been working with assembly language for years, and this is the first time I hear about conocolic testing or instrumentation. I can say for sure that nobody does this. So you better write a specific request on what do you want to do.
    – Nulik
    Feb 10 at 16:56
  • tell your teacher that theory is different from practice
    – Nulik
    Feb 10 at 17:01
1

I think what you're looking for is something that will create an intermediate representation (IR) between Solidity and EVM bytecode, and which will act as a high-level assembly equivalent which you can instrument, rather than instrumenting the EVM bytecode itself. (There are a few common tools for doing this in the wider world, such as LLVM which is used in C instrumentation.)

I'm not sure what is commonly used in the Ethereum ecosystem, but there are several papers detailing techniques. See, for example: SIF: A Framework for Solidity Contract Instrumentation and Analysis

Edit:

Actually it looks like a tool called Zeus will now create LLVM bitcode from Solidity, so that might be a place to start.

1
  • That is really helpful and similar to the work done in C. But, what if I want to instrument the bytecode itself, something like binary or bytecode instrumentation in C? Is there any tool for that? @Richard Horrocks
    – MARiiii
    Feb 11 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.