aspose file tools*
The moose likes Java in General and the fly likes De-obfuscation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "De-obfuscation" Watch "De-obfuscation" New topic
Author

De-obfuscation

zaeem masood ashar
Ranch Hand

Joined: Mar 17, 2001
Posts: 54
Hi All,
How do I de-obfuscate a code? Any free tools available?
Rgds
Zaeem

SCJP2
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
I've done a bit of de-obfuscating by hand, usually just to locate a specific feature though (not reobtaining whole source code). You could probably use any modern IDE/refactoring tool that will update renamed methods, classes, and fields for you. Make sure you stick in comments whenever you figure out what something does. If there's flow obfuscation, may the force be with you.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

There are free tools out there. I can tell you such a thing called mocha exists, but there's enough legal trouble surrounding its distribution that you should search for it yourself. In short, Symantec has been trying for years to apply legal pressure on mocha's author. You can get it, though, if you look.
For something less controversial, try JODE.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
Another good one is called JAD. It does fairly well and easy to use.

------------------
Jason R. Kretzer
Software Engineer
http://alia.iwarp.com


Jason R. Kretzer<br />Software Engineer<br />System Administrator<br /><a href="http://alia.iwarp.com" target="_blank" rel="nofollow">http://alia.iwarp.com</a>
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
Wait a second, are we talking about decompiling or de-obfuscating?
zaeem masood ashar
Ranch Hand

Joined: Mar 17, 2001
Posts: 54
we are talking about de-obfuscating an already obfuscated code!!
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
That's what I thought. Anyway, de-obfuscation is hard work (that's why people obfuscate things!). There isn't a simple way or tool. You just have to carefully examine what code does and what String constants are nearby to come up with good comments and method/field/class names. A lot of information is lost in the obfuscation process and you shouldn't hope to discover it all. Always keep the reason you're trying to de-obfuscate in mind so you can try to ignore that parts of the program that don't matter.
Jason Kretzer
Ranch Hand

Joined: May 31, 2001
Posts: 280
DOH! My fault. Sorry about that. JAD is a decompiler.
Sincerest apologies.

------------------
Jason R. Kretzer
Software Engineer
http://alia.iwarp.com
 
Don't get me started about those stupid light bulbs.
 
subject: De-obfuscation