question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

0.9.0 development: control flow flattening, TemplateLiteral obfuscation

See original GitHub issue

Plans: implement new feature controlFlowFlattening. First working implementation in branch https://github.com/javascript-obfuscator/javascript-obfuscator/tree/control-flow-flattening.

Right now it works only with binary expressions.

Input code:

(function(){
    function t () {
        return function () {
            var t = 1 * 2;
        }
    }
    
    var s = 1 - 3;
})();

Output code:

(function() {
    var _0x3256c0 = {
        yXA: function _0x3f3ab8(_0x424cad, _0x160400) {
            return _0x424cad * _0x160400;
        },
        ALl: function _0x59ad20(_0x73693d, _0x810251) {
            return _0x73693d - _0x810251;
        }
    };

    function _0x3d53de() {
        var _0x2aac75 = {
            xfm: function _0x25e35b(_0x562551, _0x19bae8) {
                return _0x3256c0.yXA(_0x562551, _0x19bae8);
            }
        };
        return function() {
            var _0x4ead21 = {
                tux: function _0x353def(_0x47dac9, _0x76457f) {
                    return _0x2aac75.xfm(_0x47dac9, _0x76457f);
                }
            };
            var _0x5b40a3 = _0x4ead21.tux(1, 2);
        };
    }
    var _0x3f9aa = _0x3256c0.ALl(1, 3);
}());

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:22 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
sanex3339commented, Jan 14, 2017

0.9.0 in beta! Look at javascript-obfuscator@beta and webpack-obfuscator@beta

2reactions
RogerHardimancommented, Jan 29, 2017

I will very happy if someone will look at readme.md and fix grammar errors in it. Thank you in advance!

Done. Have generated a Pull Request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Control Flow Flattening Obfuscation Explained Practically ...
Twitch Clip - A practical explanation of control flow flattening obfuscation linking the concept to actual code in IDA Pro.
Read more >
Automated Detection of Control-flow Flattening - Tim Blazytko
Therefore, I would like to use this post to introduce a heuristic that automatically identifies one of the most common obfuscation techniques, ...
Read more >
Attacking Emotet's Control Flow Flattening - Sophos News
Control Flow Flattening hides program flow by putting all function blocks next to each other. It is a well-known obfuscation technique used to ......
Read more >
VMProtect Control Flow Obfuscation (Case study: string ...
Control flow flattening is a specialization of control flow obfuscation implemented by obfuscators such as ConfuserEx, Obfuscator-LLVM and ...
Read more >
eShard Blog - D810: A journey into control flow unflattening
We demonstrate how D-810 can be used and configured to remove the control flow flattening generated by Tigress obfuscator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found