JSNaughty

About JSNaughty

JSNaughty is a tool for recovering names from obfuscated Javascript files. It is based on framing the deobfuscation problem as a language translation problem - we translate the obfuscated names to meaningful names using the context in which variables are defined.

To do this, the tool makes uses of the Moses statistical machine translation framework to perform the translation, along with some pre and post processing to handle differences between code and natural language - such as code's requirement for consistency within scope.

The source code for the tool can be found at on our GitHub page here. In addition to the website, a more flexible environment to run the tool can be found on DockerHub, with addition instructions on running the docker container and the tool inside are in the README file here.

Using this website:

The Home page allows the recovering of obfuscated names from the UglifyJS obfuscation tool. You can paste the Javascript obfuscated with this tool in the left text box (replacing the example), and the tool will produced renamed (and indented if needed) Javascript. If you included the JSNice mixing option then the tool combines the names suggested by Moses with names suggested by JSNice. Our experiements show this is the most effective option. You can disable including the JSNice names by turning it off, or follow the link to try the renaming with just the JSNice tools.

Also, since our tool was designed to recover code minified by UglifyJS, we have included a web front end to minify Javascript with this tool here.