how to tracing runtime eval() function ?

21 views
Skip to first unread message

Akshay Darekar

unread,
Jun 13, 2014, 7:46:27 AM6/13/14
to fir...@googlegroups.com
I am a python developer. i was find out malicious or Obfuscation javascript this are run time executing, when i execute in my brawser this are infected to my desktop. i want to trace what in the eval function are executing. this javascript are encoded format that are run time encoding self and infecting to machine. anybody have idea about how to catch this value / string.

Jan Honza Odvarko

unread,
Jun 13, 2014, 9:23:43 AM6/13/14
to fir...@googlegroups.com
Perhaps you could overwrite the native eval() and track calls throug your custom eval implementation?

Something like:

var proxied = eval;
eval = function() { alert("ha"); return proxied.apply(this, arguments);};
eval(7);

Honza

Simon Lindholm

unread,
Jun 13, 2014, 1:54:03 PM6/13/14
to fir...@googlegroups.com
(Note that that breaks direct eval - a proper solution would have to involve a debugger. E.g., why not use Firebug's Script panel?)
Reply all
Reply to author
Forward
0 new messages