0

To evaluate different C Obfuscators I'm searching for a way to calculate established Code Metrics (for example the McCabes Cyclomatic Complexity) on a compiled C Program. Thus there is no source code available.

  • Is ist possible to calculate such metrics on a compiled C Program or will the compiler delete the informations you need?

  • Is there in the best case a tool one can use to calculate such metrics on a compiled C Program?

  • Will Decompiling the machine code change the values of code metrics? Thus does it make sense to calculate the code metrics on a compiled C Code to evaluate the Program?

By the way: For those who are searching for tools to calculate metrics for C Source Code I can recommend the eclipse plugins "Eclipse Metrics" and "Metriculator" ;-)

la-ga
  • 160
  • 2
  • 13

1 Answers1

2
  1. no not possible. Most HLL information is lost, and reconstructed C (decompiled) might have different metrics.

  2. no, except by decompiling, see next.

  3. yes. Usually the C uses simpler constructs (e.g. wrt loops) then the original and count of codelines are inflated. The metrics thus will be different. Best read some C decompiling faqs.

I can't really make a sane business case for this, so I doubt that there are specialized vendors that even try.

Marco van de Voort
  • 25,628
  • 5
  • 56
  • 89