X hits on this document

400 views

0 shares

0 downloads

0 comments

75 / 120

Table 8.4. Listing of DateTime.java

Listing of DateTime.java (abbreviated):

01: 02: 03: 04: 05: 06: 07: 08: 09:

public static void main(String arguments[]) {

new DisplayDateTime().doDisplayDateTime(); }

public void doDisplayDateTime() {

Date date = new Date(); System.out.println(String.format(DATE TIME MASK,

_

_

date.toString())); 10: }

flow and “String Encryption” selected, some interesting results were observed in the

corresponding Jad decompilation. Table 8.5 lists the Jad decompilation of Zelix's attempt

at obfuscating DateTime.class. Zelix performed the same kind of name obfuscation seen

with ProGuard, except it went a little too far and renamed the main method; this was

corrected by manually adding an exception for methods named “main” in the tool. The

results of the decompilation show that Zelix's control flow obfuscation and use of opaque

predicates is somewhat effective for this particular example because even though Jad was

able to decompile most of the logic in DateTime.class; Zelix's obfuscation caused Jad to

lose the value of the constant DATE_TIME_MASK when using it on line 12, and

generate a large block of static, invalid code starting at line 22. In the next two sections

(8.3 and 8.4), a Java anti-reversing exercise with a complete animated solution is

provided. In the solution, decompilation of Java bytecode is prevented through the use of

a class encryption obfuscation implemented by SandMark. Issues regarding the use of

this obfuscation technique are discussed in the animated solution.

67

Document info
Document views400
Page views401
Page last viewedSun Dec 11 06:57:43 UTC 2016
Pages120
Paragraphs2913
Words25794

Comments