{"id":3467,"date":"2011-06-19T19:26:18","date_gmt":"2011-06-20T02:26:18","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=3467"},"modified":"2011-07-22T11:34:30","modified_gmt":"2011-07-22T18:34:30","slug":"deobfuscation-redux-javascript","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/deobfuscation-redux-javascript\/","title":{"rendered":"Deobfuscation Redux: JavaScript"},"content":{"rendered":"<p>Google recently released version 12 of their Chrome browser. This version adds a new feature that automatically allows deobfuscating obfuscated JavaScript source code.<\/p>\n<p><strong>Before:<\/strong><\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2011\/06\/javascript-obfuscated.png\" alt=\"\" title=\"Obfuscated JavaScript\" width=\"412\" height=\"89\" class=\"aligncenter size-full wp-image-3468\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2011\/06\/javascript-obfuscated.png 412w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2011\/06\/javascript-obfuscated-300x64.png 300w\" sizes=\"auto, (max-width: 412px) 100vw, 412px\" \/><br \/>\n<\/center><\/p>\n<p><strong>After:<\/strong><\/p>\n<p><center><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2011\/06\/javascript-deobfuscated.png\" alt=\"\" title=\"JavaScript, still obfuscated, but beautified\" width=\"404\" height=\"188\" class=\"aligncenter size-full wp-image-3469\" srcset=\"https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2011\/06\/javascript-deobfuscated.png 404w, https:\/\/multimedia.cx\/eggs\/wp-content\/uploads\/2011\/06\/javascript-deobfuscated-300x139.png 300w\" sizes=\"auto, (max-width: 404px) 100vw, 404px\" \/><br \/>\n<\/center><\/p>\n<p>As a reverse engineering purist, I was a bit annoyed. Not at the feature, just the naming. This is clearly code <em>beautification<\/em> but not necessarily <em>deobfuscation<\/em>. The real obfuscation comes not from removing whitespace but from renaming variable and function names to terse 1- and 2-letter identifiers. True automated deobfuscation &#8212; which entails recovering the original variable and function identifiers as well as source code comments &#8212; is basically impossible.<\/p>\n<p>Still, it makes me wonder if there is any interest in a JavaScript deobfuscator that operates similar to <a href=\"http:\/\/multimedia.cx\/eggs\/success-on-the-java-de-obfuscation-front\/\">my Java deobfuscator<\/a> which was one of the first things I published on this blog. The general idea is automatically replace function names with random English verbs (since functions correspond to actions) and variable names with random animal names (I decided &#8220;English nouns&#8221; encompassed too broad a category of words). I suspect the day that someone releases a proprietary multimedia codec in a pure (though obfuscated) JavaScript format is that day that I will try to accomplish this, if it hasn&#8217;t been done already.<\/p>\n<p><strong>See also:<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/multimedia.cx\/eggs\/success-on-the-java-de-obfuscation-front\/\">Success on the Java De-obfuscation Front<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What JavaScript deobfuscation would really mean<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[225,182,226,277],"class_list":["post-3467","post","type-post","status-publish","format-standard","hentry","category-reverse-engineering","tag-deobfuscation","tag-javascript","tag-programming-2","tag-reverse-engineering"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=3467"}],"version-history":[{"count":7,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3467\/revisions"}],"predecessor-version":[{"id":3495,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/3467\/revisions\/3495"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=3467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=3467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=3467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}