Machine Learning Used For JavaScript Code De-obfuscation 31
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."
Re: (Score:3)
Re: (Score:3)
I hear there's a bug in the string length() method that miscounts by 1.
Re: (Score:2)
So, what are you good at, JSNice? (Score:2)
Hahahaha! (Score:4, Funny)
The development of tools like these started out of necessity for figuring out old COBOL code.
Re: (Score:3)
Re: (Score:2, Funny)
That would be
"DIVIDE REC-WORKER-TOTAL-ANNUAL-SALARY BY WS-HOURS-IN-FISCAL-YEAR
GIVING WS-HOURLY-RATE REMAINDER WS-ANNUAL-BONUS."
or something similar.
Finally consistent naming (Score:5, Funny)
Now we just run every JavaScript program through an obfuscator then JSNice and we have consistent naming.
Re: (Score:1)
Now we just run every JavaScript program through an obfuscator then JSNice and we have consistent naming.
You laugh, but I have tried it.
The naming isn't as good as you would like, but for some projects, it may be an improvement. o.O
Fail (Score:1)
I tried it on a minified jquery 1.7.2 and got:
Error compiling input:
Line 3: Parse error. missing ) after condition
Line 3: Parse error. unterminated string literal
Line 4: Parse error. missing ; before statement
Line 4: Parse error. syntax error
Line 4: Parse error. missing ) in parenthetical
Line 4: Parse error. missing } after property list
Line 4: Parse error. illegal character
Line 4: Parse error. syntax error
Line 4: Parse error. illegal character
Line 4: Parse error. illegal character
Re:Fail (Score:5, Informative)
Re: (Score:2)
Now that you're here...
I tried it on this hunk of JavaScript: http://pastebin.com/miGDVkdf [pastebin.com] , but all I got was a parse error:
"// Error contacting the server... :"
parsererror
SyntaxError: Unexpected token
Re: (Score:2)
As a exploit kit researcher.... (Score:4, Interesting)
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.