Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for obsfucation/identify obsfucation attempts #46

Closed
tofumatt opened this issue Oct 6, 2015 · 3 comments
Closed

Test for obsfucation/identify obsfucation attempts #46

tofumatt opened this issue Oct 6, 2015 · 3 comments

Comments

@tofumatt
Copy link
Contributor

tofumatt commented Oct 6, 2015

Currently we test for identifiers (#44), as the previous validator does. This leaves us open to obsfucation of restricted identifiers, eg:

var m = "m";
var o = "o";
var z = "z";
var idb = "IndexedDB";
var tricksterVariable = m + o + z + idb;
// Bad!
var myDatabase = window[tricksterVariable];

We need to statically analyse variable paths and find out their eventual values if they're used to dynamically call a function.

Failing this: we need to identify heuristics that we can use to say that obfuscation appears likely and alert the reviewer for closer manual inspection.

@tofumatt tofumatt added the 44.2 label Oct 6, 2015
@tofumatt tofumatt self-assigned this Oct 6, 2015
@andymckay andymckay removed the 44.2 label Oct 6, 2015
@magopian
Copy link

magopian commented Oct 6, 2015

If there's a way to detect obfuscation (and minification!), and the validator returns a flag or something in the result, then that would help the backend tell the user he needs to either not minify/obfuscate, or at least attach the (unminified/unobfuscated) source code for reviewers.

@tofumatt
Copy link
Contributor Author

tofumatt commented Oct 8, 2015

Discussion on dev-js-tech-engine list, including mention of Caja: https://groups.google.com/forum/#!topic/mozilla.dev.tech.js-engine/qpALgoOftRw

@tofumatt tofumatt removed their assignment May 20, 2016
@tofumatt
Copy link
Contributor Author

I'm gonna close this as essentially way too big a project (people have done thesis papers on this and still concluded "it's really hard").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants