David Machel
David Machel

Reputation: 296

Came across strange javascript while fixing a page

I've been working on a page that's been sabotaged by somebody and well that person added extra code. I have no clue what it does but i know it doesn't belong there.

I have included a link right here to pastebin right here

The code at the bottom of the page is strange (at line 130 till 179)... can someone explain it to me?

Prolly should mention not to run this in any circumstances

EDIT: I have jsbeautified it and put it on pastebin

Upvotes: 2

Views: 74

Answers (3)

Tobias
Tobias

Reputation: 7380

Seems to be malicous code! Check your computer for malware etc.

Upvotes: 0

Ramesh
Ramesh

Reputation: 13266

The code is obfuscated and you can try to understand the intention by doing unescape('\x63\x72\x65\x61\x74\x65\x45\x6c\x65\x6d\x65\x6e\x74') in javascript console which resolves to createElement.

Upvotes: 0

Håvard
Håvard

Reputation: 10080

You could start by jsbeautifying the code, although that didn't help much. It's most likely some malicious code, but it could take a while to determine what it does.

If you are interested, the code is obfuscated, meaning it's made as hard as possible to comprehend what it does. Some people use this to hide source code, some use it to inject malicious code without showing what it does.

Upvotes: 1

Related Questions