Decompiling Boolean Expressions from Java']Java™ Bytecode

被引:0
|
作者
Nanda, Mangala Gowri [1 ]
Arun-Kumar, S. [2 ]
机构
[1] IBM Res, Bangalore, Karnataka, India
[2] Indian Inst Technol, Delhi, India
关键词
decompilation; !text type='Java']Java[!/text] bytecode; boolean expressions;
D O I
10.1145/2856636.2856651
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Java bytecode obfuscates the original structure of a Java expression in the source code. So a simple expression such as (c1 I I c2) or (cl && c2) may be captured in the bytecode in 4 different ways (as shown in the paper). And correspondingly, when we reconvert the bytecode back into Java source code, there are four different ways this may happen. Further, although gotos are not permitted in the Java source code, the bytecode is full of gotos. If you were to blindly convert the bytecode into Java source code, then you would replace a goto by a labeled break. A labeled break has the advantage that it only allows you to break out of a block structure and (unlike a setjump) does not permit you to jump arbitrarily into a block structure. So while the data structures used in the regenerated Java source code are still relatively "clean" arbitrary usage of labeled breaks makes for unreadable code (as we show in the paper). And this can be a point of concern, since decompilation is generally related to debugging code. Instead of dumping arbitrary labeled breaks, we try to reconstruct the original expression, in terms of && and I I clauses as well as ternary operators "?:" (c0 ? cl : c2); Thus our goal is quite simply to regenerate, without using goto or labeled breaks, the expressions as close to the original as possible (it is not possible to guarantee an exact match). In this paper we explain what is the state of the art in Java decompilers for decoding complex expressions. Then we will present our solution. We have implemented the algorithms described here in this paper and give you our experience with it.
引用
收藏
页码:59 / 69
页数:11
相关论文
共 50 条
  • [1] Decompiling Java']Java bytecode: Problems, traps and pitfalls
    Miecznikowski, J
    Hendren, L
    [J]. COMPILER CONSTRUCTION, PROCEEDINGS, 2002, 2304 : 111 - 127
  • [2] Decompiling Java']Java using staged encapsulation
    Miecznikowski, J
    Hendren, L
    [J]. EIGHTH WORKING CONFERENCE ON REVERSE ENGINEERING, PROCEEDINGS, 2001, : 368 - 374
  • [3] Java']Java bytecode verification
    Nipkow, T
    [J]. JOURNAL OF AUTOMATED REASONING, 2003, 30 (3-4) : 233 - 233
  • [4] Java']Java bytecode optimizations
    Lambright, HD
    [J]. IEEE COMPCON 97, PROCEEDINGS, 1997, : 206 - 210
  • [5] A Java']Java Bytecode Formalisation
    Czarnik, Patryk
    Chrzaszcz, Jacek
    Schubert, Aleksy
    [J]. VERIFIED SOFTWARE: THEORIES, TOOLS, AND EXPERIMENTS, (VSTTE 2018), 2018, 11294 : 135 - 154
  • [6] Revealing Implicit Correspondence between Bytecode Instructions and Expressions Determined by Java']Java Compilers
    Kume, Izuru
    Nakamura, Masahide
    Nitta, Naoya
    [J]. 2018 25TH AUSTRALASIAN SOFTWARE ENGINEERING CONFERENCE (ASWEC), 2018, : 126 - 130
  • [7] On object initialization in the Java']Java bytecode
    Doyon, S
    Debbabi, M
    [J]. COMPUTER COMMUNICATIONS, 2000, 23 (17) : 1594 - 1605
  • [8] Termination analysis of Java']Java Bytecode
    Albert, Elvira
    Arenas, Puri
    Codish, Michael
    Genaim, Samir
    Puebla, German
    Zanardini, Damiano
    [J]. FORMAL METHODS FOR OPEN OBJECT-BASED DISTRIBUTED SYSTEMS, PROCEEDINGS, 2008, 5051 : 2 - +
  • [9] Modeling the Java']Java Bytecode Verifier
    Reynolds, Mark C.
    [J]. SCIENCE OF COMPUTER PROGRAMMING, 2013, 78 (03) : 327 - 342
  • [10] Dynamic semantics of Java']Java bytecode
    Bertelsen, P
    [J]. FUTURE GENERATION COMPUTER SYSTEMS, 2000, 16 (07) : 841 - 850