• Title/Summary/Keyword: Bytecodes

Search Result 20, Processing Time 0.038 seconds

Static Dalvik Bytecode Optimization for Android Applications

  • Kim, Jeehong;Kim, Inhyeok;Min, Changwoo;Jun, Hyung Kook;Lee, Soo Hyung;Kim, Won-Tae;Eom, Young Ik
    • ETRI Journal
    • /
    • v.37 no.5
    • /
    • pp.1001-1011
    • /
    • 2015
  • Since just-in-time (JIT) has considerable overhead to detect hot spots and compile them at runtime, using sophisticated optimization techniques for embedded devices means that any resulting performance improvements will be limited. In this paper, we introduce a novel static Dalvik bytecode optimization framework, as a complementary compilation of the Dalvik virtual machine, to improve the performance of Android applications. Our system generates optimized Dalvik bytecodes by using Low Level Virtual Machine (LLVM). A major obstacle in using LLVM for optimizing Dalvik bytecodes is determining how to handle the high-level language features of the Dalvik bytecode in LLVM IR and how to optimize LLVM IR conforming to the language information of the Dalvik bytecode. To this end, we annotate the high-level language features of Dalvik bytecode to LLVM IR and successfully optimize Dalvik bytecodes through instruction selection processes. Our experimental results show that our system with JIT improves the performance of Android applications by up to 6.08 times, and surpasses JIT by up to 4.34 times.

DEX2C: Translation of Dalvik Bytecodes into C Code and its Interface in a Dalvik VM

  • Kim, Minseong;Han, Youngsun;Cho, Myeongjin;Park, Chanhyun;Kim, Seon Wook
    • IEIE Transactions on Smart Processing and Computing
    • /
    • v.4 no.3
    • /
    • pp.169-172
    • /
    • 2015
  • Dalvik is a virtual machine (VM) that is designed to run Java-based Android applications. A trace-based just-in-time (JIT) compilation technique is currently employed to improve performance of the Dalvik VM. However, due to runtime compilation overhead, the trace-based JIT compiler provides only a few simple optimizations. Moreover, because each trace contains only a few instructions, the trace-based JIT compiler inherently exploits fewer optimization and parallelization opportunities than a method-based JIT compiler that compiles method-by-method. So we propose a new method-based JIT compiler, named DEX2C, in order to improve performance by finding more opportunities for both optimization and parallelization in Android applications. We employ C code as an intermediate product in order to find more optimization opportunities by using the GNU C Compiler (GCC), and we will detect parallelism by using the Intel C/C++ parallel compiler and the AESOP compiler in our future work. In this paper, we introduce our DEX2C compiler, which dynamically translates Dalvik bytecodes (DEX) into C code with method granularity. We also describe a new method-based JIT interface in the Dalvik VM for the DEX2C compiler. Our experiment results show that our compiler and its interface achieve significant performance improvement by up to 15.2 times and 3.7 times on average, in Element Benchmark, and up to 2.8 times for FFT in Smartbench.

A Study on Informediated code for Analyzing Bytecodes (바이트코드 분석을 위한 중간코드에 관한 연구)

  • Kim, Kyung-Soo;Yoo, Weon-Hee
    • Journal of the Korea Society of Computer and Information
    • /
    • v.11 no.1 s.39
    • /
    • pp.107-117
    • /
    • 2006
  • Java language creates class files through Java compiler. Class files include informations involved with achievement of program. We can do analysis and optimization for efficient codes by analyzing class files. This paper analyzes bytecodes using informations of Java class files. We translate stack-based Java bytecodes into 3-address codes. Then we translate into static single assignment form using the 3-address codes. Static single assignment form provides a compact representation of a variable's definition-use information. Static single assignment form is often used as an intermediate representation during code optimization. Static sing1e assignment form renames each occurrence of a variable such that each variable is defined only once.

  • PDF

An Effective Java Obfuscation Technique Using Assignment Statements Merging (대입문 병합을 이용한 효율적인 자바 난독화 기법)

  • Lee, Kyong-Ho;Park, Hee-Wan
    • Journal of the Korea Society of Computer and Information
    • /
    • v.18 no.10
    • /
    • pp.129-139
    • /
    • 2013
  • Java bytecodes are executed not on target machine but on the Java virtual machines. Since this bytecodes use a higher level representation than binary code, it is possible to decompile most bytecodes back to Java source. Obfuscation is the technique of obscuring code and it makes program difficult to understand. However, most of the obfuscation techniques make the code size and the performance of obfuscated program bigger and slower than original program. In this paper, we proposed an effective Java obfuscation techniques using assignment statements merging that make the source program difficult to understand. The basic approach is to merge assignments statements to append side effects of statement. An additional benefit is that the size of the bytecode is reduced.

Program Slicing for Binary code Deobfuscation (역난독화를 위한 바이너리 프로그램 슬라이싱)

  • Mok, Seong-Kyun;Jeon, Hyeon-gu;Cho, Eun-Sun
    • Journal of the Korea Institute of Information Security & Cryptology
    • /
    • v.27 no.1
    • /
    • pp.59-66
    • /
    • 2017
  • Hackers have obfuscated their malware to avoid being analyzed. Recently, obfuscation tools translate original codes into bytecodes to use virtualized-obfuscation, so that bytecodes are executed by virtual machines. In such cases, malware analysts fail to know about the malware before execution of the codes. We found that program slicing is one of promising program analysis techniques to solve this problem. The main concepts of program slice include slicing criteria given by analysts and sliced statements according to the slicing criteria. This paper proposes a deobfuscation method based on program slicing technique.

Implementation of Java Bytecode Framework (자바 바이트코드 프레임워크 구현)

  • Kim, Ki-Tae;Kim, Je-Min;Yoo, Weon-Hee
    • The Journal of the Korea Contents Association
    • /
    • v.10 no.3
    • /
    • pp.122-131
    • /
    • 2010
  • In this paper, we design and implement CTOC, a new bytecode analysis and translation tool. We also propose E-Tree, a new intermediate code, to efficiently deal with intermediate codes translated from bytecodes. E-Tree is expressed in a tree form by combining relevant bytecode instructions in basic blocks of eCFG to overcome the weaknesses of bytecodes such as complexity and analytical difficulty. To demonstrate the usefulness and possible extensibility of CTOC, we show the creation process of eCFG and E-Tree through practical bytecode analysis and translation and shows the optimization process of a bytecode program as an example of possible extensibility.

Static Single Assignment Form for Java Bytecodes in CTOC (CTOC에서 자바 바이트코드를 위한 정적 단일 배정 형태)

  • Kim, Ki-Tae;Yoo, Weon-Hee
    • The KIPS Transactions:PartD
    • /
    • v.13D no.7 s.110
    • /
    • pp.939-946
    • /
    • 2006
  • Although the Java bytecode has numerous advantages, there are also shortcomings such as slow execution speed and difficulty in analysis. In order to overcome such disadvantages, bytecode analysis and optimization must be performed. We implements CTOC for optimized codes. An extended CFG must be first created in order to analyze and optimize a bytecode. Due to unique bytecode properties, the existing CFG must be expanded according to the bytecode. Furthermore, the CFG must be converted into SSA Form for a static analysis, for which calculation is required for various information such as the dominate relation, dominator tree, immediate dominator, $\phi$-function, rename, and dominance frontier. This paper describes the algorithm and the process for converting the existing CFG into the SSA From. The graph that incorporates the SSA Form is later used for type inference and optimization.

A Plagiarism Detection Technique for Java Program Using Bytecode Analysis (바이트코드 분석을 이용한 자바 프로그램 표절검사기법)

  • Ji, Jeong-Hoon;Woo, Gyun;Cho, Hwan-Gue
    • Journal of KIISE:Software and Applications
    • /
    • v.35 no.7
    • /
    • pp.442-451
    • /
    • 2008
  • Most plagiarism detection systems evaluate the similarity of source codes and detect plagiarized program pairs. If we use the source codes in plagiarism detection, the source code security can be a significant problem. Plagiarism detection based on target code can be used for protecting the security of source codes. In this paper, we propose a new plagiarism detection technique for Java programs using bytecodes without referring their source codes. The plagiarism detection procedure using bytecode consists of two major steps. First, we generate the token sequences from the Java class file by analyzing the code area of methods. Then, we evaluate the similarity between token sequences using the adaptive local alignment. According to the experimental results, we can find the distributions of similarities of the source codes and that of bytecodes are very similar. Also, the correlation between the similarities of source code pairs and those of bytecode pairs is high enough for typical test data. The plagiarism detection system using bytecode can be used as a preliminary verifying tool before detecting the plagiarism by source code comparison.

A Study on Control Flow Analysis Using Java Bytecodes in CTOC (CTOC에서 자바 바이트코드를 이용한 제어 흐름 분석에 관한 연구)

  • Yoo Weon-Hee;Kim Ki-Tae
    • The Journal of the Korea Contents Association
    • /
    • v.6 no.1
    • /
    • pp.160-169
    • /
    • 2006
  • This paper describes the data structure for program analysis and optimization of bytecode level. First we create an extended CFG(Control Flow Graph). Because of the special properties of bytecode, we must adaptively extend the existing control flow analysis techniques. We build basic blocks to create the CFG and create various data that can be used for optimization. The created CFG can be tested for comprehension and maintenance of Java bytecode, and can also be used for other analyses such as data flow analysis. This paper implements CTOC's CTOC-BR(CTOC-Bytecode tRanslator) for control flow analysis of bytecode level. CTOC(Classes To Optimized Classes) is a Java bytecode framework for optimization and analysis. This paper covers the first part of the CTOC framework. CTOC-BR is a tool that converts the bytecode into tree form for easy optimization and analysis of bytecode in CTOC.

  • PDF

An Efficient Bytecodes Verification Technology for Small Devices (소형 기기용 효율적인 바이트 코드 검증기술에 관한 연구)

  • Hwang, Cheul-Jun;Cho, Jeung-Bo;Jung, Min-Soo
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2003.11b
    • /
    • pp.1197-1200
    • /
    • 2003
  • USIM(Universal Subscriber Identity Module) 기술은 데이터의 관리와 보호를 하나의 소형 칩 내에 집약시킨 기술로 최근에 이 기술에 대한 관심도가 증가하고 있다. 자바카드 가상기계는 자바 언어로 작성된 프로그램이 USIM 칩 내부에서 실행 가능하도록 해준다. 하지만 자바카드 가상 기계는 자원 제약적인 디바이스의 특성으로 인하여 검증기술을 제공하지 않는다. 본 논문에서는 정적 체크 기반의 효율적인 바이트코드 검증기를 제안한다. 연구 결과 본 논문에서 제안하는 검증기는 일반적인 것에 비해 90% 이상의 사이즈가 감소되었다.

  • PDF