[Soot-list] Dava classcastexception

mbatch at cs.mcgill.ca mbatch at cs.mcgill.ca
Thu May 8 11:05:46 EDT 2008


Pawel,

Dava, and in fact pretty much any decompiler out there that you might
find, will likely have problems decompiling some obfuscated bytecode.
Often times this is due to reliance on certain known bytecode patterns
that javac produces. In the case of Dava, it was written specifically with
no presumptions in mind (i.e., the only up front assumption is that
bytecode you send it is "valid" and verifiable). For this reason, Dava is
usually more effective at producing valid (compilable) source code than
other decompilers you might find, but that doesn't make it perfect. There
are still oddities and edge cases that it will have trouble with. I
suspect this is the case here.

Specifically, it looks like the Smokescreen obfuscator (I presume that is
what you are referring to) implements some of the obfuscating
transformations in my Obfuscator (JBCO, part of Soot:
http://www.sable.mcgill.ca/JBCO/) which really muck with the high level
source code representation structure (by overlapping valid code blocks
with exceptional control flow, etc). These are known to cause problems for
Dava. You can read about these sorts of obfuscations in my short paper
"Obfuscating Java: the most pain for the least gain" here:

http://www.sable.mcgill.ca/publications/papers/

I hope this helps!

As Eric said, without a look at your obfuscated code, it is hard to say
what is going on.

Michael Batchelder

> 2008/5/7 Pawel Paskudzki <pawel_pakuti at op.pl>:
>> Hi Guys!
>>
>>
>> i'am decompiling simple class after very simple smokescreen obfuscation
>>  however when running Dava confusing error is thrown here is a trace
>>
>>
>> Caused by: java.lang.ClassCastException:
>> soot.dava.internal.SET.SETIfElseNode cannot be cast to
>> soot.dava.internal.SET.SETStatementSequenceNode
>>
>> at
>> soot.dava.toolkits.base.finders.AbruptEdgeFinder.find_Breaks(AbruptEdge
>> Finder.java:72)
>>
>>
>> at soot.dava.internal.SET.SETNode.find_AbruptEdges(SETNode.java:271)
>>
>> at
>> soot.dava.toolkits.base.finders.AbruptEdgeFinder.find(AbruptEdgeFinder.
>> java:40)
>>
>>
>> at soot.dava.DavaBody.<init>(DavaBody.java:175)
>>
>> at soot.dava.Dava.newBody(Dava.java:81)
>>
>> at soot.PackManager.runBodyPacks(PackManager.java:600)
>>
>> at soot.PackManager.runBodyPacks(PackManager.java:378)
>>
>> at soot.PackManager.runBodyPacks(PackManager.java:322)
>>
>> at soot.PackManager.runPacks(PackManager.java:317)
>>
>> at soot.Main.run(Main.java:179)
>>
>> at soot.Main.main(Main.java:153)
>>
>> My question is why ? ;-) i'd be very grateful for help
>>
>>
>> Pawel
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>>
>>
>
>
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>




More information about the Soot-list mailing list