Member-only story
JavaScript Deobfuscation
Introduction:
Code deobfuscation is an important skill to learn if we want to be skilled in code analysis and reverse engineering. Obfuscation is a technique used to make a script more difficult to read by humans but allows it to function the same from a technical point of view, though performance may be slower.This article will explain what is code deobfuscation, the reasons for using it, and its potential advantages and disadvantages.
Deobfuscated code:
This is usually achieved automatically by using an obfuscation tool, which takes code as input, and attempts to re-write the code in a way that is much more difficult to read, depending on its design
For example consider the following two snippets of code and their output
Snippet 1:
console.log("Hello by Dhanush")Output of Snippet 1:
Hello by DhanushSnippet 2:
eval(
(function (p, a, c, k, e, d) {
e = function (c) {
return c;
};
if (!"".replace(/^/, String)) {
while (c--) {
d[c] = k[c] || c;
}
k = [
function (e) {
return d[e];
},
];
e = function () {
return "\\w+";
};
c = 1;
}
while (c--) {…









