I just came across a rather unusual problem, and I cannot figure out if it actually is a problem (or even security issue) or not. Upon opening Skype on MacOS, a popup window appears (multiple times, but with the exact same content), asking to choose an application for opening the following:
Decoding the base64-value reveals a JavaScript snippet inside a script tag, which leads me to believe that Skype is trying to open this script inside a browser. Here is the complete value, beautified for readability:
<script>
(function() {
function g(a) {
var c, b;
c = "";
for (b = 0; b < a.length; b++) c += String.fromCharCode(a.charCodeAt(b) + 2 - b % 14);
return c
}
function h(a) {
d = a - k;
k = a;
if (!(350 < d))
for (a = 0; a < b.length; a++) b[a] && b[a].postMessage && b[a].postMessage({
fps: 1E3 / d,
slot: e,
timeDelta: d || 0
}, "*");
window[g(f)](h)
}
var k = 0,
d, b = [],
e, f;
f = "pdqvgvxFtpuj~tmmFscpi";
window.addEventListener("message", function(a) {
var c = a.data;
c && c.slot && (a = a.source, -1 < b.indexOf(a) || (b.push(a), void 0 === e && (e = c.slot)))
});
window[g(f)](h)
})();
</script>
I reverse engineered this Snippet a little bit. As far as I understand, it listens for the message
event on the window
object and then updates some values. It also repeatedly calls requestAnimationFrame
, where the messages are posted from.
What is this code doing? Why is Skype trying to open it?