The inherent issues in interpreted languages

No ratings

Presented at Security B-Sides London 2012 by

Interpretation is a modern, common method of source code compilation. It allows interpreted languages to utilise a "write once, run anywhere" philosophy. Instead of compiling source code into an executable, it is compiled into an intermediate language (IL). In Java this is known as Java Bytes, though a similar IL is used in other languages such as Python, PHP, or the .net languages. This IL will then be interpreted at runtime by the langague\'s runtime environment that will convert the IL code into architecture specific machine code that the processor wil understand. The issue here is that we have to trust the runtime environment. It handles the compilation of source code into IL code. And then interprets the IL code into machine code during runtime. The realisim is that we have no idea what the runtime environment is doing at any giving time. Due to the fact that we didn\'t write it, it\'s reasonable to say that we really have very little idea of what it\'s doing, except at the highest level. But what if the runtime envionment has been attacked; manipulated in subtle ways? Would you even notice? Even if the runtime environment has methods to check its own authenticity, can you really trust that those methods haven\'t been altered? By extension, can you really trust a runtime environment to generate an executable that is an exact derivative of your source code? This talk looks into manipluation of the runtime environment, and how subtle changes can be used to infect any byte code interpreted by the runtime environment.