Skip to main content
QUICK REVIEW

[Paper Review] JConstHide: A Framework for Java Source Code Constant Hiding

Praveen Sivadasan, P. Sojan Lal|ArXiv.org|Apr 22, 2009
Advanced Malware Detection TechniquesComputer Science16 references3 citations
TL;DR

JConstHide is a novel framework that hides integer constants in Java source code to resist reverse engineering via decompilation. It transforms constants into obfuscated expressions at the source level, enabling two-tier obfuscation (source and bytecode) that significantly increases resistance to analysis, addressing a gap in existing tools that only obfuscate bytecode.

ABSTRACT

Software obfuscation or obscuring a software is an approach to defeat the practice of reverse engineering a software for using its functionality illegally in the development of another software. Java applications are more amenable to reverse engineering and re-engineering attacks through methods such as decompilation because Java class files store the program in a semi complied form called byte codes. The existing obfuscation systems obfuscate the Java class files. Obfuscated source code produce obfuscated byte codes and hence two level obfuscation (source code and byte code level) of the program makes it more resilient to reverse engineering attacks . But source code obfuscation is much more difficult due to richer set of programming constructs and the scope of the different variables used in the program and only very little progress has been made on this front. We in this paper are proposing a framework named JConstHide for hiding constants, especially integers in the java source codes, to defeat reverse engineering through decompilation. To the best of our knowledge, no data hiding software are available for java source code constant hiding.

Motivation & Objective

  • To address the lack of source code-level obfuscation tools for Java, particularly for hiding constants.
  • To reduce vulnerability to reverse engineering by making it harder to extract sensitive values like magic numbers from decompiled code.
  • To provide a practical framework that enables two-level obfuscation—source and bytecode—improving resilience against attacks.
  • To focus on integer constants, which are commonly exposed in decompiled Java code and often critical to functionality.
  • To introduce a method that preserves program semantics while obscuring constant values at the source level.

Proposed method

  • The framework identifies integer constants in Java source code that are candidates for obfuscation.
  • It replaces each selected constant with a complex, semantically equivalent expression using arithmetic and logical operations.
  • The obfuscated expressions are constructed to evaluate to the original constant value at runtime but obscure the original value in source form.
  • The transformation is applied during source code preprocessing before compilation, ensuring compatibility with standard Java compilers.
  • The framework supports configurable obfuscation strength and allows selective hiding of specific constants.
  • The resulting source code is compiled into obfuscated bytecode, achieving dual-layer protection.

Experimental results

Research questions

  • RQ1Can integer constants in Java source code be effectively hidden to prevent exposure during decompilation?
  • RQ2What techniques can be used to transform constants into obfuscated expressions without altering program behavior?
  • RQ3How does source-level obfuscation compare to bytecode-level obfuscation in terms of resistance to reverse engineering?
  • RQ4What is the impact of source code obfuscation on program maintainability and performance?
  • RQ5Is there a practical framework that enables two-level obfuscation (source and bytecode) for Java applications?

Key findings

  • JConstHide successfully transforms integer constants into obfuscated expressions that are semantically equivalent but hide the original values in source code.
  • The framework enables two-level obfuscation, combining source and bytecode protection, which increases resistance to reverse engineering.
  • The approach is transparent to the Java compiler, ensuring that obfuscated code compiles and runs correctly.
  • The method preserves program functionality while making it significantly harder to extract sensitive constants through decompilation.
  • To the authors' knowledge, this is the first framework specifically designed for source code-level constant hiding in Java.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.