Machine Learning Used For JavaScript Code De-obfuscation
New submitter velco writes: "ETH Zurich Software Reliability Lab announced JSNice, a statistical de-obfuscation and de-minification tool for JavaScript. The interesting thing about JSNice is that it combines program analysis with machine learning techniques to build a database of name and type regularities from large amounts of available open source code on GitHub. Then, given new JavaScript code, JSNice tries to infer the most likely names and types for that code by basing its decision on the learned regularities in the training phase."
this and that
The development of tools like these started out of necessity for figuring out old COBOL code.
Now we just run every JavaScript program through an obfuscator then JSNice and we have consistent naming.
Hi, Thanks for trying the tool out. I tried http://code.jquery.com/jquery-... (from here: http://blog.jquery.com/2012/03...) and it worked fine. best, Martin
I don't think he would. Code distributed under terms that prohibit modification is still distributed under terms that prohibit modification, whether or not it's possible to convert it into a form suitable for making modifications.
This tool looks very intriguing, so I gave it some malicious code for a spin (all codes are from malicious drive-by sites in the last 24 hours.)
Sort of useful, I guess. But ultimately not an essential feature for malicious javascript analysis. I think the tool would be more useful to legitmate JS reverse-engineering tasks as their obfuscated JS are much much bigger.
Now that you're here...
I tried it on this hunk of JavaScript: http://pastebin.com/miGDVkdf , but all I got was a parse error:
"// Error contacting the server... :"
parsererror
SyntaxError: Unexpected token
A proud member of the Onion-in-Hand alliance
Yes, the hard part is getting meaningful names back - which is exactly what the article is about; they claim to have found a way to do it. Granted, I doubt how good it could possibly be - but on the other hand, it is an interesting project that may come to use.
I hear there's a bug in the string length() method that miscounts by 1.
systemd is Roko's Basilisk.