JAVASCRIPT

BASIC OBFUSCATION

#create the JavaScript Code
<script>
  console.log('HTB JavaScript Deobfuscation Module');
</script>

#pack the code
root@oco:~$ BROWSER > https://beautifytools.com/javascript-obfuscator.php
 input: console.log('HTB JavaScript Deobfuscation Module');
 encoding: normal
 options: fast decode and special characters
 output: 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--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1.0(\'2 3 4 5\');',6,6,'log|console|HTB|JavaScript|Deobfuscation|Module'.split('|'),0,{}))
 
#minify to further reduce readability
root@oco:~$ BROWSER > https://www.toptal.com/developers/javascript-minifier
 input: 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--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1.0(\'2 3 4 5\');',6,6,'log|console|HTB|JavaScript|Deobfuscation|Module'.split('|'),0,{}))
 * use the output from packing
 output: eval(function(n,r,o,e,t,u){if(t=function(n){return n},!"".replace(/^/,String)){for(;o--;)u[o]=e[o]||o;e=[function(n){return u[n]}],t=function(){return"\\w+"},o=1}for(;o--;)e[o]&&(n=n.replace(RegExp("\\b"+t(o)+"\\b","g"),e[o]));return n}("1.0('2 3 4 5');",6,6,"log|console|HTB|JavaScript|Deobfuscation|Module".split("|"),0,{}));
 
#verify original functionality
root@oco:~$ BROWSER > https://jsconsole.com/
 input: eval(function(n,r,o,e,t,u){if(t=function(n){return n},!"".replace(/^/,String)){for(;o--;)u[o]=e[o]||o;e=[function(n){return u[n]}],t=function(){return"\\w+"},o=1}for(;o--;)e[o]&&(n=n.replace(RegExp("\\b"+t(o)+"\\b","g"),e[o]));return n}("1.0('2 3 4 5');",6,6,"log|console|HTB|JavaScript|Deobfuscation|Module".split("|"),0,{}));
 * use the output from minifying

ADVANCED OBFUSCATION

#create the JavaScript Code
<script>
  console.log('HTB JavaScript Deobfuscation Module');
</script>

#pack the code
root@oco:~$ BROWSER > https://beautifytools.com/javascript-obfuscator.php
 input: console.log('HTB JavaScript Deobfuscation Module');
 encoding: normal
 options: fast decode and special characters
 output: 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--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1.0(\'2 3 4 5\');',6,6,'log|console|HTB|JavaScript|Deobfuscation|Module'.split('|'),0,{}))
 
#minify to further reduce readability
root@oco:~$ BROWSER > https://www.toptal.com/developers/javascript-minifier
 input: 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--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1.0(\'2 3 4 5\');',6,6,'log|console|HTB|JavaScript|Deobfuscation|Module'.split('|'),0,{}))
 * use the output from packing
 output: eval(function(n,r,o,e,t,u){if(t=function(n){return n},!"".replace(/^/,String)){for(;o--;)u[o]=e[o]||o;e=[function(n){return u[n]}],t=function(){return"\\w+"},o=1}for(;o--;)e[o]&&(n=n.replace(RegExp("\\b"+t(o)+"\\b","g"),e[o]));return n}("1.0('2 3 4 5');",6,6,"log|console|HTB|JavaScript|Deobfuscation|Module".split("|"),0,{}));
 
#verify original functionality
root@oco:~$ BROWSER > https://jsconsole.com/
 input: eval(function(n,r,o,e,t,u){if(t=function(n){return n},!"".replace(/^/,String)){for(;o--;)u[o]=e[o]||o;e=[function(n){return u[n]}],t=function(){return"\\w+"},o=1}for(;o--;)e[o]&&(n=n.replace(RegExp("\\b"+t(o)+"\\b","g"),e[o]));return n}("1.0('2 3 4 5');",6,6,"log|console|HTB|JavaScript|Deobfuscation|Module".split("|"),0,{}));
 * use the output from minifying
 
root@oco:~$ BROWSER > https://obfuscator.io/
 input: eval(function(n,r,o,e,t,u){if(t=function(n){return n},!"".replace(/^/,String)){for(;o--;)u[o]=e[o]||o;e=[function(n){return u[n]}],t=function(){return"\\w+"},o=1}for(;o--;)e[o]&&(n=n.replace(RegExp("\\b"+t(o)+"\\b","g"),e[o]));return n}("1.0('2 3 4 5');",6,6,"log|console|HTB|JavaScript|Deobfuscation|Module".split("|"),0,{}));
 * use the output from minifying
 options (changes):
  string array threshold: 0.8
  string array encoding: Base64
 output: var _0xbdbb67=_0x5117;function _0x5117(_0x4a6195,_0x44b4b1){var _0x5669a4=_0x5669();return _0x5117=function(_0x511777,_0x1841d0){_0x511777=_0x511777-0x10d;var _0x3c533a=_0x5669a4[_0x511777];if(_0x5117['XToEKH']===undefined){var _0x5b8d4d=function(_0x154d99){var _0x2f8553='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x36e027='',_0x1fde89='';for(var _0x33077b=0x0,_0x2ae240,_0x3722c5,_0x4c815c=0x0;_0x3722c5=_0x154d99['charAt'](_0x4c815c++);~_0x3722c5&&(_0x2ae240=_0x33077b%0x4?_0x2ae240*0x40+_0x3722c5:_0x3722c5,_0x33077b++%0x4)?_0x36e027+=String['fromCharCode'](0xff&_0x2ae240>>(-0x2*_0x33077b&0x6)):0x0){_0x3722c5=_0x2f8553['indexOf'](_0x3722c5);}for(var _0x1877a5=0x0,_0xca7025=_0x36e027['length'];_0x1877a5<_0xca7025;_0x1877a5++){_0x1fde89+='%'+('00'+_0x36e027['charCodeAt'](_0x1877a5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1fde89);};_0x5117['RRZWka']=_0x5b8d4d,_0x4a6195=arguments,_0x5117['XToEKH']=!![];}var _0x323b59=_0x5669a4[0x0],_0x1f5d0d=_0x511777+_0x323b59,_0x14891d=_0x4a6195[_0x1f5d0d];return!_0x14891d?(_0x3c533a=_0x5117['RRZWka'](_0x3c533a),_0x4a6195[_0x1f5d0d]=_0x3c533a):_0x3c533a=_0x14891d,_0x3c533a;},_0x5117(_0x4a6195,_0x44b4b1);}(function(_0x3b91dc,_0x183f02){var _0x323cc1=_0x5117,_0x472f88=_0x3b91dc();while(!![]){try{var _0x1d9938=-parseInt(_0x323cc1(0x117))/0x1*(parseInt(_0x323cc1(0x113))/0x2)+-parseInt(_0x323cc1(0x10d))/0x3+-parseInt(_0x323cc1(0x115))/0x4+parseInt(_0x323cc1(0x10f))/0x5*(-parseInt(_0x323cc1(0x116))/0x6)+-parseInt(_0x323cc1(0x110))/0x7*(parseInt(_0x323cc1(0x118))/0x8)+parseInt(_0x323cc1(0x119))/0x9+parseInt(_0x323cc1(0x112))/0xa;if(_0x1d9938===_0x183f02)break;else _0x472f88['push'](_0x472f88['shift']());}catch(_0x30fbac){_0x472f88['push'](_0x472f88['shift']());}}}(_0x5669,0x50c54),eval(function(_0x154d99,_0x2f8553,_0x36e027,_0x1fde89,_0x33077b,_0x2ae240){var _0x13d546=_0x5117;if(_0x33077b=function(_0x3722c5){return _0x3722c5;},!''['replace'](/^/,String)){for(;_0x36e027--;)_0x2ae240[_0x36e027]=_0x1fde89[_0x36e027]||_0x36e027;_0x1fde89=[function(_0x4c815c){return _0x2ae240[_0x4c815c];}],_0x33077b=function(){var _0xcaa851=_0x5117;return _0xcaa851(0x111);},_0x36e027=0x1;}for(;_0x36e027--;)_0x1fde89[_0x36e027]&&(_0x154d99=_0x154d99[_0x13d546(0x10e)](RegExp('\x5cb'+_0x33077b(_0x36e027)+'\x5cb','g'),_0x1fde89[_0x36e027]));return _0x154d99;}(_0xbdbb67(0x11a),0x6,0x6,_0xbdbb67(0x114)['split']('|'),0x0,{})));function _0x5669(){var _0x5548d4=['xhCR','mJqYody1mtboAhriuu4','mZu0C2zPuhr5','Bg9NFgnVBNnVBgv8sfrcFePHDMfty3jPChr8rgvVyMz1C2nHDgLVBNXnB2r1Bgu','mJm3mtK0nfjmru9RzW','mJK5mZiYsuLjtKrq','mJC0n1rfBK9gAG','mJrhwvz4BMm','mtaZotC2murWB2rlrG','ms4WkcCYidmGnca1jYK7','mtiZmdy1ngjoENrusW','CMvWBgfJzq','ntbhCgvOAvq','nti1mte5qvHnse1Q'];_0x5669=function(){return _0x5548d4;};return _0x5669();} 

#verify original functionality
root@oco:~$ 
 input: var _0xbdbb67=_0x5117;function _0x5117(_0x4a6195,_0x44b4b1){var _0x5669a4=_0x5669();return _0x5117=function(_0x511777,_0x1841d0){_0x511777=_0x511777-0x10d;var _0x3c533a=_0x5669a4[_0x511777];if(_0x5117['XToEKH']===undefined){var _0x5b8d4d=function(_0x154d99){var _0x2f8553='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x36e027='',_0x1fde89='';for(var _0x33077b=0x0,_0x2ae240,_0x3722c5,_0x4c815c=0x0;_0x3722c5=_0x154d99['charAt'](_0x4c815c++);~_0x3722c5&&(_0x2ae240=_0x33077b%0x4?_0x2ae240*0x40+_0x3722c5:_0x3722c5,_0x33077b++%0x4)?_0x36e027+=String['fromCharCode'](0xff&_0x2ae240>>(-0x2*_0x33077b&0x6)):0x0){_0x3722c5=_0x2f8553['indexOf'](_0x3722c5);}for(var _0x1877a5=0x0,_0xca7025=_0x36e027['length'];_0x1877a5<_0xca7025;_0x1877a5++){_0x1fde89+='%'+('00'+_0x36e027['charCodeAt'](_0x1877a5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1fde89);};_0x5117['RRZWka']=_0x5b8d4d,_0x4a6195=arguments,_0x5117['XToEKH']=!![];}var _0x323b59=_0x5669a4[0x0],_0x1f5d0d=_0x511777+_0x323b59,_0x14891d=_0x4a6195[_0x1f5d0d];return!_0x14891d?(_0x3c533a=_0x5117['RRZWka'](_0x3c533a),_0x4a6195[_0x1f5d0d]=_0x3c533a):_0x3c533a=_0x14891d,_0x3c533a;},_0x5117(_0x4a6195,_0x44b4b1);}(function(_0x3b91dc,_0x183f02){var _0x323cc1=_0x5117,_0x472f88=_0x3b91dc();while(!![]){try{var _0x1d9938=-parseInt(_0x323cc1(0x117))/0x1*(parseInt(_0x323cc1(0x113))/0x2)+-parseInt(_0x323cc1(0x10d))/0x3+-parseInt(_0x323cc1(0x115))/0x4+parseInt(_0x323cc1(0x10f))/0x5*(-parseInt(_0x323cc1(0x116))/0x6)+-parseInt(_0x323cc1(0x110))/0x7*(parseInt(_0x323cc1(0x118))/0x8)+parseInt(_0x323cc1(0x119))/0x9+parseInt(_0x323cc1(0x112))/0xa;if(_0x1d9938===_0x183f02)break;else _0x472f88['push'](_0x472f88['shift']());}catch(_0x30fbac){_0x472f88['push'](_0x472f88['shift']());}}}(_0x5669,0x50c54),eval(function(_0x154d99,_0x2f8553,_0x36e027,_0x1fde89,_0x33077b,_0x2ae240){var _0x13d546=_0x5117;if(_0x33077b=function(_0x3722c5){return _0x3722c5;},!''['replace'](/^/,String)){for(;_0x36e027--;)_0x2ae240[_0x36e027]=_0x1fde89[_0x36e027]||_0x36e027;_0x1fde89=[function(_0x4c815c){return _0x2ae240[_0x4c815c];}],_0x33077b=function(){var _0xcaa851=_0x5117;return _0xcaa851(0x111);},_0x36e027=0x1;}for(;_0x36e027--;)_0x1fde89[_0x36e027]&&(_0x154d99=_0x154d99[_0x13d546(0x10e)](RegExp('\x5cb'+_0x33077b(_0x36e027)+'\x5cb','g'),_0x1fde89[_0x36e027]));return _0x154d99;}(_0xbdbb67(0x11a),0x6,0x6,_0xbdbb67(0x114)['split']('|'),0x0,{})));function _0x5669(){var _0x5548d4=['xhCR','mJqYody1mtboAhriuu4','mZu0C2zPuhr5','Bg9NFgnVBNnVBgv8sfrcFePHDMfty3jPChr8rgvVyMz1C2nHDgLVBNXnB2r1Bgu','mJm3mtK0nfjmru9RzW','mJK5mZiYsuLjtKrq','mJC0n1rfBK9gAG','mJrhwvz4BMm','mtaZotC2murWB2rlrG','ms4WkcCYidmGnca1jYK7','mtiZmdy1ngjoENrusW','CMvWBgfJzq','ntbhCgvOAvq','nti1mte5qvHnse1Q'];_0x5669=function(){return _0x5548d4;};return _0x5669();}
 * use the otput from obfuscator.io

PACKER

MINIFYER

ADVANCED OBFUSCATOR

FUNCTIONALITY VERIFIER

OBFUSCATOR: WEB FILTER/RESTRICTION BYPASS

Last updated